diff --git a/CHANGELOG.md b/CHANGELOG.md index d8c125d1ce..43baae7891 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,12 @@ - Bump Node.js version to 16.14.0 and improve UI initial load time (PR[#3745](https://github.com/scality/metalk8s/pull/3745)) +- Bump Prometheus Adapter chart version to + [3.4.0](https://github.com/prometheus-community/helm-charts/releases/tag/prometheus-adapter-3.4.0) + The prometheus-adapter image has been bumped accordingly to + [v0.10.0](https://github.com/kubernetes-sigs/prometheus-adapter/releases/tag/v0.10.0) + (PR[#3878](https://github.com/scality/metalk8s/pull/3878)) + ## Release 123.0.5 (in development) ## Release 123.0.4 diff --git a/buildchain/buildchain/versions.py b/buildchain/buildchain/versions.py index d05fdc945f..6f7a563e53 100644 --- a/buildchain/buildchain/versions.py +++ b/buildchain/buildchain/versions.py @@ -212,8 +212,8 @@ def _version_prefix(version: str, prefix: str = "v") -> str: ), Image( name="prometheus-adapter", - version="v0.9.1", - digest="sha256:d025d1a109234c28b4a97f5d35d759943124be8885a5bce22a91363025304e9d", + version="v0.10.0", + digest="sha256:2f34cb3a04a0fee6034f4d63ce3ee7786c0f762dc9f3bf196c70e894dd92edd1", ), Image( name="prometheus-config-reloader", diff --git a/charts/prometheus-adapter/Chart.yaml b/charts/prometheus-adapter/Chart.yaml index f86b25f31e..9e2c4c3e0a 100644 --- a/charts/prometheus-adapter/Chart.yaml +++ b/charts/prometheus-adapter/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: v0.9.1 +appVersion: v0.10.0 description: A Helm chart for k8s prometheus adapter home: https://github.com/kubernetes-sigs/prometheus-adapter keywords: @@ -17,4 +17,4 @@ name: prometheus-adapter sources: - https://github.com/kubernetes/charts - https://github.com/kubernetes-sigs/prometheus-adapter -version: 3.2.2 +version: 3.4.0 diff --git a/charts/prometheus-adapter/templates/_helpers.tpl b/charts/prometheus-adapter/templates/_helpers.tpl index 4b52f7b802..178c00b674 100644 --- a/charts/prometheus-adapter/templates/_helpers.tpl +++ b/charts/prometheus-adapter/templates/_helpers.tpl @@ -73,3 +73,12 @@ Create the name of the service account to use {{ default "default" .Values.serviceAccount.name }} {{- end -}} {{- end -}} + +{{/* Get Policy API Version */}} +{{- define "k8s-prometheus-adapter.pdb.apiVersion" -}} +{{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">= 1.21-0" .Capabilities.KubeVersion.Version) -}} + {{- print "policy/v1" -}} +{{- else -}} + {{- print "policy/v1beta1" -}} +{{- end -}} +{{- end -}} diff --git a/charts/prometheus-adapter/templates/deployment.yaml b/charts/prometheus-adapter/templates/deployment.yaml index 9fc6c8904c..78c3b95f9b 100644 --- a/charts/prometheus-adapter/templates/deployment.yaml +++ b/charts/prometheus-adapter/templates/deployment.yaml @@ -91,7 +91,9 @@ spec: drop: ["all"] readOnlyRootFilesystem: true runAsNonRoot: true - runAsUser: 10001 + {{- if .Values.runAsUser }} + runAsUser: {{ .Values.runAsUser }} + {{- end }} volumeMounts: {{- if .Values.extraVolumeMounts }} {{ toYaml .Values.extraVolumeMounts | trim | nindent 8 }} diff --git a/charts/prometheus-adapter/templates/pdb.yaml b/charts/prometheus-adapter/templates/pdb.yaml index 36d70b862f..205761a9f1 100644 --- a/charts/prometheus-adapter/templates/pdb.yaml +++ b/charts/prometheus-adapter/templates/pdb.yaml @@ -1,5 +1,5 @@ {{- if .Values.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 +apiVersion: {{ include "k8s-prometheus-adapter.pdb.apiVersion" . }} kind: PodDisruptionBudget metadata: name: {{ template "k8s-prometheus-adapter.fullname" . }} diff --git a/charts/prometheus-adapter/values.yaml b/charts/prometheus-adapter/values.yaml index da1466ed9f..a1c611474c 100644 --- a/charts/prometheus-adapter/values.yaml +++ b/charts/prometheus-adapter/values.yaml @@ -4,7 +4,7 @@ topologySpreadConstraints: [] image: repository: k8s.gcr.io/prometheus-adapter/prometheus-adapter - tag: v0.9.1 + tag: v0.10.0 pullPolicy: IfNotPresent logLevel: 4 @@ -13,6 +13,9 @@ metricsRelistInterval: 1m listenPort: 6443 +# User to run adapter container as +runAsUser: 10001 + nodeSelector: {} priorityClassName: "" diff --git a/salt/metalk8s/addons/prometheus-adapter/deployed/chart.sls b/salt/metalk8s/addons/prometheus-adapter/deployed/chart.sls index 8d24020213..f0b211a8f1 100644 --- a/salt/metalk8s/addons/prometheus-adapter/deployed/chart.sls +++ b/salt/metalk8s/addons/prometheus-adapter/deployed/chart.sls @@ -15,8 +15,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter namespace: metalk8s-monitoring @@ -128,8 +128,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter namespace: metalk8s-monitoring @@ -143,8 +143,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter-resource-reader namespace: metalk8s-monitoring @@ -170,8 +170,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter-server-resources namespace: metalk8s-monitoring @@ -192,8 +192,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter-metrics namespace: metalk8s-monitoring @@ -218,8 +218,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter-system-auth-delegator namespace: metalk8s-monitoring @@ -241,8 +241,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter-resource-reader namespace: metalk8s-monitoring @@ -264,8 +264,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter-hpa-controller namespace: metalk8s-monitoring @@ -287,8 +287,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter-hpa-controller-metrics namespace: metalk8s-monitoring @@ -310,8 +310,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter-auth-reader namespace: kube-system @@ -333,8 +333,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter namespace: metalk8s-monitoring @@ -357,8 +357,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter namespace: metalk8s-monitoring @@ -376,15 +376,15 @@ spec: template: metadata: annotations: - checksum/config: af25fa2c1645a1fbdadea8f89d548d3484d8b78fe94b61397dbb8663dd6408c5 + checksum/config: 8ab7ab72b9155f5b904116ac84541369ebb820cce914a8f802e262e10fe28feb labels: app.kubernetes.io/component: metrics app.kubernetes.io/instance: prometheus-adapter app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: prometheus-adapter spec: @@ -400,7 +400,7 @@ spec: - --v=4 - --config=/etc/adapter/config.yaml image: '{%- endraw -%}{{ build_image_name("prometheus-adapter", False) }}{%- - raw -%}:v0.9.1' + raw -%}:v0.10.0' imagePullPolicy: IfNotPresent livenessProbe: httpGet: @@ -464,8 +464,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: v1beta1.custom.metrics.k8s.io namespace: metalk8s-monitoring @@ -488,8 +488,8 @@ metadata: app.kubernetes.io/managed-by: salt app.kubernetes.io/name: prometheus-adapter app.kubernetes.io/part-of: metalk8s - app.kubernetes.io/version: v0.9.1 - helm.sh/chart: prometheus-adapter-3.2.2 + app.kubernetes.io/version: v0.10.0 + helm.sh/chart: prometheus-adapter-3.4.0 heritage: metalk8s name: v1beta1.metrics.k8s.io namespace: metalk8s-monitoring