diff --git a/prometheus/Chart.yaml b/prometheus/Chart.yaml index f2e6e5926..4906cde27 100644 --- a/prometheus/Chart.yaml +++ b/prometheus/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v2.12.0 description: OpenStack-Helm Prometheus name: prometheus -version: 0.1.1 +version: 0.1.2 home: https://prometheus.io/ sources: - https://github.com/prometheus/prometheus diff --git a/prometheus/templates/statefulset.yaml b/prometheus/templates/statefulset.yaml index 52593f5e0..d6a8de946 100644 --- a/prometheus/templates/statefulset.yaml +++ b/prometheus/templates/statefulset.yaml @@ -12,6 +12,20 @@ See the License for the specific language governing permissions and limitations under the License. */}} +{{- define "probeTemplate" }} +{{- $probePort := tuple "monitoring" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} +{{- $probeUser := .Values.endpoints.monitoring.auth.admin.username }} +{{- $probePass := .Values.endpoints.monitoring.auth.admin.password }} +{{- $authHeader := printf "%s:%s" $probeUser $probePass | b64enc }} +httpGet: + path: /status + port: {{ $probePort }} + httpHeaders: + - name: Authorization + value: Basic {{ $authHeader }} +{{- end }} + + {{- if .Values.manifests.statefulset_prometheus }} {{- $envAll := . }} @@ -171,12 +185,8 @@ spec: ports: - name: prom-metrics containerPort: {{ tuple "monitoring" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} - readinessProbe: - httpGet: - path: /status - port: {{ tuple "monitoring" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} - initialDelaySeconds: 30 - timeoutSeconds: 30 +{{ dict "envAll" . "component" "prometheus" "container" "prometheus" "type" "readiness" "probeTemplate" (include "probeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} +{{ dict "envAll" . "component" "prometheus" "container" "prometheus" "type" "liveness" "probeTemplate" (include "probeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} env: {{- if .Values.pod.env.prometheus }} {{ include "helm-toolkit.utils.to_k8s_env_vars" .Values.pod.env.prometheus | indent 12 }} diff --git a/prometheus/values.yaml b/prometheus/values.yaml index 74c5c3beb..ad8f5c863 100644 --- a/prometheus/values.yaml +++ b/prometheus/values.yaml @@ -110,7 +110,19 @@ pod: limits: memory: "1024Mi" cpu: "2000m" - + probes: + prometheus: + prometheus: + readiness: + enabled: true + params: + initialDelaySeconds: 30 + timeoutSeconds: 30 + liveness: + enabled: false + params: + initialDelaySeconds: 120 + timeoutSeconds: 30 endpoints: cluster_domain_suffix: cluster.local local_image_registry: