From 47243f58102952bb8107081b1d08c0564dae716b Mon Sep 17 00:00:00 2001 From: Yurii Prokulevych Date: Thu, 20 Aug 2026 12:59:51 +0200 Subject: [PATCH] Allow hub side templating for image pre-caching. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hub side templating in a form of: pinnedImages: '{{hub fromConfigMap "" "pinned-imagesets" "controlplane-release-images" | toLiteral hub}}' fails as kustomize fails to apply patches: wrong node kind: expected MappingNode but got ScalarNode: Root cause: the base CR has pinnedImages: {} (a mapping). The hub template is a string (scalar). Kustomize strategic-merge patches cannot change node kind (MappingNode → ScalarNode), so the build fails even with the correct template syntax. Signed-off-by: Yurii Prokulevych --- .../optional/other/precache/controlplane-olm-pinned-images.yaml | 2 +- .../other/precache/controlplane-releases-pinned-images.yaml | 2 +- .../optional/other/precache/worker-olm-pinned-images.yaml | 2 +- .../optional/other/precache/worker-releases-pinned-images.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/telco-core/configuration/reference-crs/optional/other/precache/controlplane-olm-pinned-images.yaml b/telco-core/configuration/reference-crs/optional/other/precache/controlplane-olm-pinned-images.yaml index 06c829496..642227366 100644 --- a/telco-core/configuration/reference-crs/optional/other/precache/controlplane-olm-pinned-images.yaml +++ b/telco-core/configuration/reference-crs/optional/other/precache/controlplane-olm-pinned-images.yaml @@ -9,7 +9,7 @@ spec: # Replace the pinnedImages list below with the actual images required for # your target release(s). Use patches in the PolicyGenerator to override # this list with environment-specific image digests. - pinnedImages: {} + pinnedImages: "" # - name: "registry.redhat.io/redhat/redhat-operator-index@sha256:..." # - name: "registry.redhat.io/odf4/odf-rhel9-operator@sha256:..." # - name: "registry.redhat.io/openshift4/ose-sriov-network-rhel9-operator@sha256:..." diff --git a/telco-core/configuration/reference-crs/optional/other/precache/controlplane-releases-pinned-images.yaml b/telco-core/configuration/reference-crs/optional/other/precache/controlplane-releases-pinned-images.yaml index 619880775..4c2d03d5d 100644 --- a/telco-core/configuration/reference-crs/optional/other/precache/controlplane-releases-pinned-images.yaml +++ b/telco-core/configuration/reference-crs/optional/other/precache/controlplane-releases-pinned-images.yaml @@ -9,7 +9,7 @@ spec: # Replace the pinnedImages list below with the actual release images required # for your target release(s). Use patches in the PolicyGenerator to override # this list with environment-specific image digests. - pinnedImages: {} + pinnedImages: "" # - name: "quay.io/openshift-release-dev/ocp-release@sha256:..." # - name: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:..." # - name: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:..." diff --git a/telco-core/configuration/reference-crs/optional/other/precache/worker-olm-pinned-images.yaml b/telco-core/configuration/reference-crs/optional/other/precache/worker-olm-pinned-images.yaml index 42135db1b..21f0b604a 100644 --- a/telco-core/configuration/reference-crs/optional/other/precache/worker-olm-pinned-images.yaml +++ b/telco-core/configuration/reference-crs/optional/other/precache/worker-olm-pinned-images.yaml @@ -9,7 +9,7 @@ spec: # Replace the pinnedImages list below with the actual images required for # your target release(s). Use patches in the PolicyGenerator to override # this list with environment-specific image digests. - pinnedImages: {} + pinnedImages: "" # - name: "registry.redhat.io/redhat/redhat-operator-index@sha256:..." # - name: "registry.redhat.io/odf4/odf-rhel9-operator@sha256:..." # - name: "registry.redhat.io/openshift4/ose-sriov-network-rhel9-operator@sha256:..." diff --git a/telco-core/configuration/reference-crs/optional/other/precache/worker-releases-pinned-images.yaml b/telco-core/configuration/reference-crs/optional/other/precache/worker-releases-pinned-images.yaml index 14a21bdfa..91a99f725 100644 --- a/telco-core/configuration/reference-crs/optional/other/precache/worker-releases-pinned-images.yaml +++ b/telco-core/configuration/reference-crs/optional/other/precache/worker-releases-pinned-images.yaml @@ -9,7 +9,7 @@ spec: # Replace the pinnedImages list below with the actual release images required # for your target release(s). Use patches in the PolicyGenerator to override # this list with environment-specific image digests. - pinnedImages: {} + pinnedImages: "" # - name: "quay.io/openshift-release-dev/ocp-release@sha256:..." # - name: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:..." # - name: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:..."