diff --git a/charts/base-cluster/templates/monitoring/deadMansSwitch/registration.yaml b/charts/base-cluster/templates/monitoring/deadMansSwitch/registration.yaml index 07cf27e905..dc14b5178d 100644 --- a/charts/base-cluster/templates/monitoring/deadMansSwitch/registration.yaml +++ b/charts/base-cluster/templates/monitoring/deadMansSwitch/registration.yaml @@ -1,3 +1,7 @@ +{{- define "base-cluster.deadMansSwitch.checkName" -}} + {{- printf "k8s-cluster-%s-%s" (.Values.global.baseDomain | replace "." "-") .Values.global.clusterName }} +{{- end -}} + {{- if .Values.monitoring.deadMansSwitch.enabled }} apiVersion: batch/v1 kind: Job @@ -59,8 +63,8 @@ spec: curl --silent --show-error --fail --retry 5 --max-time 30 "https://hc-ping.com/$PING_KEY/$checkName" } - checkName={{- printf "k8s-cluster-%s-%s" (.Values.global.baseDomain | replace "." "-") .Values.global.clusterName | quote }} - {{- if .Values.monitoring.prometheus.enabled }} + checkName={{- include "base-cluster.deadMansSwitch.checkName" . | quote }} + {{- if and .Values.monitoring.prometheus.enabled .Values.monitoring.deadMansSwitch.enabled }} createCheck "$checkName-monitoring" {{- end }} createCheck "$checkName-scheduling" diff --git a/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_alertmanager-config.yaml b/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_alertmanager-config.yaml index 745e5b3862..90c4727e02 100644 --- a/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_alertmanager-config.yaml +++ b/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_alertmanager-config.yaml @@ -45,10 +45,10 @@ config: ) -}} {{- end -}} - {{- if and .Values.monitoring.deadMansSwitch.enabled .Values.global.baseDomain .Values.global.clusterName -}} + {{- if and .Values.monitoring.deadMansSwitch.enabled -}} {{- $receivers = set $receivers "healthchecks.io" (dict "webhook_configs" (list (dict - "url" (printf "https://hc-ping.com/%s/k8s-cluster-%s-%s-monitoring" .Values.monitoring.deadMansSwitch.pingKey (.Values.global.baseDomain | replace "." "-") .Values.global.clusterName) + "url" (printf "https://hc-ping.com/%s/%s" .Values.monitoring.deadMansSwitch.pingKey (include "base-cluster.deadMansSwitch.checkName" .)) "send_resolved" false ) ) diff --git a/charts/crossplane-anynines/anynines-klutch/templates/NOTES.txt b/charts/crossplane-anynines/anynines-klutch/templates/NOTES.txt new file mode 100644 index 0000000000..e69de29bb2