From 0e959d31611d27b50432bfaa0ccedcd0df9fa17b Mon Sep 17 00:00:00 2001 From: msadiq058 <42430865+msadiq058@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:19:25 +0530 Subject: [PATCH 1/3] [kube-prometheus-stack] quote host in alertmanager ingress spec (#4138) * quote host in kube-prometheus-stack alertmanager ingress spec Signed-off-by: Mohd Sadiq * added values yaml in ci Signed-off-by: Mohd Sadiq * add new line in config file Signed-off-by: Mohd Sadiq --------- Signed-off-by: Mohd Sadiq --- charts/kube-prometheus-stack/Chart.yaml | 2 +- .../05-alertmanager-ingress-host-with-wildcard-values.yaml | 5 +++++ .../templates/alertmanager/ingress.yaml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 charts/kube-prometheus-stack/ci/05-alertmanager-ingress-host-with-wildcard-values.yaml diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 0e65e6144e2a..84ac3e8e21d3 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -21,7 +21,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 55.7.0 +version: 55.7.1 appVersion: v0.70.0 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/ci/05-alertmanager-ingress-host-with-wildcard-values.yaml b/charts/kube-prometheus-stack/ci/05-alertmanager-ingress-host-with-wildcard-values.yaml new file mode 100644 index 000000000000..22ddcc8b7bb6 --- /dev/null +++ b/charts/kube-prometheus-stack/ci/05-alertmanager-ingress-host-with-wildcard-values.yaml @@ -0,0 +1,5 @@ +alertmanager: + ingress: + enabled: true + hosts: + - "*.test.com" diff --git a/charts/kube-prometheus-stack/templates/alertmanager/ingress.yaml b/charts/kube-prometheus-stack/templates/alertmanager/ingress.yaml index ae8092dec508..201a69ec6fc8 100644 --- a/charts/kube-prometheus-stack/templates/alertmanager/ingress.yaml +++ b/charts/kube-prometheus-stack/templates/alertmanager/ingress.yaml @@ -31,7 +31,7 @@ spec: rules: {{- if .Values.alertmanager.ingress.hosts }} {{- range $host := .Values.alertmanager.ingress.hosts }} - - host: {{ tpl $host $ }} + - host: {{ tpl $host $ | quote }} http: paths: {{- range $p := $paths }} From a5a6939767203a2eac89a6ba6056534225179247 Mon Sep 17 00:00:00 2001 From: Ilia Lazebnik Date: Thu, 11 Jan 2024 15:05:07 +0200 Subject: [PATCH 2/3] [prometheus-memcached-exporter] bump to 0.14.2 (#4134) Signed-off-by: drfaust92 --- charts/prometheus-memcached-exporter/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/prometheus-memcached-exporter/Chart.yaml b/charts/prometheus-memcached-exporter/Chart.yaml index 026aaa77c501..7cf79b940e36 100644 --- a/charts/prometheus-memcached-exporter/Chart.yaml +++ b/charts/prometheus-memcached-exporter/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: prometheus-memcached-exporter description: Prometheus exporter for Memcached metrics type: application -version: 0.3.0 -appVersion: "v0.14.1" +version: 0.3.1 +appVersion: "v0.14.2" home: https://github.com/prometheus/memcached_exporter sources: - https://github.com/prometheus/memcached_exporter From 801b161283505e1d6d63129fea759126e33e0d18 Mon Sep 17 00:00:00 2001 From: Mike Klebolt Date: Thu, 11 Jan 2024 14:37:12 -0600 Subject: [PATCH 3/3] [kube-state-metrics] Make liveness and readiness probes customizable (#4114) Signed-off-by: Mike Klebolt --- charts/kube-state-metrics/Chart.yaml | 2 +- .../templates/deployment.yaml | 44 ++++++++++++++----- charts/kube-state-metrics/values.yaml | 24 ++++++++++ 3 files changed, 59 insertions(+), 11 deletions(-) diff --git a/charts/kube-state-metrics/Chart.yaml b/charts/kube-state-metrics/Chart.yaml index a7682a33f665..05da94e1dd2b 100644 --- a/charts/kube-state-metrics/Chart.yaml +++ b/charts/kube-state-metrics/Chart.yaml @@ -7,7 +7,7 @@ keywords: - prometheus - kubernetes type: application -version: 5.15.3 +version: 5.16.0 appVersion: 2.10.1 home: https://github.com/kubernetes/kube-state-metrics/ sources: diff --git a/charts/kube-state-metrics/templates/deployment.yaml b/charts/kube-state-metrics/templates/deployment.yaml index 2aedc92016a0..373f7dcc56a0 100644 --- a/charts/kube-state-metrics/templates/deployment.yaml +++ b/charts/kube-state-metrics/templates/deployment.yaml @@ -49,10 +49,10 @@ spec: {{- toYaml . | nindent 6 }} {{- end }} containers: - {{- $httpPort := ternary 9090 (.Values.service.port | default 8080) .Values.kubeRBACProxy.enabled}} + {{- $servicePort := ternary 9090 (.Values.service.port | default 8080) .Values.kubeRBACProxy.enabled}} {{- $telemetryPort := ternary 9091 (.Values.selfMonitor.telemetryPort | default 8081) .Values.kubeRBACProxy.enabled}} - name: {{ template "kube-state-metrics.name" . }} - {{- if .Values.autosharding.enabled }} + {{- if .Values.autosharding.enabled }} env: - name: POD_NAME valueFrom: @@ -67,7 +67,7 @@ spec: {{- if .Values.extraArgs }} {{- .Values.extraArgs | toYaml | nindent 8 }} {{- end }} - - --port={{ $httpPort }} + - --port={{ $servicePort }} {{- if .Values.collectors }} - --resources={{ .Values.collectors | join "," }} {{- end }} @@ -147,17 +147,41 @@ spec: {{- end }} {{- end }} livenessProbe: + failureThreshold: {{ .Values.livenessProbe.failureThreshold }} httpGet: + {{- if .Values.kubeRBACProxy.enabled }} + host: 127.0.0.1 + {{- end }} + httpHeaders: + {{- range $_, $header := .Values.livenessProbe.httpGet.httpHeaders }} + - name: {{ $header.name }} + value: {{ $header.value }} + {{- end }} path: /healthz - port: {{ $httpPort }} - initialDelaySeconds: 5 - timeoutSeconds: 5 + port: {{ $servicePort }} + scheme: {{ upper .Values.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} readinessProbe: + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} httpGet: + {{- if .Values.kubeRBACProxy.enabled }} + host: 127.0.0.1 + {{- end }} + httpHeaders: + {{- range $_, $header := .Values.readinessProbe.httpGet.httpHeaders }} + - name: {{ $header.name }} + value: {{ $header.value }} + {{- end }} path: / - port: {{ $httpPort }} - initialDelaySeconds: 5 - timeoutSeconds: 5 + port: {{ $servicePort }} + scheme: {{ upper .Values.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} {{- if .Values.resources }} resources: {{ toYaml .Values.resources | indent 10 }} @@ -173,7 +197,7 @@ spec: {{- .Values.kubeRBACProxy.extraArgs | toYaml | nindent 8 }} {{- end }} - --secure-listen-address=:{{ .Values.service.port | default 8080}} - - --upstream=http://127.0.0.1:{{ $httpPort }}/ + - --upstream=http://127.0.0.1:{{ $servicePort }}/ - --proxy-endpoints-port=8888 - --config-file=/etc/kube-rbac-proxy-config/config-file.yaml volumeMounts: diff --git a/charts/kube-state-metrics/values.yaml b/charts/kube-state-metrics/values.yaml index ee6e1a9f7a74..7f312961d38d 100644 --- a/charts/kube-state-metrics/values.yaml +++ b/charts/kube-state-metrics/values.yaml @@ -454,3 +454,27 @@ containers: [] initContainers: [] # - name: crd-sidecar # image: kiwigrid/k8s-sidecar:latest + +## Liveness probe +## +livenessProbe: + failureThreshold: 3 + httpGet: + httpHeaders: [] + scheme: http + initialDelaySeconds: 5 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + +## Readiness probe +## +readinessProbe: + failureThreshold: 3 + httpGet: + httpHeaders: [] + scheme: http + initialDelaySeconds: 5 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5