Skip to content

Commit 94cddd9

Browse files
authored
fix: Add strategy to Nutanix CCM addon in examples (#765)
Missed in previous PR when this ws refactored for AWS CCM. This was not found in the PR checks because we still do not have CI running on Nutanix infrastructure - but that is coming soon! I have tested this manually by running e2e against sherlock dev.
1 parent 0d2f751 commit 94cddd9

File tree

7 files changed

+47
-1
lines changed

7 files changed

+47
-1
lines changed

examples/capi-quick-start/nutanix-cluster-calico-crs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ spec:
6767
credentials:
6868
secretRef:
6969
name: ${CLUSTER_NAME}-pc-creds
70+
strategy: HelmAddon
7071
clusterAutoscaler:
7172
strategy: ClusterResourceSet
7273
cni:

examples/capi-quick-start/nutanix-cluster-calico-helm-addon.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ spec:
6767
credentials:
6868
secretRef:
6969
name: ${CLUSTER_NAME}-pc-creds
70+
strategy: HelmAddon
7071
clusterAutoscaler:
7172
strategy: HelmAddon
7273
cni:

examples/capi-quick-start/nutanix-cluster-cilium-crs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ spec:
6767
credentials:
6868
secretRef:
6969
name: ${CLUSTER_NAME}-pc-creds
70+
strategy: HelmAddon
7071
clusterAutoscaler:
7172
strategy: ClusterResourceSet
7273
cni:

examples/capi-quick-start/nutanix-cluster-cilium-helm-addon.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ spec:
6767
credentials:
6868
secretRef:
6969
name: ${CLUSTER_NAME}-pc-creds
70+
strategy: HelmAddon
7071
clusterAutoscaler:
7172
strategy: HelmAddon
7273
cni:

hack/addons/kustomize/nutanix-ccm/kustomization.yaml.tmpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ helmCharts:
1313
repo: https://nutanix.github.io/helm/
1414
releaseName: nutanix-ccm
1515
version: ${NUTANIX_CCM_CHART_VERSION}
16-
valuesFile: helm-values.yaml
1716
includeCRDs: true
1817
skipTests: true

hack/examples/patches/nutanix/ccm.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
credentials:
88
secretRef:
99
name: ${CLUSTER_NAME}-pc-creds
10+
strategy: HelmAddon

test/e2e/ccm_helpers.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ func WaitForCCMToBeReadyInWorkloadCluster(
5252
workloadClusterClient,
5353
input,
5454
)
55+
case "nutanix":
56+
WaitForNutanixCCMToBeReadyInWorkloadCluster(
57+
ctx,
58+
workloadClusterClient,
59+
input,
60+
)
5561
default:
5662
Fail(
5763
fmt.Sprintf(
@@ -117,3 +123,39 @@ func WaitForAWSCCMToBeReadyInWorkloadCluster(
117123
},
118124
}, input.DaemonSetIntervals...)
119125
}
126+
127+
func WaitForNutanixCCMToBeReadyInWorkloadCluster(
128+
ctx context.Context,
129+
workloadClusterClient client.Client,
130+
input WaitForCCMToBeReadyInWorkloadClusterInput, //nolint:gocritic // This hugeParam is OK in tests.
131+
) {
132+
switch input.CCM.Strategy {
133+
case v1alpha1.AddonStrategyHelmAddon:
134+
WaitForHelmReleaseProxyReadyForCluster(
135+
ctx,
136+
WaitForHelmReleaseProxyReadyForClusterInput{
137+
GetLister: input.ClusterProxy.GetClient(),
138+
Cluster: input.WorkloadCluster,
139+
HelmChartProxyName: "nutanix-ccm-" + input.WorkloadCluster.Name,
140+
},
141+
input.HelmReleaseIntervals...,
142+
)
143+
default:
144+
Fail(
145+
fmt.Sprintf(
146+
"Do not know how to wait for Nutanix CCM using strategy %s to be ready",
147+
input.CCM.Strategy,
148+
),
149+
)
150+
}
151+
152+
WaitForDeploymentsAvailable(ctx, framework.WaitForDeploymentsAvailableInput{
153+
Getter: workloadClusterClient,
154+
Deployment: &appsv1.Deployment{
155+
ObjectMeta: metav1.ObjectMeta{
156+
Name: "nutanix-cloud-controller-manager",
157+
Namespace: metav1.NamespaceSystem,
158+
},
159+
},
160+
}, input.DeploymentIntervals...)
161+
}

0 commit comments

Comments
 (0)