Merge "Add user account to be used for federated metric collection."
This commit is contained in:
commit
b51c473175
@ -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
|
||||
}
|
||||
|
@ -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 }}
|
||||
|
@ -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
|
||||
|
@ -132,6 +132,9 @@ endpoints:
|
||||
admin:
|
||||
username: admin
|
||||
password: changeme
|
||||
federate:
|
||||
username: federate
|
||||
password: changeme
|
||||
hosts:
|
||||
default: prom-metrics
|
||||
public: prometheus
|
||||
|
Loading…
Reference in New Issue
Block a user