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`