diff --git a/.github/workflows/cncf-conformance.yaml b/.github/workflows/cncf-conformance.yaml index e485ed96..e8dd3784 100644 --- a/.github/workflows/cncf-conformance.yaml +++ b/.github/workflows/cncf-conformance.yaml @@ -81,14 +81,6 @@ jobs: sudo podman exec "${node}" systemctl disable firewalld || true done - # Set default storage class for CNCF conformance tests - echo "Setting default storage class annotation..." - make env CMD="kubectl annotate storageclass topolvm-provisioner storageclass.kubernetes.io/is-default-class=true" - - # Verify the annotation was applied - echo "Verifying default storage class:" - make env CMD="kubectl get storageclass topolvm-provisioner -o yaml | grep -A2 annotations" - - name: Run CNCF conformance tests with Sonobuoy id: run-sonobuoy shell: bash diff --git a/src/topolvm/assets/02-topolvm.yaml b/src/topolvm/assets/02-topolvm.yaml index 731324cf..087aa584 100644 --- a/src/topolvm/assets/02-topolvm.yaml +++ b/src/topolvm/assets/02-topolvm.yaml @@ -83,6 +83,7 @@ kind: StorageClass metadata: name: topolvm-provisioner annotations: + storageclass.kubernetes.io/is-default-class: "true" labels: helm.sh/chart: topolvm-15.5.2 app.kubernetes.io/name: topolvm diff --git a/src/topolvm/generate_manifests.sh b/src/topolvm/generate_manifests.sh index 22ffb28e..6b17b069 100755 --- a/src/topolvm/generate_manifests.sh +++ b/src/topolvm/generate_manifests.sh @@ -42,7 +42,12 @@ EOF # Patch replicas to 1 # shellcheck disable=SC2016 yq 'select(.kind == "Deployment").spec.replicas = 1' -i "${ASSETS_DIR}/02-topolvm.yaml" - + + # Annotate topolvm-provisioner StorageClass as default + yq 'with(select(.kind == "StorageClass" and .metadata.name == "topolvm-provisioner"); + .metadata.annotations."storageclass.kubernetes.io/is-default-class" = "true" + )' -i "${ASSETS_DIR}/02-topolvm.yaml" + # Patch topolvm-controller manifest with longer startup delay to allow dns to start yq 'with(select(.kind == "Deployment" and .metadata.name == "topolvm-controller").spec.template.spec.containers[] | select(.name == "topolvm-controller"); .livenessProbe.failureThreshold = 3 |