3737ff0bcb
PVC manifests: add volumeName to bind new PVCs to existing PVs whose old PVCs were accidentally deleted during Terraform->ArgoCD migration. All PVs patched to Retain to prevent data loss on pod restart. kube-prometheus-stack: replace invalid adminPassword.valueFrom.secretKeyRef (Helm values don't support k8s secretKeyRef syntax) with correct admin.existingSecret + admin.passwordKey pattern.
107 lines
3.6 KiB
YAML
107 lines
3.6 KiB
YAML
apiVersion: argoproj.io/v1alpha1
|
|
kind: Application
|
|
metadata:
|
|
name: kube-prometheus-stack
|
|
namespace: argocd
|
|
spec:
|
|
project: default
|
|
source:
|
|
repoURL: https://prometheus-community.github.io/helm-charts
|
|
chart: kube-prometheus-stack
|
|
targetRevision: "*"
|
|
helm:
|
|
values: |
|
|
grafana:
|
|
admin:
|
|
existingSecret: grafana-admin-secret
|
|
passwordKey: admin-password
|
|
persistence:
|
|
enabled: true
|
|
size: 5Gi
|
|
sidecar:
|
|
datasources:
|
|
defaultDatasourceEnabled: false
|
|
initChownData:
|
|
enabled: false
|
|
ingress:
|
|
enabled: true
|
|
ingressClassName: traefik
|
|
hosts:
|
|
- grafana.neuralplatform.ai
|
|
tls:
|
|
- secretName: grafana-tls
|
|
hosts:
|
|
- grafana.neuralplatform.ai
|
|
annotations:
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
prometheus:
|
|
prometheusSpec:
|
|
storageSpec:
|
|
volumeClaimTemplate:
|
|
spec:
|
|
resources:
|
|
requests:
|
|
storage: 20Gi
|
|
kubeEtcd:
|
|
enabled: false
|
|
kubeControllerManager:
|
|
enabled: false
|
|
kubeScheduler:
|
|
enabled: false
|
|
kubeProxy:
|
|
enabled: false
|
|
alertmanager:
|
|
config:
|
|
global:
|
|
resolve_timeout: 5m
|
|
inhibit_rules:
|
|
- source_matchers: [severity="critical"]
|
|
target_matchers: [severity=~"warning|info"]
|
|
equal: [namespace, alertname]
|
|
- source_matchers: [severity="warning"]
|
|
target_matchers: [severity="info"]
|
|
equal: [namespace, alertname]
|
|
receivers:
|
|
- name: "null"
|
|
- name: slack-alerts
|
|
slack_configs:
|
|
- channel: "#infrastructure-alerts"
|
|
api_url: "https://slack.com/api/chat.postMessage"
|
|
http_config:
|
|
authorization:
|
|
type: Bearer
|
|
credentials_file: /etc/alertmanager/secrets/slack-bot-token/bot_token
|
|
send_resolved: true
|
|
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }} ({{ .CommonLabels.namespace }})'
|
|
text: |
|
|
{{ range .Alerts }}
|
|
*{{ if .Annotations.summary }}{{ .Annotations.summary }}{{ else }}{{ .Labels.alertname }}{{ end }}*{{ if .Labels.severity }} · {{ .Labels.severity }}{{ end }}
|
|
{{ if .Annotations.description }}{{ .Annotations.description }}{{ end }}
|
|
{{ end }}
|
|
footer: "Legion · neuralplatform.ai"
|
|
route:
|
|
group_by: [namespace, alertname]
|
|
group_wait: 30s
|
|
group_interval: 5m
|
|
repeat_interval: 4h
|
|
receiver: slack-alerts
|
|
routes:
|
|
- matchers: [alertname="Watchdog"]
|
|
receiver: "null"
|
|
- matchers: [severity="info"]
|
|
receiver: "null"
|
|
alertmanagerSpec:
|
|
secrets:
|
|
- slack-bot-token
|
|
destination:
|
|
server: https://kubernetes.default.svc
|
|
namespace: monitoring
|
|
syncPolicy:
|
|
automated:
|
|
prune: true
|
|
selfHeal: true
|
|
syncOptions:
|
|
- CreateNamespace=true
|
|
- ServerSideApply=true
|