diff --git a/prometheus/templates/bin/_apache.sh.tpl b/prometheus/templates/bin/_apache.sh.tpl index c69995625..6e66ebc03 100644 --- a/prometheus/templates/bin/_apache.sh.tpl +++ b/prometheus/templates/bin/_apache.sh.tpl @@ -33,6 +33,10 @@ function start () { htpasswd -cb /usr/local/apache2/conf/.htpasswd "$PROMETHEUS_ADMIN_USERNAME" "$PROMETHEUS_ADMIN_PASSWORD" fi + if [ -n "$PROMETHEUS_FEDERATE_USERNAME" ]; then + htpasswd -b /usr/local/apache2/conf/.htpasswd "$PROMETHEUS_FEDERATE_USERNAME" "$PROMETHEUS_FEDERATE_PASSWORD" + fi + #Launch Apache on Foreground exec httpd -DFOREGROUND } diff --git a/prometheus/templates/secret-prometheus.yaml b/prometheus/templates/secret-prometheus.yaml index 69bc00a31..ac856d3a8 100644 --- a/prometheus/templates/secret-prometheus.yaml +++ b/prometheus/templates/secret-prometheus.yaml @@ -23,4 +23,6 @@ type: Opaque data: PROMETHEUS_ADMIN_USERNAME: {{ .Values.endpoints.monitoring.auth.admin.username | b64enc }} PROMETHEUS_ADMIN_PASSWORD: {{ .Values.endpoints.monitoring.auth.admin.password | b64enc }} + PROMETHEUS_FEDERATE_USERNAME: {{ .Values.endpoints.monitoring.auth.federate.username | b64enc }} + PROMETHEUS_FEDERATE_PASSWORD: {{ .Values.endpoints.monitoring.auth.federate.password | b64enc }} {{- end }} diff --git a/prometheus/templates/statefulset.yaml b/prometheus/templates/statefulset.yaml index 35c3a8134..2ed2bb5ff 100644 --- a/prometheus/templates/statefulset.yaml +++ b/prometheus/templates/statefulset.yaml @@ -134,6 +134,16 @@ spec: secretKeyRef: name: {{ printf "%s-%s" $envAll.Release.Name "admin-user" | quote }} key: PROMETHEUS_ADMIN_PASSWORD + - name: PROMETHEUS_FEDERATE_USERNAME + valueFrom: + secretKeyRef: + name: {{ printf "%s-%s" $envAll.Release.Name "admin-user" | quote }} + key: PROMETHEUS_FEDERATE_USERNAME + - name: PROMETHEUS_FEDERATE_PASSWORD + valueFrom: + secretKeyRef: + name: {{ printf "%s-%s" $envAll.Release.Name "admin-user" | quote }} + key: PROMETHEUS_FEDERATE_PASSWORD volumeMounts: - name: pod-tmp mountPath: /tmp diff --git a/prometheus/values.yaml b/prometheus/values.yaml index 0c2c55b19..cc2a743cc 100644 --- a/prometheus/values.yaml +++ b/prometheus/values.yaml @@ -125,6 +125,9 @@ endpoints: admin: username: admin password: changeme + federate: + username: federate + password: changeme hosts: default: prom-metrics public: prometheus