diff --git a/kubernetes/teyvat/apps/observability/alertmanager/app/config/alertmanager.yml b/kubernetes/teyvat/apps/observability/alertmanager/app/config/alertmanager.yml deleted file mode 100644 index 5a7adb508c..0000000000 --- a/kubernetes/teyvat/apps/observability/alertmanager/app/config/alertmanager.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -global: - resolve_timeout: 5m -route: - group_by: ["alertname", "job"] - group_interval: 10m - group_wait: 1m - receiver: discord - repeat_interval: 12h - routes: - - receiver: heartbeat - group_interval: 5m - group_wait: 0s - matchers: - - alertname =~ "Watchdog" - repeat_interval: 5m - - receiver: "null" - matchers: - - severity = "none" - - alertname =~ "InfoInhibitor|Watchdog" - - receiver: discord - continue: true - matchers: - - severity = "critical" -inhibit_rules: - - equal: ["alertname", "namespace"] - source_matchers: - - severity = "critical" - target_matchers: - - severity = "warning" -receivers: - - name: heartbeat - webhook_configs: - - send_resolved: true - url: "{{ .ALERTMANAGER_HEARTBEAT_URL }}" - - name: "null" - - name: discord - discord_configs: - - send_resolved: true - webhook_url: "{{ .DISCORD_URL }}" - title: >- - {{ "{{" }} .CommonLabels.alertname {{ "}}" }} - [{{ "{{" }} .Status | toUpper {{ "}}" }}{{ "{{" }} if eq .Status "firing" {{ "}}" }}:{{ "{{" }} .Alerts.Firing | len {{ "}}" }}{{ "{{" }} end {{ "}}" }}] - message: |- - {{ "{{-" }} range .Alerts {{ "}}" }} - {{ "{{-" }} if ne .Annotations.description "" {{ "}}" }} - {{ "{{" }} .Annotations.description {{ "}}" }} - {{ "{{-" }} else if ne .Annotations.summary "" {{ "}}" }} - {{ "{{" }} .Annotations.summary {{ "}}" }} - {{ "{{-" }} else if ne .Annotations.message "" {{ "}}" }} - {{ "{{" }} .Annotations.message {{ "}}" }} - {{ "{{-" }} else {{ "}}" }} - Alert description not available - {{ "{{-" }} end {{ "}}" }} - {{ "{{-" }} if gt (len .Labels.SortedPairs) 0 {{ "}}" }} - {{ "{{-" }} range .Labels.SortedPairs {{ "}}" }} - **{{ "{{" }} .Name {{ "}}" }}:** {{ "{{" }} .Value {{ "}}" }} - {{ "{{-" }} end {{ "}}" }} - {{ "{{-" }} end {{ "}}" }} - {{ "{{-" }} end {{ "}}" }} diff --git a/kubernetes/teyvat/apps/observability/alertmanager/app/externalsecret.yaml b/kubernetes/teyvat/apps/observability/alertmanager/app/externalsecret.yaml deleted file mode 100644 index d2f5dbcdf2..0000000000 --- a/kubernetes/teyvat/apps/observability/alertmanager/app/externalsecret.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -apiVersion: external-secrets.io/v1beta1 -kind: ExternalSecret -metadata: - name: alertmanager-secret -spec: - target: - deletionPolicy: Delete - template: - templateFrom: - - configMap: - name: alertmanager-configmap - items: - - key: alertmanager.yml - data: - - secretKey: DISCORD_URL - sourceRef: - storeRef: - name: bitwarden-fields - kind: ClusterSecretStore - remoteRef: - key: 77e30fff-fad7-4812-a635-b034002b5b17 - property: discord_webhook - - secretKey: ALERTMANAGER_HEARTBEAT_URL - sourceRef: - storeRef: - name: bitwarden-fields - kind: ClusterSecretStore - remoteRef: - key: 6893b595-8cc3-47a2-84fa-b0f4016f41bc - property: alertmanager_heartbeat diff --git a/kubernetes/teyvat/apps/observability/alertmanager/app/helmrelease.yaml b/kubernetes/teyvat/apps/observability/alertmanager/app/helmrelease.yaml deleted file mode 100644 index 3a04e9fe9d..0000000000 --- a/kubernetes/teyvat/apps/observability/alertmanager/app/helmrelease.yaml +++ /dev/null @@ -1,92 +0,0 @@ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json -apiVersion: helm.toolkit.fluxcd.io/v2beta2 -kind: HelmRelease -metadata: - name: &app alertmanager -spec: - interval: 30m - chart: - spec: - chart: app-template - version: 2.5.0 - sourceRef: - kind: HelmRepository - name: bjw-s - namespace: flux-system - maxHistory: 2 - install: - remediation: - retries: 3 - upgrade: - cleanupOnFail: true - remediation: - retries: 3 - uninstall: - keepHistory: false - dependsOn: - - name: rook-ceph-cluster - namespace: rook-ceph - - name: volsync - namespace: storage - values: - controllers: - main: - annotations: - reloader.stakater.com/auto: "true" - containers: - main: - image: - repository: quay.io/prometheus/alertmanager - tag: v0.26.0 - ports: - - name: http - containerPort: 9093 - resources: - requests: - cpu: 11m - limits: - memory: 100M - pod: - securityContext: - runAsUser: 568 - runAsGroup: 568 - fsGroup: 568 - fsGroupChangePolicy: OnRootMismatch - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: node-role.kubernetes.io/control-plane - operator: Exists - service: - main: - ports: - http: - port: 9093 - ingress: - main: - enabled: true - className: internal - hosts: - - host: &host "{{ .Release.Name }}.${SECRET_DOMAIN}" - paths: - - path: / - service: - name: main - port: http - tls: - - hosts: - - *host - persistence: - secrets: - type: secret - name: alertmanager-secret - globalMounts: - - path: /etc/alertmanager - storage: - enabled: true - existingClaim: *app - globalMounts: - - path: /alertmanager diff --git a/kubernetes/teyvat/apps/observability/alertmanager/app/kustomization.yaml b/kubernetes/teyvat/apps/observability/alertmanager/app/kustomization.yaml deleted file mode 100644 index 08aaa502bc..0000000000 --- a/kubernetes/teyvat/apps/observability/alertmanager/app/kustomization.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - ./externalsecret.yaml - - ./helmrelease.yaml - - ../../../../templates/volsync -configMapGenerator: - - name: alertmanager-configmap - files: - - alertmanager.yml=./config/alertmanager.yml -generatorOptions: - disableNameSuffixHash: true diff --git a/kubernetes/teyvat/apps/observability/alertmanager/ks.yaml b/kubernetes/teyvat/apps/observability/alertmanager/ks.yaml deleted file mode 100644 index e7cbeca333..0000000000 --- a/kubernetes/teyvat/apps/observability/alertmanager/ks.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json -apiVersion: kustomize.toolkit.fluxcd.io/v1 -kind: Kustomization -metadata: - name: &app alertmanager - namespace: flux-system -spec: - targetNamespace: observability - commonMetadata: - labels: - app.kubernetes.io/name: *app - dependsOn: - - name: external-secrets-bitwarden - path: ./kubernetes/teyvat/apps/observability/alertmanager/app - prune: true - sourceRef: - kind: GitRepository - name: home-kubernetes - wait: false - interval: 30m - retryInterval: 1m - timeout: 5m - postBuild: - substitute: - APP: *app - VOLSYNC_CAPACITY: 50Mi diff --git a/kubernetes/teyvat/apps/observability/kustomization.yaml b/kubernetes/teyvat/apps/observability/kustomization.yaml index 0dcaadc1e9..f4bb6b1199 100644 --- a/kubernetes/teyvat/apps/observability/kustomization.yaml +++ b/kubernetes/teyvat/apps/observability/kustomization.yaml @@ -6,7 +6,6 @@ resources: # Pre Flux-Kustomizations - ./namespace.yaml # Flux-Kustomizations - #- ./alertmanager/ks.yaml - ./gatus/ks.yaml - ./grafana/ks.yaml - ./karma/ks.yaml