add old clsutertool to archive

This commit is contained in:
Kjeld Schouten
2024-06-12 16:49:02 +02:00
parent 8d1dbb91dd
commit 07fdb4281e
138 changed files with 13329 additions and 0 deletions

View File

@ -0,0 +1,22 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.zinn.ca/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: flux-system-add-ons
namespace: flux-system
spec:
path: ./cluster/main/add-ons
sourceRef:
kind: GitRepository
name: flux-system
prune: true
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m
postBuild:
substitute: {}
substituteFrom:
- kind: ConfigMap
name: cluster-config

View File

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

View File

@ -0,0 +1,6 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- pod-monitor.yaml
- prometheus-rules.yaml

View File

@ -0,0 +1,76 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.zinn.ca/monitoring.coreos.com/prometheusrule_v1.json
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: kustomize-controller
namespace: flux-system
labels:
app.kubernetes.io/instance: flux-system
app.kubernetes.io/version: latest
spec:
namespaceSelector:
matchNames:
- flux-system
selector:
matchLabels:
app: kustomize-controller
podMetricsEndpoints:
- port: http-prom
---
# yaml-language-server: $schema=https://kubernetes-schemas.zinn.ca/monitoring.coreos.com/prometheusrule_v1.json
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: source-controller
namespace: flux-system
labels:
app.kubernetes.io/instance: flux-system
app.kubernetes.io/version: latest
spec:
namespaceSelector:
matchNames:
- flux-system
selector:
matchLabels:
app: source-controller
podMetricsEndpoints:
- port: http-prom
---
# yaml-language-server: $schema=https://kubernetes-schemas.zinn.ca/monitoring.coreos.com/prometheusrule_v1.json
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: helm-controller
namespace: flux-system
labels:
app.kubernetes.io/instance: flux-system
app.kubernetes.io/version: latest
spec:
namespaceSelector:
matchNames:
- flux-system
selector:
matchLabels:
app: helm-controller
podMetricsEndpoints:
- port: http-prom
---
# yaml-language-server: $schema=https://kubernetes-schemas.zinn.ca/monitoring.coreos.com/prometheusrule_v1.json
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: notification-controller
namespace: flux-system
labels:
app.kubernetes.io/instance: flux-system
app.kubernetes.io/version: latest
spec:
namespaceSelector:
matchNames:
- flux-system
selector:
matchLabels:
app: notification-controller
podMetricsEndpoints:
- port: http-prom

View File

@ -0,0 +1,34 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.zinn.ca/monitoring.coreos.com/prometheusrule_v1.json
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: flux
namespace: flux-system
spec:
groups:
- name: flux
rules:
- alert: FluxComponentAbsent
annotations:
description: Flux component has disappeared from Prometheus target discovery.
summary: Flux component is down.
expr: |
absent(up{job=~".*flux-system.*"} == 1)
for: 5m
labels:
severity: critical
- alert: FluxReconciliationFailure
annotations:
description:
"{{ $labels.kind }} {{ $labels.namespace }}/{{ $labels.name }} reconciliation has been failing
for more than ten minutes."
summary: Flux reconciliation failure.
expr: |
max(gotk_reconcile_condition{status="False",type="Ready"}) by (namespace, name, kind)
+
on(namespace, name, kind) (max(gotk_reconcile_condition{status="Deleted"})
by (namespace, name, kind)) * 2 == 1
for: 10m
labels:
severity: critical