Skip to content

Commit b35eb5b

Browse files
authored
fix: [BACKPORT v0.14] Filter out control plane endpoint from Nutanix node IPs (#882)
1 parent e26fa97 commit b35eb5b

File tree

6 files changed

+16
-3
lines changed

6 files changed

+16
-3
lines changed

charts/cluster-api-runtime-extensions-nutanix/templates/ccm/nutanix/manifests/helm-addon-installation.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ data:
1515
{{ `{{- with .PrismCentralAdditionalTrustBundle }}` }}
1616
prismCentralAdditionalTrustBundle: {{ `{{ printf "%q" . }}` }}
1717
{{ `{{- end }}` }}
18+
{{ `{{- with .ControlPlaneEndpointHost }}` }}
19+
ignoredNodeIPs: [ {{ `{{ printf "%q" . }}` }} ]
20+
{{ `{{- end }}` }}
1821
1922
# The Secret containing the credentials will be created by the handler.
2023
createSecret: false

charts/cluster-api-runtime-extensions-nutanix/templates/helm-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ data:
3737
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}https://kubernetes-sigs.github.io/node-feature-discovery/charts{{ end }}
3838
nutanix-ccm: |
3939
ChartName: nutanix-cloud-provider
40-
ChartVersion: 0.4.0
40+
ChartVersion: 0.4.1
4141
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}https://nutanix.github.io/helm/{{ end }}
4242
nutanix-storage-csi: |
4343
ChartName: nutanix-csi-storage

hack/addons/mindthegap-helm-registry/repos.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ repositories:
4545
repoURL: https://nutanix.github.io/helm/
4646
charts:
4747
nutanix-cloud-provider:
48-
- 0.4.0
48+
- 0.4.1
4949
nutanix-csi-storage:
5050
repoURL: https://nutanix.github.io/helm-releases/
5151
charts:

make/addons.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export AWS_CCM_VERSION_128 := v1.28.6
1818
export AWS_CCM_VERSION_129 := v1.29.3
1919
export AWS_CCM_VERSION_130 := v1.30.1
2020

21-
export NUTANIX_CCM_CHART_VERSION := 0.4.0
21+
export NUTANIX_CCM_CHART_VERSION := 0.4.1
2222

2323
export KUBE_VIP_VERSION := v0.8.1
2424

pkg/handlers/generic/lifecycle/ccm/nutanix/handler.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ func templateValuesFunc(
149149
PrismCentralPort int32
150150
PrismCentralInsecure bool
151151
PrismCentralAdditionalTrustBundle string
152+
ControlPlaneEndpointHost string
152153
}
153154

154155
address, port, err := nutanixConfig.PrismCentralEndpoint.ParseURL()
@@ -160,6 +161,7 @@ func templateValuesFunc(
160161
PrismCentralPort: port,
161162
PrismCentralInsecure: nutanixConfig.PrismCentralEndpoint.Insecure,
162163
PrismCentralAdditionalTrustBundle: nutanixConfig.PrismCentralEndpoint.AdditionalTrustBundle,
164+
ControlPlaneEndpointHost: nutanixConfig.ControlPlaneEndpoint.Host,
163165
}
164166

165167
var b bytes.Buffer

pkg/handlers/generic/lifecycle/ccm/nutanix/handler_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ prismCentralEndPoint: prism-central.nutanix.com
3131
prismCentralPort: 9440
3232
prismCentralInsecure: false
3333
prismCentralAdditionalTrustBundle: "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVjekNDQTF1Z0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRUUZBRC4uQWtHQTFVRUJoTUNSMEl4CkV6QVJCZ05WQkFnVENsTnZiV1V0VTNSaGRHVXhGREFTQmdOVkJBb1RDMC4uMEVnVEhSa01UY3dOUVlEClZRUUxFeTVEYkdGemN5QXhJRkIxWW14cFl5Q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hGRC4uQW9UQzBKbGMzUWdRMEVnClRIUmtNVGN3TlFZRFZRUUxFeTVEYkdGemN5QXhJRkIxWW14cFl5QlFjbS4uRU5sY25ScFptbGpZWFJwCmIyNGdRWFYwYUc5eWFYUjVNUlF3RWdZRFZRUURFd3RDWlhOMElFTkJJRS4uREFNQmdOVkhSTUVCVEFECkFRSC9NQTBHQ1NxR1NJYjNEUUVCQkFVQUE0SUJBUUMxdVlCY3NTbmN3QS4uRENzUWVyNzcyQzJ1Y3BYCnhRVUUvQzBwV1dtNmdEa3dkNUQwRFNNREpScVYvd2VvWjR3QzZCNzNmNS4uYkxoR1lIYVhKZVNENktyClhjb093TGRTYUdtSllzbExLWkIzWklERXAwd1lUR2hndGViNkpGaVR0bi4uc2YyeGRyWWZQQ2lJQjdnCkJNQVY3R3pkYzRWc3BTNmxqckFoYmlpYXdkQmlRbFFtc0JlRno5SmtGNC4uYjNsOEJvR04rcU1hNTZZCkl0OHVuYTJnWTRsMk8vL29uODhyNUlXSmxtMUwwb0E4ZTRmUjJ5ckJIWC4uYWRzR2VGS2t5TnJ3R2kvCjd2UU1mWGRHc1JyWE5HUkduWCt2V0RaMy96V0kwam9EdENrTm5xRXBWbi4uSG9YCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0="
34+
ignoredNodeIPs: [ "1.2.3.4" ]
3435
3536
# The Secret containing the credentials will be created by the handler.
3637
createSecret: false
@@ -40,6 +41,7 @@ secretName: nutanix-ccm-credentials`
4041
prismCentralEndPoint: prism-central.nutanix.com
4142
prismCentralPort: 9440
4243
prismCentralInsecure: true
44+
ignoredNodeIPs: [ "1.2.3.4" ]
4345
4446
# The Secret containing the credentials will be created by the handler.
4547
createSecret: false
@@ -91,6 +93,9 @@ func Test_templateValues(t *testing.T) {
9193
),
9294
AdditionalTrustBundle: testCertBundle,
9395
},
96+
ControlPlaneEndpoint: v1alpha1.ControlPlaneEndpointSpec{
97+
Host: "1.2.3.4",
98+
},
9499
},
95100
},
96101
in: valuesTemplate,
@@ -118,6 +123,9 @@ func Test_templateValues(t *testing.T) {
118123
),
119124
Insecure: true,
120125
},
126+
ControlPlaneEndpoint: v1alpha1.ControlPlaneEndpointSpec{
127+
Host: "1.2.3.4",
128+
},
121129
},
122130
},
123131
in: valuesTemplate,

0 commit comments

Comments
 (0)