From 05c35a2ecd46f04eace1a9bae5561818259aa1bd Mon Sep 17 00:00:00 2001 From: Gustavo Ornaghi Antunes Date: Fri, 5 Sep 2025 11:51:08 -0300 Subject: [PATCH] Fix image format for rook-ceph app This change ensures that the images used by rook-ceph app is following kube_app expected format by adding the prefix 'registry.local'. This prevents the environment from always pulling images from the public registry. Test Plan: - PASS: Build rook-ceph app - PASS: Apply rook-ceph app with the changes - PASS: Update from a old rook-ceph app to a new one - PASS: Check if the images was downloaded with prefix registry.local - PASS: Check if all pods from rook-ceph is using the images with prefix registry.local Closes-Bug: 2122134 Change-Id: I71dbc164c5091ea5e2a05ff7d4c486022f1e23ec Signed-off-by: Gustavo Ornaghi Antunes --- .../patches/0004-adjust-image-format.patch | 117 ++++++++++++++++++ .../debian/deb_folder/patches/series | 1 + .../rook-ceph/rook-ceph-static-overrides.yaml | 35 ++---- 3 files changed, 129 insertions(+), 24 deletions(-) create mode 100644 helm-charts/upstream/rook-ceph-helm/debian/deb_folder/patches/0004-adjust-image-format.patch diff --git a/helm-charts/upstream/rook-ceph-helm/debian/deb_folder/patches/0004-adjust-image-format.patch b/helm-charts/upstream/rook-ceph-helm/debian/deb_folder/patches/0004-adjust-image-format.patch new file mode 100644 index 0000000..fe6f170 --- /dev/null +++ b/helm-charts/upstream/rook-ceph-helm/debian/deb_folder/patches/0004-adjust-image-format.patch @@ -0,0 +1,117 @@ +From 209e9e239d583370dad590145035b4fe056a3d90 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Fri, 5 Sep 2025 10:15:08 -0300 +Subject: [PATCH] Adjust image format to match kube_app image format + +This patch changes all image references currently using an unexpected +format to ensure compatibility with the format expected by kube_app. + +Signed-off-by: Gustavo Ornaghi Antunes +--- + .../charts/rook-ceph/templates/configmap.yaml | 24 +++++++++---------- + deploy/charts/rook-ceph/values.yaml | 24 +++++-------------- + 2 files changed, 18 insertions(+), 30 deletions(-) + +diff --git a/deploy/charts/rook-ceph/templates/configmap.yaml b/deploy/charts/rook-ceph/templates/configmap.yaml +index 119e58f..0c6a449 100644 +--- a/deploy/charts/rook-ceph/templates/configmap.yaml ++++ b/deploy/charts/rook-ceph/templates/configmap.yaml +@@ -89,33 +89,33 @@ data: + CSI_LEADER_ELECTION_RETRY_PERIOD: {{ .Values.csi.csiLeaderElectionRetryPeriod | quote }} + {{- end }} + {{- if .Values.csi.cephcsi }} +-{{- if and .Values.csi.cephcsi.repository .Values.csi.cephcsi.tag }} +- ROOK_CSI_CEPH_IMAGE: "{{ .Values.csi.cephcsi.repository }}:{{ .Values.csi.cephcsi.tag }}" ++{{- if .Values.csi.cephcsi.image }} ++ ROOK_CSI_CEPH_IMAGE: "{{ .Values.csi.cephcsi.image }}" + {{- end }} + {{- end }} + {{- if .Values.csi.registrar }} +-{{- if and .Values.csi.registrar.repository .Values.csi.registrar.tag }} +- ROOK_CSI_REGISTRAR_IMAGE: "{{ .Values.csi.registrar.repository }}:{{ .Values.csi.registrar.tag }}" ++{{- if .Values.csi.registrar.image }} ++ ROOK_CSI_REGISTRAR_IMAGE: "{{ .Values.csi.registrar.image }}" + {{- end }} + {{- end }} + {{- if .Values.csi.provisioner }} +-{{- if and .Values.csi.provisioner.repository .Values.csi.provisioner.tag }} +- ROOK_CSI_PROVISIONER_IMAGE: "{{ .Values.csi.provisioner.repository }}:{{ .Values.csi.provisioner.tag }}" ++{{- if .Values.csi.provisioner.image }} ++ ROOK_CSI_PROVISIONER_IMAGE: "{{ .Values.csi.provisioner.image }}" + {{- end }} + {{- end }} + {{- if .Values.csi.snapshotter }} +-{{- if and .Values.csi.snapshotter.repository .Values.csi.snapshotter.tag }} +- ROOK_CSI_SNAPSHOTTER_IMAGE: "{{ .Values.csi.snapshotter.repository }}:{{ .Values.csi.snapshotter.tag }}" ++{{- if .Values.csi.snapshotter.image }} ++ ROOK_CSI_SNAPSHOTTER_IMAGE: "{{ .Values.csi.snapshotter.image }}" + {{- end }} + {{- end }} + {{- if .Values.csi.attacher }} +-{{- if and .Values.csi.attacher.repository .Values.csi.attacher.tag }} +- ROOK_CSI_ATTACHER_IMAGE: "{{ .Values.csi.attacher.repository }}:{{ .Values.csi.attacher.tag }}" ++{{- if .Values.csi.attacher.image }} ++ ROOK_CSI_ATTACHER_IMAGE: "{{ .Values.csi.attacher.image }}" + {{- end }} + {{- end }} + {{- if .Values.csi.resizer }} +-{{- if and .Values.csi.resizer.repository .Values.csi.resizer.tag }} +- ROOK_CSI_RESIZER_IMAGE: "{{ .Values.csi.resizer.repository }}:{{ .Values.csi.resizer.tag }}" ++{{- if .Values.csi.resizer.image }} ++ ROOK_CSI_RESIZER_IMAGE: "{{ .Values.csi.resizer.image }}" + {{- end }} + {{- end }} + {{- if .Values.csi.imagePullPolicy }} +diff --git a/deploy/charts/rook-ceph/values.yaml b/deploy/charts/rook-ceph/values.yaml +index e116551..154b940 100644 +--- a/deploy/charts/rook-ceph/values.yaml ++++ b/deploy/charts/rook-ceph/values.yaml +@@ -487,39 +487,27 @@ csi: + + cephcsi: + # -- Ceph CSI image repository +- repository: quay.io/cephcsi/cephcsi +- # -- Ceph CSI image tag +- tag: v3.13.1 ++ image: quay.io/cephcsi/cephcsi:v3.13.1 + + registrar: + # -- Kubernetes CSI registrar image repository +- repository: registry.k8s.io/sig-storage/csi-node-driver-registrar +- # -- Registrar image tag +- tag: v2.13.0 ++ image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0 + + provisioner: + # -- Kubernetes CSI provisioner image repository +- repository: registry.k8s.io/sig-storage/csi-provisioner +- # -- Provisioner image tag +- tag: v5.1.0 ++ image: registry.k8s.io/sig-storage/csi-provisioner:v5.1.0 + + snapshotter: + # -- Kubernetes CSI snapshotter image repository +- repository: registry.k8s.io/sig-storage/csi-snapshotter +- # -- Snapshotter image tag +- tag: v8.2.0 ++ image: registry.k8s.io/sig-storage/csi-snapshotter:v8.2.0 + + attacher: + # -- Kubernetes CSI Attacher image repository +- repository: registry.k8s.io/sig-storage/csi-attacher +- # -- Attacher image tag +- tag: v4.8.0 ++ image: registry.k8s.io/sig-storage/csi-attacher:v4.8.0 + + resizer: + # -- Kubernetes CSI resizer image repository +- repository: registry.k8s.io/sig-storage/csi-resizer +- # -- Resizer image tag +- tag: v1.13.1 ++ image: registry.k8s.io/sig-storage/csi-resizer:v1.13.1 + + # -- Image pull policy + imagePullPolicy: IfNotPresent +-- +2.34.1 + diff --git a/helm-charts/upstream/rook-ceph-helm/debian/deb_folder/patches/series b/helm-charts/upstream/rook-ceph-helm/debian/deb_folder/patches/series index 2267182..f635e17 100644 --- a/helm-charts/upstream/rook-ceph-helm/debian/deb_folder/patches/series +++ b/helm-charts/upstream/rook-ceph-helm/debian/deb_folder/patches/series @@ -1,3 +1,4 @@ 0001-Add-chart-for-duplex-preparation.patch 0002-Add-starlingx-label-to-operator-and-toolbox-pod.patch 0003-Add-support-ceph-dashboard.patch +0004-adjust-image-format.patch diff --git a/stx-rook-ceph-helm/stx-rook-ceph-helm/fluxcd-manifests/rook-ceph/rook-ceph-static-overrides.yaml b/stx-rook-ceph-helm/stx-rook-ceph-helm/fluxcd-manifests/rook-ceph/rook-ceph-static-overrides.yaml index 8b66015..f5368a7 100644 --- a/stx-rook-ceph-helm/stx-rook-ceph-helm/fluxcd-manifests/rook-ceph/rook-ceph-static-overrides.yaml +++ b/stx-rook-ceph-helm/stx-rook-ceph-helm/fluxcd-manifests/rook-ceph/rook-ceph-static-overrides.yaml @@ -43,40 +43,27 @@ csi: cephcsi: # -- Ceph CSI image - repository: quay.io/cephcsi/cephcsi - # -- Ceph CSI image tag - tag: v3.13.1 + image: quay.io/cephcsi/cephcsi:v3.13.1 registrar: - # -- Kubernetes CSI registrar image repository - repository: registry.k8s.io/sig-storage/csi-node-driver-registrar - # -- Registrar image tag - tag: v2.13.0 + # -- Kubernetes CSI registrar image + image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0 provisioner: - # -- Kubernetes CSI provisioner image repository - repository: registry.k8s.io/sig-storage/csi-provisioner - # -- Provisioner image tag - tag: v5.1.0 + # -- Kubernetes CSI provisioner image + image: registry.k8s.io/sig-storage/csi-provisioner:v5.1.0 snapshotter: - # -- Kubernetes CSI snapshotter image repository - repository: registry.k8s.io/sig-storage/csi-snapshotter - # -- Snapshotter image tag - tag: v8.2.0 + # -- Kubernetes CSI snapshotter image + image: registry.k8s.io/sig-storage/csi-snapshotter:v8.2.0 attacher: - # -- Kubernetes CSI Attacher image repository - repository: registry.k8s.io/sig-storage/csi-attacher - # -- Attacher image tag - tag: v4.8.0 + # -- Kubernetes CSI Attacher image + image: registry.k8s.io/sig-storage/csi-attacher:v4.8.0 resizer: - # -- Kubernetes CSI resizer image repository - repository: registry.k8s.io/sig-storage/csi-resizer - # -- Resizer image tag - tag: v1.13.1 - + # -- Kubernetes CSI resizer image + image: registry.k8s.io/sig-storage/csi-resizer:v1.13.1 # -- Labels to add to the CSI CephFS Deployments and DaemonSets Pods cephfsPodLabels: app.starlingx.io/component=platform