Skip to content

Commit 0267743

Browse files
committed
feat: Deploy snapshot-controller as separate addon
Currently both Nutanix CSI and AWS EBS CSI handlers deploy the snapshot-controller. Generally the snapshot-controller should be treated as a separate addon that all compatible CSI providers can take advantage of. This commit removes the snapshot-controller from both Nutanix and AWS EBS CSI, and instead deploys the snapshot-controller separately so they can both use it as necessary. Deployment tested manually on AWS via e2e test suite as well as the automated Docker test suite running in CI.
1 parent ee8e7af commit 0267743

File tree

51 files changed

+2839
-1385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2839
-1385
lines changed

api/v1alpha1/addon_types.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,17 @@ type ClusterAutoscaler struct {
130130
type GenericCSI struct {
131131
// +kubebuilder:validation:Required
132132
DefaultStorage DefaultStorage `json:"defaultStorage"`
133+
134+
// Deploy the CSI snapshot controller and associated CRDs.
135+
// +kubebuilder:validation:Optional
136+
SnapshotController *SnapshotController `json:"snapshotController,omitempty"`
137+
}
138+
139+
type SnapshotController struct {
140+
// Addon strategy used to deploy the snapshot controller to the workload cluster.
141+
// +kubebuilder:validation:Required
142+
// +kubebuilder:validation:Enum=ClusterResourceSet;HelmAddon
143+
Strategy AddonStrategy `json:"strategy"`
133144
}
134145

135146
type DefaultStorage struct {

api/v1alpha1/crds/caren.nutanix.com_awsclusterconfigs.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,18 @@ spec:
180180
required:
181181
- aws-ebs
182182
type: object
183+
snapshotController:
184+
description: Deploy the CSI snapshot controller and associated CRDs.
185+
properties:
186+
strategy:
187+
description: Addon strategy used to deploy the snapshot controller to the workload cluster.
188+
enum:
189+
- ClusterResourceSet
190+
- HelmAddon
191+
type: string
192+
required:
193+
- strategy
194+
type: object
183195
required:
184196
- defaultStorage
185197
- providers

api/v1alpha1/crds/caren.nutanix.com_dockerclusterconfigs.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,18 @@ spec:
180180
required:
181181
- local-path
182182
type: object
183+
snapshotController:
184+
description: Deploy the CSI snapshot controller and associated CRDs.
185+
properties:
186+
strategy:
187+
description: Addon strategy used to deploy the snapshot controller to the workload cluster.
188+
enum:
189+
- ClusterResourceSet
190+
- HelmAddon
191+
type: string
192+
required:
193+
- strategy
194+
type: object
183195
required:
184196
- defaultStorage
185197
- providers

api/v1alpha1/crds/caren.nutanix.com_nutanixclusterconfigs.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,18 @@ spec:
180180
required:
181181
- nutanix
182182
type: object
183+
snapshotController:
184+
description: Deploy the CSI snapshot controller and associated CRDs.
185+
properties:
186+
strategy:
187+
description: Addon strategy used to deploy the snapshot controller to the workload cluster.
188+
enum:
189+
- ClusterResourceSet
190+
- HelmAddon
191+
type: string
192+
required:
193+
- strategy
194+
type: object
183195
required:
184196
- defaultStorage
185197
- providers

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 23 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/cluster-api-runtime-extensions-nutanix/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ A Helm chart for cluster-api-runtime-extensions-nutanix
6666
| hooks.csi.local-path.helmAddonStrategy.defaultValueTemplateConfigMap.name | string | `"default-local-path-csi-helm-values-template"` | |
6767
| hooks.csi.nutanix.helmAddonStrategy.defaultValueTemplateConfigMap.create | bool | `true` | |
6868
| hooks.csi.nutanix.helmAddonStrategy.defaultValueTemplateConfigMap.name | string | `"default-nutanix-csi-helm-values-template"` | |
69+
| hooks.csi.snapshot-controller.helmAddonStrategy.defaultValueTemplateConfigMap.create | bool | `true` | |
70+
| hooks.csi.snapshot-controller.helmAddonStrategy.defaultValueTemplateConfigMap.name | string | `"default-snapshot-controller-helm-values-template"` | |
6971
| hooks.nfd.crsStrategy.defaultInstallationConfigMap.name | string | `"node-feature-discovery"` | |
7072
| hooks.nfd.helmAddonStrategy.defaultValueTemplateConfigMap.create | bool | `true` | |
7173
| hooks.nfd.helmAddonStrategy.defaultValueTemplateConfigMap.name | string | `"default-nfd-helm-values-template"` | |

0 commit comments

Comments
 (0)