Skip to content

Add CreateDefaultStorageClass#9

Merged
mrwesadex-flant merged 6 commits intomainfrom
vkarpochev-add-default-storage-class
Mar 25, 2026
Merged

Add CreateDefaultStorageClass#9
mrwesadex-flant merged 6 commits intomainfrom
vkarpochev-add-default-storage-class

Conversation

@viktor-karpochev
Copy link
Copy Markdown
Contributor

No description provided.

@AleksZimin AleksZimin changed the base branch from testing-all-csi to main March 11, 2026 09:52
@AleksZimin AleksZimin changed the base branch from main to testing-all-csi March 11, 2026 09:53
Base automatically changed from testing-all-csi to main March 11, 2026 10:45
@viktor-karpochev viktor-karpochev force-pushed the vkarpochev-add-default-storage-class branch 4 times, most recently from 60d73e3 to 84bdaf3 Compare March 19, 2026 10:20
@viktor-karpochev viktor-karpochev force-pushed the vkarpochev-add-default-storage-class branch from 84bdaf3 to fdef01d Compare March 23, 2026 14:16
- Add CreateDefaultStorageClass in pkg/testkit/storageclass.go with IncludeMasters
  support and graceful skipping of tainted master nodes
- Add BlockDevice and LocalStorageClass Kubernetes helpers
- Add GetAllNodeNames, GetWorkerNodeNames, NodeHasUnschedulableTaint to nodes.go

Signed-off-by: Viktor Karpochev <[email protected]>
Made-with: Cursor
Signed-off-by: viktor-karpochev <[email protected]>
Signed-off-by: viktor-karpochev <[email protected]>
…tion

- Add EnsureDefaultStorageClass: idempotent wrapper that checks for existing
  StorageClass before creating, then sets it as cluster default via global
  ModuleConfig (spec.settings.storageClass)
- Add GetDefaultStorageClassName, StorageClassExists, SetGlobalDefaultStorageClass
  helpers in pkg/kubernetes/storageclass.go

Signed-off-by: Viktor Karpochev <[email protected]>
Made-with: Cursor
@viktor-karpochev viktor-karpochev force-pushed the vkarpochev-add-default-storage-class branch from 93b41d5 to bd79f8a Compare March 25, 2026 08:33
Comment thread pkg/kubernetes/localstorageclass.go
Comment thread pkg/kubernetes/storageclass.go
Comment thread pkg/kubernetes/storageclass.go Outdated
Comment thread pkg/testkit/storageclass.go Outdated
mrwesadex-flant and others added 2 commits March 25, 2026 14:15
- Updated WaitForLocalStorageClassCreated and WaitForStorageClass to use context with timeout and ticker for better control over waiting periods.
- Renamed GetAllNodeNames to GetNodes and GetWorkerNodeNames to GetWorkerNodes, returning corev1.Node objects instead of just names.
- Introduced GetNodeTaints and IsNodeCordoned functions for improved node taint management.
- Updated CreateDefaultStorageClass to handle corev1.Node objects and check for cordoned nodes.
Previously returned an error on NotFound, causing EnsureDefaultStorageClass
to fail instead of proceeding to create the StorageClass.

Signed-off-by: Viktor Karpochev <[email protected]>
Made-with: Cursor
@mrwesadex-flant mrwesadex-flant merged commit a3251c0 into main Mar 25, 2026
1 check passed
@mrwesadex-flant mrwesadex-flant deleted the vkarpochev-add-default-storage-class branch March 25, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants