From 08a9c41e1dde756db582044fb13221e5fb40c847 Mon Sep 17 00:00:00 2001 From: Brad House Date: Sun, 29 Nov 2026 14:20:48 +0000 Subject: [PATCH] CKS: split the glued document separator in the CSI driver manifest The manifest.yaml of cloudstack-csi-driver v3.0.0, which the binaries ISO builder downloads, ends line 121 with the document separator: apiGroup: rbac.authorization.k8s.io--- That merges the cloudstack-csi-snapshotter-binding ClusterRoleBinding into the CSIDriver document that follows it. The API server refuses the merged document, so deploy-csi-driver's kubectl apply fails and a cluster created with the CSI driver has neither the CSIDriver object nor that binding. The failure is not reported: the script's retry finds the controller pod from the partial apply and exits 0, so any other apply failure would be hidden the same way. Put the separator on a line of its own when the control node copies the manifest from the ISO. This covers clusters on ISOs that were already built. On a manifest without the glued separator the sed changes nothing. Signed-off-by: Brad House --- .../src/main/resources/conf/k8s-control-node.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml b/plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml index 70291dd1c35a..46b2be3f65a5 100644 --- a/plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml +++ b/plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml @@ -183,6 +183,9 @@ write_files: mkdir -p /opt/csi cp "${BINARIES_DIR}/snapshot-crds.yaml" /opt/csi/snapshot-crds.yaml cp "${BINARIES_DIR}/manifest.yaml" /opt/csi/manifest.yaml + # The CSI driver's v3.0.0 manifest ends a line with the document separator ("rbac.authorization.k8s.io---"), + # which merges its snapshotter ClusterRoleBinding into the CSIDriver, so kubectl applies neither of them + sed -i '/^[[:space:]]*#/!s/^\(.*[^-[:space:]]\)---$/\1\n---/' /opt/csi/manifest.yaml fi PAUSE_IMAGE=`ctr -n k8s.io images ls -q | grep "pause" | sort | tail -n 1`