diff --git a/charts/base-cluster/ci/artifacthub-values.yaml b/charts/base-cluster/ci/artifacthub-values.yaml index 6e49c52ca..10a1211af 100644 --- a/charts/base-cluster/ci/artifacthub-values.yaml +++ b/charts/base-cluster/ci/artifacthub-values.yaml @@ -22,6 +22,7 @@ storage: enabled: true global: clusterName: test + baseDomain: example.com serviceLevelAgreement: None monitoring: grafana: diff --git a/charts/base-cluster/ci/deadmansswitch-values.yaml b/charts/base-cluster/ci/deadmansswitch-values.yaml index 5865bfdbc..b68d6b4ca 100644 --- a/charts/base-cluster/ci/deadmansswitch-values.yaml +++ b/charts/base-cluster/ci/deadmansswitch-values.yaml @@ -3,3 +3,5 @@ monitoring: enabled: true pingKey: PING_KEY apiKey: API_KEY +global: + baseDomain: example.com diff --git a/charts/base-cluster/templates/NOTES.txt b/charts/base-cluster/templates/NOTES.txt index 1e840829a..f4a9b9cbb 100644 --- a/charts/base-cluster/templates/NOTES.txt +++ b/charts/base-cluster/templates/NOTES.txt @@ -20,7 +20,7 @@ === You can access your grafana instance via -{{- if and .Values.certManager.email .Values.monitoring.grafana.ingress.enabled .Values.global.baseDomain }} +{{- if and .Values.certManager.email .Values.monitoring.grafana.ingress.enabled }} {{- printf "https://%s" (include "base-cluster.grafana.host" $) | nindent 2 }} {{- else }} {{- printf "$ kubectl -n monitoring port-forward svc/kube-prometheus-stack-grafana 3000:http-web" | nindent 2 }} diff --git a/charts/base-cluster/templates/monitoring/deadMansSwitch/registration.yaml b/charts/base-cluster/templates/monitoring/deadMansSwitch/registration.yaml index 32e28a2c5..4c1d97b38 100644 --- a/charts/base-cluster/templates/monitoring/deadMansSwitch/registration.yaml +++ b/charts/base-cluster/templates/monitoring/deadMansSwitch/registration.yaml @@ -64,7 +64,7 @@ spec: } checkName={{- include "base-cluster.deadMansSwitch.checkName" . | quote }} - {{- if and .Values.monitoring.prometheus.enabled .Values.monitoring.deadMansSwitch.enabled }} + {{- if .Values.monitoring.prometheus.enabled }} createCheck "$checkName-monitoring" {{- end }} createCheck "$checkName-scheduling" diff --git a/charts/base-cluster/templates/monitoring/deadMansSwitch/validation.tpl b/charts/base-cluster/templates/monitoring/deadMansSwitch/validation.tpl new file mode 100644 index 000000000..51067be6d --- /dev/null +++ b/charts/base-cluster/templates/monitoring/deadMansSwitch/validation.tpl @@ -0,0 +1,5 @@ +{{- if .Values.monitoring.deadMansSwitch.enabled -}} + {{- if not .Values.global.baseDomain -}} + {{- fail "You need to provide a `.Values.global.baseDomain` when enabling the dead mans switch" -}} + {{- end -}} +{{- end -}}