feat: kasten.io k10

This commit is contained in:
auricom
2021-04-17 18:50:12 +02:00
parent fbac0f94c4
commit bfe3461496
8 changed files with 121 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: k10
namespace: kasten-io
spec:
releaseName: k10
interval: 5m
chart:
spec:
# renovate: registryUrl=https://charts.kasten.io/
chart: k10
version: 3.0.12
sourceRef:
kind: HelmRepository
name: kasten-charts
namespace: flux-system
interval: 5m
values:
eula:
accept: true
company: "${SECRET_CLUSTER_DOMAIN_CERT}"
email: "${SECRET_CLUSTER_DOMAIN_EMAIL}"
global:
persistence:
storageClass: longhorn
auth:
tokenAuth:
enabled: true
prometheus:
enabled: true
server:
persistentVolume:
enabled: false
clusterName: k3s
ingress:
create: true
class: "nginx"
host: "k10.${SECRET_CLUSTER_DOMAIN}"
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/app-root: /k10
urlPath: k10
hosts:
- "k10.${SECRET_CLUSTER_DOMAIN}"
tls:
enabled: true
secretName: "${SECRET_CLUSTER_DOMAIN_CERT}-tls"
postRenderers:
- kustomize:
patchesJson6902:
- target:
kind: Ingress
name: k10-ingress
patch:
- op: replace
path: /spec/rules/0/http/paths/0/path
value: /

View File

@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- helm-release.yaml
- prometheus-rule.yaml
- service-monitor.yaml

View File

@@ -0,0 +1,22 @@
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
labels:
prometheus: k8s
role: alert-rules
name: kasten-io
namespace: kasten-io
spec:
groups:
- name: kasten.rules
rules:
- alert: JobsFailing
annotations:
description: Jobs failure
summary: |-
"{{ $labels.app }} jobs amount of errors for the last 10 mins {{ $value }} for {{ $labels.policy }} policy"
expr: increase(catalog_actions_count{status="failed"}[10m]) > 0
for: 1m
labels:
severity: critical

View File

@@ -0,0 +1,23 @@
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: k10
namespace: kasten-io
spec:
namespaceSelector:
matchNames:
- kasten-io
selector:
matchLabels:
app: prometheus
endpoints:
- port: http
scheme: http
path: /k10/prometheus/federate
honorLabels: true
interval: 15s
params:
"match[]":
- '{__name__=~"jobs.*"}'
- '{__name__=~"catalog.*"}'

View File

@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- k10

View File

@@ -4,6 +4,7 @@ resources:
- data
- development
- home
- kasten-io
- media
- monitoring
- networking

View File

@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: kasten-io

View File

@@ -7,6 +7,7 @@ resources:
- development.yaml
- flux-system.yaml
- home.yaml
- kasten-io.yaml
- kube-system.yaml
- longhorn-system.yaml
- media.yaml