From b6bb9428fb7d8c7d01cbdb59ca2dd00b9e544831 Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Mon, 30 Nov 2026 03:56:15 -0700 Subject: [PATCH 01/12] fix(nfd): Node Feature Discovery 0.20.1 (clears 12 critical, 251 high in 0.17.1) Signed-off-by: Ahmed, Mushtaq --- roles/node_feature_discovery/defaults/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/node_feature_discovery/defaults/main.yaml b/roles/node_feature_discovery/defaults/main.yaml index 9c3ed1ce..1bd81000 100644 --- a/roles/node_feature_discovery/defaults/main.yaml +++ b/roles/node_feature_discovery/defaults/main.yaml @@ -17,4 +17,4 @@ node_feature_discovery_namespace: "{{ nfd_namespace | default('node-feature-disc node_feature_discovery_helm_repo: "{{ nfd_helm_repo | default('https://kubernetes-sigs.github.io/node-feature-discovery/charts') }}" node_feature_discovery_helm_repo_name: "{{ nfd_helm_repo_name | default('nfd') }}" node_feature_discovery_chart: "{{ nfd_helm_chart | default('nfd/node-feature-discovery') }}" -node_feature_discovery_version: "{{ nfd_version | default('0.17.1') }}" +node_feature_discovery_version: "{{ nfd_version | default('0.20.1') }}" From 427bb68a10db8f9bc4a5b2d51723ddcf667622a1 Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Mon, 30 Nov 2026 03:57:25 -0700 Subject: [PATCH 02/12] fix(postgresql): CNPG 1.30.2 (chart 0.29.2) and PostgreSQL 17.12 pinned CNPG 1.26.1 is end of life (8 critical, 96 high); 1.30.2 has none. The floating postgresql:17 tag ran Debian 11 (17 critical); 17.12-standard-trixie has no fixable critical/high. A re-install moves a running cluster to the pinned image (same major). Signed-off-by: Ahmed, Mushtaq --- roles/postgresql/defaults/main.yaml | 7 ++++--- roles/postgresql/tasks/cluster.yaml | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/roles/postgresql/defaults/main.yaml b/roles/postgresql/defaults/main.yaml index 21ccd52d..089cdcc9 100644 --- a/roles/postgresql/defaults/main.yaml +++ b/roles/postgresql/defaults/main.yaml @@ -8,7 +8,7 @@ # ============================================================================= # CNPG Operator -cnpg_version: "0.25.0" +cnpg_version: "0.29.2" # chart; operator 1.30.2 cnpg_namespace: "cnpg-system" cnpg_helm_repo: "https://cloudnative-pg.github.io/charts" @@ -16,8 +16,9 @@ cnpg_helm_repo: "https://cloudnative-pg.github.io/charts" postgresql_namespace: "postgresql" postgresql_cluster_name: "postgresql" postgresql_instances: 1 -postgresql_version: "17" -postgresql_image: "ghcr.io/cloudnative-pg/postgresql:{{ postgresql_version }}" +postgresql_version: "17.12" +# Pinned build; every database uses C collation, so the OS base can change safely. +postgresql_image: "ghcr.io/cloudnative-pg/postgresql:{{ postgresql_version }}-standard-trixie" postgresql_storage: "10Gi" postgresql_storage_class: "" # empty = default StorageClass diff --git a/roles/postgresql/tasks/cluster.yaml b/roles/postgresql/tasks/cluster.yaml index 63dbe959..b782e054 100644 --- a/roles/postgresql/tasks/cluster.yaml +++ b/roles/postgresql/tasks/cluster.yaml @@ -175,6 +175,24 @@ msg: "PostgreSQL cluster '{{ postgresql_cluster_name }}' already exists — skipping." when: (_pg_cluster_existing.resources | default([]) | length) > 0 +# A re-install moves a running cluster to the pinned image (CNPG rolls the instances); same major only. +- name: "postgresql | Update the running cluster's image" + vars: + _pg_cur_image: "{{ (_pg_cluster_existing.resources | first).spec.imageName | default('') }}" + when: + - (_pg_cluster_existing.resources | default([]) | length) > 0 + - _pg_cur_image != postgresql_image + - (_pg_cur_image.split(':')[-1] | regex_search('^[0-9]+')) == (postgresql_image.split(':')[-1] | regex_search('^[0-9]+')) + kubernetes.core.k8s: + state: patched + api_version: postgresql.cnpg.io/v1 + kind: Cluster + name: "{{ postgresql_cluster_name }}" + namespace: "{{ postgresql_namespace }}" + definition: + spec: + imageName: "{{ postgresql_image }}" + - name: "postgresql | Deploy Cluster" when: (_pg_cluster_existing.resources | default([]) | length) == 0 block: From adc9361b917ea55ef3d62abe49e83db3237c5804 Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Mon, 30 Nov 2026 03:58:28 -0700 Subject: [PATCH 03/12] fix(observability): Grafana 13.0.14, Loki 3.6.23, Tempo 2.9.5, OTel Collector 0.166.0, k8s-sidecar 2.14.3 Same chart versions; image tags pinned to patch releases that clear the critical findings (Grafana 6, Loki 1, Tempo 2, collector 3, sidecars 4). Signed-off-by: Ahmed, Mushtaq --- roles/observability/defaults/main.yaml | 7 ++++++- roles/observability/tasks/install_helm.yaml | 13 +++++++++++++ .../templates/otel-collector-values.yaml.j2 | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/roles/observability/defaults/main.yaml b/roles/observability/defaults/main.yaml index 5a84b5dc..02cb372a 100644 --- a/roles/observability/defaults/main.yaml +++ b/roles/observability/defaults/main.yaml @@ -32,6 +32,11 @@ observability_tempo_version: "1.24.4" observability_otel_collector_version: "0.153.0" # Prometheus Adapter 4.11.0 observability_prometheus_adapter_version: "4.11.0" +# Image tags newer than the charts' defaults: same release lines, CVE fixes. +observability_grafana_image_tag: "13.0.14" +observability_sidecar_image_tag: "2.14.3" # k8s-sidecar for Grafana and Loki +observability_loki_image_tag: "3.6.23" # Loki and its canary +observability_tempo_image_tag: "2.9.5" # ── Grafana ─────────────────────────────────────────────────────────────────── observability_grafana_admin_user: "admin" @@ -150,7 +155,7 @@ observability_openshift_grafana_name: "grafana-platform" observability_openshift_grafana_storage_size: "5Gi" # Loads the grafana_dashboard="1" ConfigMaps from every namespace, as the Grafana # of kube-prometheus-stack does on K8s, and OpenShift's own Kubernetes dashboards. -observability_openshift_sidecar_image: "quay.io/kiwigrid/k8s-sidecar:2.7.3" +observability_openshift_sidecar_image: "quay.io/kiwigrid/k8s-sidecar:{{ observability_sidecar_image_tag }}" # The operator instances, in install order; teardown deletes them in reverse. # ready: the object whose condition shows the instance is up, if not the instance. observability_openshift_instances: diff --git a/roles/observability/tasks/install_helm.yaml b/roles/observability/tasks/install_helm.yaml index d4844d00..c5ae5744 100644 --- a/roles/observability/tasks/install_helm.yaml +++ b/roles/observability/tasks/install_helm.yaml @@ -183,6 +183,8 @@ affinity: "{{ _platform_affinity | default({}) }}" # ── Grafana ───────────────────────────────────────────────────────── grafana: + image: + tag: "{{ observability_grafana_image_tag }}" adminUser: "{{ observability_grafana_admin_user }}" adminPassword: "{{ observability_grafana_admin_password }}" affinity: "{{ _platform_affinity | default({}) }}" @@ -210,6 +212,8 @@ # from ALL namespaces so inference-layer dashboards (llm-inference) # are picked up without manual import. sidecar: + image: + tag: "{{ observability_sidecar_image_tag }}" dashboards: enabled: true searchNamespace: ALL @@ -319,7 +323,15 @@ timeout: "{{ helm_timeout }}" values: deploymentMode: SingleBinary + sidecar: + image: + tag: "{{ observability_sidecar_image_tag }}" + lokiCanary: + image: + tag: "{{ observability_loki_image_tag }}" loki: + image: + tag: "{{ observability_loki_image_tag }}" auth_enabled: false commonConfig: replication_factor: 1 @@ -425,6 +437,7 @@ timeout: "{{ helm_timeout }}" values: tempo: + tag: "{{ observability_tempo_image_tag }}" reportingEnabled: false receivers: otlp: diff --git a/roles/observability/templates/otel-collector-values.yaml.j2 b/roles/observability/templates/otel-collector-values.yaml.j2 index eaae1da6..c6207acb 100644 --- a/roles/observability/templates/otel-collector-values.yaml.j2 +++ b/roles/observability/templates/otel-collector-values.yaml.j2 @@ -20,7 +20,7 @@ service: image: repository: otel/opentelemetry-collector-contrib - tag: "0.152.0" + tag: "0.166.0" affinity: {{ _platform_affinity | default({}) | to_json }} From 4964541571a66b893faaedfc0de7eaf1ec0b5b95 Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Mon, 30 Nov 2026 03:58:50 -0700 Subject: [PATCH 04/12] fix(cert-manager): cert-manager 1.20.5 and istio-csr 0.19.1 cert-manager 1.20.1 images carry 142 high findings (GHSA-8rvj-mm4h-c258 among them); 1.20.5 has none. istio-csr 0.15.1 has a critical grpc finding; 0.19.1 has none. Signed-off-by: Ahmed, Mushtaq --- roles/cert_manager/defaults/main.yaml | 2 +- roles/istio/defaults/main.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/cert_manager/defaults/main.yaml b/roles/cert_manager/defaults/main.yaml index d66aaf8b..46fdf976 100644 --- a/roles/cert_manager/defaults/main.yaml +++ b/roles/cert_manager/defaults/main.yaml @@ -3,7 +3,7 @@ # cert-manager Role Defaults # ============================================================================= -certmanager_version: "1.20.1" +certmanager_version: "1.20.5" certmanager_namespace: "cert-manager" certmanager_helm_repo: "https://charts.jetstack.io" certmanager_wait_timeout: "300s" diff --git a/roles/istio/defaults/main.yaml b/roles/istio/defaults/main.yaml index f91161e7..995ced6e 100644 --- a/roles/istio/defaults/main.yaml +++ b/roles/istio/defaults/main.yaml @@ -38,7 +38,7 @@ istio_csr_helm_repo_name: "jetstack" istio_csr_helm_repo_url: "https://charts.jetstack.io" istio_csr_helm_chart_name: "cert-manager-istio-csr" istio_csr_helm_release_name: "cert-manager-istio-csr" -istio_csr_helm_chart_version: "0.15.1" +istio_csr_helm_chart_version: "0.19.1" istio_csr_wait_timeout: "300s" # ClusterIssuer that signs the istio-ca Certificate. From 03ff36cbab9415d8089d9778142afa58642e9b71 Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Mon, 30 Nov 2026 03:59:35 -0700 Subject: [PATCH 05/12] fix(istio): Istio 1.27.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Latest 1.27 patch: criticals 8→5 across install-cni/pilot (the rest are the image's ca-certificates-bundle, unfixed upstream in any 1.27/1.28 build). Signed-off-by: Ahmed, Mushtaq --- charts/istio/Chart.lock | 12 ++++++------ charts/istio/Chart.yaml | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/charts/istio/Chart.lock b/charts/istio/Chart.lock index 35e6adb1..bea4b9d9 100644 --- a/charts/istio/Chart.lock +++ b/charts/istio/Chart.lock @@ -1,15 +1,15 @@ dependencies: - name: base repository: https://istio-release.storage.googleapis.com/charts - version: 1.27.3 + version: 1.27.9 - name: istiod repository: https://istio-release.storage.googleapis.com/charts - version: 1.27.3 + version: 1.27.9 - name: cni repository: https://istio-release.storage.googleapis.com/charts - version: 1.27.3 + version: 1.27.9 - name: ztunnel repository: https://istio-release.storage.googleapis.com/charts - version: 1.27.3 -digest: sha256:24560b235363f2bb6d6b34ae9a8043dbd0d4f25e3704db84706d5a7d0c29c81b -generated: "2025-10-22T13:52:40.76921683+02:00" + version: 1.27.9 +digest: sha256:e74e0c7b02770f1cea2ffa228eb47ade34e3e6e02198f291a106cbd1d41b7bfb +generated: "2026-11-30T03:59:17.475032538-07:00" diff --git a/charts/istio/Chart.yaml b/charts/istio/Chart.yaml index ae2d6ee8..4598f29d 100644 --- a/charts/istio/Chart.yaml +++ b/charts/istio/Chart.yaml @@ -6,18 +6,18 @@ name: istio description: Istio stack chart yaml type: application version: 1.2.0 -appVersion: "1.27.3" +appVersion: "1.27.9" dependencies: - name: base - version: "1.27.3" + version: "1.27.9" repository: "https://istio-release.storage.googleapis.com/charts" - name: istiod - version: "1.27.3" + version: "1.27.9" repository: "https://istio-release.storage.googleapis.com/charts" - name: cni - version: "1.27.3" + version: "1.27.9" repository: "https://istio-release.storage.googleapis.com/charts" - name: ztunnel - version: "1.27.3" + version: "1.27.9" repository: "https://istio-release.storage.googleapis.com/charts" From 5a46c17dc71c73d3c37237f10ca968596c0bf1ac Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Mon, 30 Nov 2026 03:59:53 -0700 Subject: [PATCH 06/12] =?UTF-8?q?fix(metallb):=20MetalLB=200.16.2=20(speak?= =?UTF-8?q?er/controller=20criticals=204=E2=86=920;=20FRR=2010.4.1?= =?UTF-8?q?=E2=86=9210.5.3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ahmed, Mushtaq --- roles/metallb/defaults/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/metallb/defaults/main.yaml b/roles/metallb/defaults/main.yaml index 8bff17c0..70bf51c4 100644 --- a/roles/metallb/defaults/main.yaml +++ b/roles/metallb/defaults/main.yaml @@ -3,7 +3,7 @@ # MetalLB Role Defaults # ============================================================================= -metallb_version: "0.15.3" +metallb_version: "0.16.2" metallb_namespace: "metallb-system" metallb_helm_repo: "https://metallb.github.io/metallb" metallb_wait_timeout: "300s" From 0085a648d9a97f2b9c8a40126861fc73edf0f476 Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Mon, 30 Nov 2026 04:01:00 -0700 Subject: [PATCH 07/12] fix(seaweedfs): SeaweedFS 4.56 (chart 4.56.0; 4.37 had 1 critical, 51 high, 4.56 none) Signed-off-by: Ahmed, Mushtaq --- roles/seaweedfs/defaults/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/seaweedfs/defaults/main.yaml b/roles/seaweedfs/defaults/main.yaml index f392bab2..2fcca9a1 100644 --- a/roles/seaweedfs/defaults/main.yaml +++ b/roles/seaweedfs/defaults/main.yaml @@ -27,7 +27,7 @@ seaweedfs_helm_repo: "https://seaweedfs.github.io/seaweedfs/helm" # ── Chart version ───────────────────────────────────────────────────────────── # seaweedfs 4.37.0 → SeaweedFS app 4.37 -seaweedfs_chart_version: "4.37.0" +seaweedfs_chart_version: "4.56.0" # ── Storage ─────────────────────────────────────────────────────────────────── # StatefulSet volumeClaimTemplates are immutable: changing a size after the From 7a73df260089ac756fe2163e2f8db33a069f5500 Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Mon, 30 Nov 2026 04:01:34 -0700 Subject: [PATCH 08/12] fix(kubernetes): local-path-provisioner 0.0.37, CoreDNS 1.14.7, dns-autoscaler 1.11.0 Kubespray v2.31.0 defaults (0.0.32 / 1.12.4 / 1.8.8) carry 4, 2 and 4 critical findings; the overrides clear them. Kubernetes 1.35.4 itself stays: newer patches need Kubespray 2.32. Signed-off-by: Ahmed, Mushtaq --- roles/kubernetes/templates/kubespray_extra_auto.yml.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/kubernetes/templates/kubespray_extra_auto.yml.j2 b/roles/kubernetes/templates/kubespray_extra_auto.yml.j2 index 1b956cc0..df1885c0 100644 --- a/roles/kubernetes/templates/kubespray_extra_auto.yml.j2 +++ b/roles/kubernetes/templates/kubespray_extra_auto.yml.j2 @@ -61,6 +61,10 @@ local_path_provisioner_storage_class: "local-path" local_path_provisioner_is_default_storageclass: "{{ _local_path_default | lower }}" local_path_provisioner_claim_root: /opt/local-path-provisioner/ {% endif %} +# Newer than Kubespray v2.31.0's defaults (critical CVEs fixed); env//kubespray_extra.yml overrides +local_path_provisioner_version: "0.0.37" +coredns_version: "1.14.7" +dnsautoscaler_version: "1.11.0" override_system_hostname: false # The precheck raises these on this host only; Kubespray sets them on every node (env//kubespray_extra.yml overrides) additional_sysctl: From 0c8a8eb3eeac74de26b72efd794e2a0be747bf70 Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Mon, 30 Nov 2026 04:50:46 -0700 Subject: [PATCH 09/12] fix: smallest bumps that clear the criticals: istio-csr 0.17.0, SeaweedFS 4.54 istio-csr 0.17.0 is the first release without the grpc critical; SeaweedFS 4.54 is the first with 0 critical and 0 high. Both keep every value we set. Signed-off-by: Ahmed, Mushtaq --- roles/istio/defaults/main.yaml | 2 +- roles/seaweedfs/defaults/main.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/istio/defaults/main.yaml b/roles/istio/defaults/main.yaml index 995ced6e..2ca9af5f 100644 --- a/roles/istio/defaults/main.yaml +++ b/roles/istio/defaults/main.yaml @@ -38,7 +38,7 @@ istio_csr_helm_repo_name: "jetstack" istio_csr_helm_repo_url: "https://charts.jetstack.io" istio_csr_helm_chart_name: "cert-manager-istio-csr" istio_csr_helm_release_name: "cert-manager-istio-csr" -istio_csr_helm_chart_version: "0.19.1" +istio_csr_helm_chart_version: "0.17.0" istio_csr_wait_timeout: "300s" # ClusterIssuer that signs the istio-ca Certificate. diff --git a/roles/seaweedfs/defaults/main.yaml b/roles/seaweedfs/defaults/main.yaml index 2fcca9a1..4f109d0c 100644 --- a/roles/seaweedfs/defaults/main.yaml +++ b/roles/seaweedfs/defaults/main.yaml @@ -27,7 +27,7 @@ seaweedfs_helm_repo: "https://seaweedfs.github.io/seaweedfs/helm" # ── Chart version ───────────────────────────────────────────────────────────── # seaweedfs 4.37.0 → SeaweedFS app 4.37 -seaweedfs_chart_version: "4.56.0" +seaweedfs_chart_version: "4.54.0" # ── Storage ─────────────────────────────────────────────────────────────────── # StatefulSet volumeClaimTemplates are immutable: changing a size after the From 50bb466140a3adc94229d93fe53bc62637b79531 Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Mon, 30 Nov 2026 06:24:17 -0700 Subject: [PATCH 10/12] fix(observability): Tempo 2.9.5 starts: config without the opencensus receiver Tempo 2.9.5 rejects the opencensus receiver that the 1.24.4 chart still lists, and Helm's null cannot remove it. Pass the chart's own config template with opencensus omitted. Signed-off-by: Ahmed, Mushtaq --- roles/observability/defaults/main.yaml | 47 +++++++++++++++++++++ roles/observability/tasks/install_helm.yaml | 2 + 2 files changed, 49 insertions(+) diff --git a/roles/observability/defaults/main.yaml b/roles/observability/defaults/main.yaml index 02cb372a..55d24660 100644 --- a/roles/observability/defaults/main.yaml +++ b/roles/observability/defaults/main.yaml @@ -28,6 +28,53 @@ observability_kube_prometheus_stack_version: "85.3.3" observability_loki_version: "6.55.0" # Tempo 1.24.4 → Tempo app 2.9.0 observability_tempo_version: "1.24.4" +# The chart (1.24.4) default config with opencensus omitted from the receivers; keep in step on chart bumps. +_obs_tempo_config: !unsafe | + memberlist: + cluster_label: "{{ .Release.Name }}.{{ .Release.Namespace }}" + multitenancy_enabled: {{ .Values.tempo.multitenancyEnabled }} + usage_report: + reporting_enabled: {{ .Values.tempo.reportingEnabled }} + compactor: + compaction: + block_retention: {{ .Values.tempo.retention }} + distributor: + receivers: + {{- toYaml (omit .Values.tempo.receivers "opencensus") | nindent 8 }} + ingester: + {{- toYaml .Values.tempo.ingester | nindent 6 }} + server: + {{- toYaml .Values.tempo.server | nindent 6 }} + storage: + {{- toYaml .Values.tempo.storage | nindent 6 }} + querier: + {{- toYaml .Values.tempo.querier | nindent 6 }} + query_frontend: + {{- toYaml .Values.tempo.queryFrontend | nindent 6 }} + overrides: + {{- toYaml .Values.tempo.overrides | nindent 6 }} + {{- if .Values.tempo.metricsGenerator.enabled }} + metrics_generator: + {{- if .Values.tempo.metricsGenerator.processor }} + processor: + {{- toYaml .Values.tempo.metricsGenerator.processor | nindent 8 }} + {{- end }} + {{- if .Values.tempo.metricsGenerator.registry }} + registry: + {{- toYaml .Values.tempo.metricsGenerator.registry | nindent 8 }} + {{- end }} + storage: + path: {{ .Values.tempo.metricsGenerator.storage.path | quote }} + {{- if .Values.tempo.metricsGenerator.storage.remote_write }} + remote_write: + {{- toYaml .Values.tempo.metricsGenerator.storage.remote_write | nindent 10 }} + {{- else }} + remote_write: + - url: {{ .Values.tempo.metricsGenerator.remoteWriteUrl }} + {{- end }} + traces_storage: + path: {{ .Values.tempo.metricsGenerator.traces_storage.path | quote }} + {{- end }} # OpenTelemetry Collector 0.153.0 → otelcol app 0.151.0 observability_otel_collector_version: "0.153.0" # Prometheus Adapter 4.11.0 diff --git a/roles/observability/tasks/install_helm.yaml b/roles/observability/tasks/install_helm.yaml index c5ae5744..d27f2d3f 100644 --- a/roles/observability/tasks/install_helm.yaml +++ b/roles/observability/tasks/install_helm.yaml @@ -436,6 +436,8 @@ wait: "{{ helm_wait }}" timeout: "{{ helm_timeout }}" values: + # Chart config minus the opencensus receiver, which Tempo 2.9.5 rejects. + config: "{{ _obs_tempo_config }}" tempo: tag: "{{ observability_tempo_image_tag }}" reportingEnabled: false From a96b6d238a96c6b3b325e5332ed02205be93efe2 Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Mon, 30 Nov 2026 06:24:18 -0700 Subject: [PATCH 11/12] fix(postgresql): system image keeps python3; wait for the restart before provisioning 17.12-standard-trixie has no python3, which provision_db.py needs on an existing cluster; 17.12-system-trixie is the same build with it (0 fixable critical/high either way). The image patch now waits for CNPG to restart the primary on the new image. Signed-off-by: Ahmed, Mushtaq --- roles/postgresql/defaults/main.yaml | 3 ++- roles/postgresql/tasks/cluster.yaml | 39 +++++++++++++++++++++-------- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/roles/postgresql/defaults/main.yaml b/roles/postgresql/defaults/main.yaml index 089cdcc9..b33f2da8 100644 --- a/roles/postgresql/defaults/main.yaml +++ b/roles/postgresql/defaults/main.yaml @@ -18,7 +18,8 @@ postgresql_cluster_name: "postgresql" postgresql_instances: 1 postgresql_version: "17.12" # Pinned build; every database uses C collation, so the OS base can change safely. -postgresql_image: "ghcr.io/cloudnative-pg/postgresql:{{ postgresql_version }}-standard-trixie" +# "system" keeps python3, which provision_db.py needs on an existing cluster. +postgresql_image: "ghcr.io/cloudnative-pg/postgresql:{{ postgresql_version }}-system-trixie" postgresql_storage: "10Gi" postgresql_storage_class: "" # empty = default StorageClass diff --git a/roles/postgresql/tasks/cluster.yaml b/roles/postgresql/tasks/cluster.yaml index b782e054..26384fb4 100644 --- a/roles/postgresql/tasks/cluster.yaml +++ b/roles/postgresql/tasks/cluster.yaml @@ -176,22 +176,41 @@ when: (_pg_cluster_existing.resources | default([]) | length) > 0 # A re-install moves a running cluster to the pinned image (CNPG rolls the instances); same major only. -- name: "postgresql | Update the running cluster's image" +- name: "postgresql | Move the running cluster to the pinned image" vars: _pg_cur_image: "{{ (_pg_cluster_existing.resources | first).spec.imageName | default('') }}" when: - (_pg_cluster_existing.resources | default([]) | length) > 0 - _pg_cur_image != postgresql_image - (_pg_cur_image.split(':')[-1] | regex_search('^[0-9]+')) == (postgresql_image.split(':')[-1] | regex_search('^[0-9]+')) - kubernetes.core.k8s: - state: patched - api_version: postgresql.cnpg.io/v1 - kind: Cluster - name: "{{ postgresql_cluster_name }}" - namespace: "{{ postgresql_namespace }}" - definition: - spec: - imageName: "{{ postgresql_image }}" + block: + - name: "postgresql | Update the running cluster's image" + kubernetes.core.k8s: + state: patched + api_version: postgresql.cnpg.io/v1 + kind: Cluster + name: "{{ postgresql_cluster_name }}" + namespace: "{{ postgresql_namespace }}" + definition: + spec: + imageName: "{{ postgresql_image }}" + + # CNPG restarts the primary after clients drain; provisioning must reach the new pod. + - name: "postgresql | Wait for the primary on the pinned image" + kubernetes.core.k8s_info: + kind: Pod + namespace: "{{ postgresql_namespace }}" + label_selectors: + - "cnpg.io/cluster={{ postgresql_cluster_name }}" + - "cnpg.io/instanceRole=primary" + register: _pg_primary + until: >- + (_pg_primary.resources | length) > 0 + and (_pg_primary.resources | first).metadata.deletionTimestamp is not defined + and ((_pg_primary.resources | first).spec.containers | selectattr('name', 'eq', 'postgres') | map(attribute='image') | first) == postgresql_image + and ((_pg_primary.resources | first).status.containerStatuses | default([]) | selectattr('name', 'eq', 'postgres') | map(attribute='ready') | first | default(false)) + retries: 90 + delay: 10 - name: "postgresql | Deploy Cluster" when: (_pg_cluster_existing.resources | default([]) | length) == 0 From 0488dd3120a598e0d3173ea970b9e825b3c4e60b Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Mon, 30 Nov 2026 21:34:07 -0700 Subject: [PATCH 12/12] fix(postgresql): new image on fresh installs only, like the other bumps; review fixes - Drop the in-place Cluster image patch: the CNPG operator is install-once, so an existing env would run the new image under the EOL 1.26 operator. - Test the Kubespray image pins on every storage backend. - OTel Collector image tag in defaults with the other image tags; stale chart/app version comments updated. Signed-off-by: Ahmed, Mushtaq --- roles/observability/defaults/main.yaml | 9 +++-- .../templates/otel-collector-values.yaml.j2 | 2 +- roles/postgresql/defaults/main.yaml | 6 +-- roles/postgresql/tasks/cluster.yaml | 37 ------------------- roles/seaweedfs/defaults/main.yaml | 2 +- src/tests/unit/test_kubernetes_templates.py | 7 ++++ 6 files changed, 17 insertions(+), 46 deletions(-) diff --git a/roles/observability/defaults/main.yaml b/roles/observability/defaults/main.yaml index 55d24660..ca417599 100644 --- a/roles/observability/defaults/main.yaml +++ b/roles/observability/defaults/main.yaml @@ -24,9 +24,9 @@ observability_otel_helm_repo: "https://open-telemetry.github.io/opentelemetry-he # kube-prometheus-stack 85.3.3 → Prometheus Operator v0.90.1, Prometheus v3.11.3, # Alertmanager v0.32.1, Grafana 13.0.1-security-01 observability_kube_prometheus_stack_version: "85.3.3" -# Loki 6.55.0 → Loki app 3.6.7 +# Loki chart 6.55.0 (image tag below) observability_loki_version: "6.55.0" -# Tempo 1.24.4 → Tempo app 2.9.0 +# Tempo chart 1.24.4 (image tag below) observability_tempo_version: "1.24.4" # The chart (1.24.4) default config with opencensus omitted from the receivers; keep in step on chart bumps. _obs_tempo_config: !unsafe | @@ -75,15 +75,16 @@ _obs_tempo_config: !unsafe | traces_storage: path: {{ .Values.tempo.metricsGenerator.traces_storage.path | quote }} {{- end }} -# OpenTelemetry Collector 0.153.0 → otelcol app 0.151.0 +# OpenTelemetry Collector chart 0.153.0 (image tag below) observability_otel_collector_version: "0.153.0" # Prometheus Adapter 4.11.0 observability_prometheus_adapter_version: "4.11.0" -# Image tags newer than the charts' defaults: same release lines, CVE fixes. +# Newer than the charts' default images, for CVE fixes. observability_grafana_image_tag: "13.0.14" observability_sidecar_image_tag: "2.14.3" # k8s-sidecar for Grafana and Loki observability_loki_image_tag: "3.6.23" # Loki and its canary observability_tempo_image_tag: "2.9.5" +observability_otel_collector_image_tag: "0.166.0" # ── Grafana ─────────────────────────────────────────────────────────────────── observability_grafana_admin_user: "admin" diff --git a/roles/observability/templates/otel-collector-values.yaml.j2 b/roles/observability/templates/otel-collector-values.yaml.j2 index c6207acb..b732b1a6 100644 --- a/roles/observability/templates/otel-collector-values.yaml.j2 +++ b/roles/observability/templates/otel-collector-values.yaml.j2 @@ -20,7 +20,7 @@ service: image: repository: otel/opentelemetry-collector-contrib - tag: "0.166.0" + tag: "{{ observability_otel_collector_image_tag }}" affinity: {{ _platform_affinity | default({}) | to_json }} diff --git a/roles/postgresql/defaults/main.yaml b/roles/postgresql/defaults/main.yaml index b33f2da8..9cbb9cb8 100644 --- a/roles/postgresql/defaults/main.yaml +++ b/roles/postgresql/defaults/main.yaml @@ -7,8 +7,8 @@ # Each consumer gets its own database + credentials. # ============================================================================= -# CNPG Operator -cnpg_version: "0.29.2" # chart; operator 1.30.2 +# CNPG Operator: chart 0.29.2 → operator 1.30.2 +cnpg_version: "0.29.2" cnpg_namespace: "cnpg-system" cnpg_helm_repo: "https://cloudnative-pg.github.io/charts" @@ -18,7 +18,7 @@ postgresql_cluster_name: "postgresql" postgresql_instances: 1 postgresql_version: "17.12" # Pinned build; every database uses C collation, so the OS base can change safely. -# "system" keeps python3, which provision_db.py needs on an existing cluster. +# "system" keeps python3, which provision_db.py needs on a re-run. postgresql_image: "ghcr.io/cloudnative-pg/postgresql:{{ postgresql_version }}-system-trixie" postgresql_storage: "10Gi" postgresql_storage_class: "" # empty = default StorageClass diff --git a/roles/postgresql/tasks/cluster.yaml b/roles/postgresql/tasks/cluster.yaml index 26384fb4..63dbe959 100644 --- a/roles/postgresql/tasks/cluster.yaml +++ b/roles/postgresql/tasks/cluster.yaml @@ -175,43 +175,6 @@ msg: "PostgreSQL cluster '{{ postgresql_cluster_name }}' already exists — skipping." when: (_pg_cluster_existing.resources | default([]) | length) > 0 -# A re-install moves a running cluster to the pinned image (CNPG rolls the instances); same major only. -- name: "postgresql | Move the running cluster to the pinned image" - vars: - _pg_cur_image: "{{ (_pg_cluster_existing.resources | first).spec.imageName | default('') }}" - when: - - (_pg_cluster_existing.resources | default([]) | length) > 0 - - _pg_cur_image != postgresql_image - - (_pg_cur_image.split(':')[-1] | regex_search('^[0-9]+')) == (postgresql_image.split(':')[-1] | regex_search('^[0-9]+')) - block: - - name: "postgresql | Update the running cluster's image" - kubernetes.core.k8s: - state: patched - api_version: postgresql.cnpg.io/v1 - kind: Cluster - name: "{{ postgresql_cluster_name }}" - namespace: "{{ postgresql_namespace }}" - definition: - spec: - imageName: "{{ postgresql_image }}" - - # CNPG restarts the primary after clients drain; provisioning must reach the new pod. - - name: "postgresql | Wait for the primary on the pinned image" - kubernetes.core.k8s_info: - kind: Pod - namespace: "{{ postgresql_namespace }}" - label_selectors: - - "cnpg.io/cluster={{ postgresql_cluster_name }}" - - "cnpg.io/instanceRole=primary" - register: _pg_primary - until: >- - (_pg_primary.resources | length) > 0 - and (_pg_primary.resources | first).metadata.deletionTimestamp is not defined - and ((_pg_primary.resources | first).spec.containers | selectattr('name', 'eq', 'postgres') | map(attribute='image') | first) == postgresql_image - and ((_pg_primary.resources | first).status.containerStatuses | default([]) | selectattr('name', 'eq', 'postgres') | map(attribute='ready') | first | default(false)) - retries: 90 - delay: 10 - - name: "postgresql | Deploy Cluster" when: (_pg_cluster_existing.resources | default([]) | length) == 0 block: diff --git a/roles/seaweedfs/defaults/main.yaml b/roles/seaweedfs/defaults/main.yaml index 4f109d0c..2a7f62f7 100644 --- a/roles/seaweedfs/defaults/main.yaml +++ b/roles/seaweedfs/defaults/main.yaml @@ -26,7 +26,7 @@ seaweedfs_release_name: "telemetry" seaweedfs_helm_repo: "https://seaweedfs.github.io/seaweedfs/helm" # ── Chart version ───────────────────────────────────────────────────────────── -# seaweedfs 4.37.0 → SeaweedFS app 4.37 +# seaweedfs 4.54.0 → SeaweedFS app 4.54 seaweedfs_chart_version: "4.54.0" # ── Storage ─────────────────────────────────────────────────────────────────── diff --git a/src/tests/unit/test_kubernetes_templates.py b/src/tests/unit/test_kubernetes_templates.py index 44b204ee..1fe78cbd 100644 --- a/src/tests/unit/test_kubernetes_templates.py +++ b/src/tests/unit/test_kubernetes_templates.py @@ -94,6 +94,13 @@ def test_no_local_path_class_on_other_backends(): assert "local_path_provisioner_enabled" not in extra_auto(_resolved_storage_backend="ceph") +@pytest.mark.parametrize("backend", ["local-path", "ceph"]) +def test_cve_fixed_image_pins_on_every_backend(backend): + values = extra_auto(_resolved_storage_backend=backend) + assert {k: values[k] for k in ("local_path_provisioner_version", "coredns_version", "dnsautoscaler_version")} == { + "local_path_provisioner_version": "0.0.37", "coredns_version": "1.14.7", "dnsautoscaler_version": "1.11.0"} + + def test_inotify_limits_on_every_node(): sysctl = {item["name"]: item["value"] for item in extra_auto()["additional_sysctl"]} assert sysctl == {"fs.inotify.max_user_instances": 8192, "fs.inotify.max_user_watches": 1048576}