Skip to content

Commit 14b30cc

Browse files
authored
Merge pull request #175 from kasturinarra/fix_issue_174
ISSUE-174: Annotate topolvm-provisioner sc as default
2 parents e9f5435 + 3737052 commit 14b30cc

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

.github/workflows/cncf-conformance.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,6 @@ jobs:
8181
sudo podman exec "${node}" systemctl disable firewalld || true
8282
done
8383
84-
# Set default storage class for CNCF conformance tests
85-
echo "Setting default storage class annotation..."
86-
make env CMD="kubectl annotate storageclass topolvm-provisioner storageclass.kubernetes.io/is-default-class=true"
87-
88-
# Verify the annotation was applied
89-
echo "Verifying default storage class:"
90-
make env CMD="kubectl get storageclass topolvm-provisioner -o yaml | grep -A2 annotations"
91-
9284
- name: Run CNCF conformance tests with Sonobuoy
9385
id: run-sonobuoy
9486
shell: bash

src/topolvm/assets/02-topolvm.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ kind: StorageClass
8383
metadata:
8484
name: topolvm-provisioner
8585
annotations:
86+
storageclass.kubernetes.io/is-default-class: "true"
8687
labels:
8788
helm.sh/chart: topolvm-15.5.2
8889
app.kubernetes.io/name: topolvm

src/topolvm/generate_manifests.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ EOF
4242
# Patch replicas to 1
4343
# shellcheck disable=SC2016
4444
yq 'select(.kind == "Deployment").spec.replicas = 1' -i "${ASSETS_DIR}/02-topolvm.yaml"
45-
45+
46+
# Annotate topolvm-provisioner StorageClass as default
47+
yq 'with(select(.kind == "StorageClass" and .metadata.name == "topolvm-provisioner");
48+
.metadata.annotations."storageclass.kubernetes.io/is-default-class" = "true"
49+
)' -i "${ASSETS_DIR}/02-topolvm.yaml"
50+
4651
# Patch topolvm-controller manifest with longer startup delay to allow dns to start
4752
yq 'with(select(.kind == "Deployment" and .metadata.name == "topolvm-controller").spec.template.spec.containers[] | select(.name == "topolvm-controller");
4853
.livenessProbe.failureThreshold = 3 |

0 commit comments

Comments
 (0)