Skip to content

Commit 11444c3

Browse files
authored
fix: hardcode the kubectl tag in registry syncer Pods (#1262)
**What problem does this PR solve?**: Supersedes #1261 Hardcode a version of the kubectl images so that its not dependent on the Cluster version which can be a pre-release or have additional build metadata. We will periodically update this version. **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
1 parent a37d4b2 commit 11444c3

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

charts/cluster-api-runtime-extensions-nutanix/addons/registry-syncer/values-template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ initContainers:
33
# In the case when it runs as a Job, it will prematurely exit.
44
# This init container will wait for the destination registry to be ready.
55
- name: wait-for-registry
6-
image: ghcr.io/d2iq-labs/kubectl-betterwait:{{ .KubernetesVersion }}
6+
image: ghcr.io/d2iq-labs/kubectl-betterwait:v1.33.3
77
args:
88
- --for=condition=Ready
99
- --timeout=-1s # a negative number here means wait forever
@@ -17,7 +17,7 @@ initContainers:
1717
name: kubeconfig
1818
readOnly: true
1919
- name: port-forward-registry
20-
image: ghcr.io/d2iq-labs/kubectl-betterwait:{{ .KubernetesVersion }}
20+
image: ghcr.io/d2iq-labs/kubectl-betterwait:v1.33.3
2121
command:
2222
- /bin/kubectl
2323
args:

pkg/handlers/generic/lifecycle/registry/syncer/syncer.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,6 @@ func templateValues(cluster *clusterv1.Cluster, text string) (string, error) {
211211
type input struct {
212212
CusterName string
213213

214-
KubernetesVersion string
215-
216214
SourceRegistryAddress string
217215

218216
DestinationRegistryAnyPodName string
@@ -224,8 +222,7 @@ func templateValues(cluster *clusterv1.Cluster, text string) (string, error) {
224222
}
225223

226224
templateInput := input{
227-
CusterName: cluster.Name,
228-
KubernetesVersion: cluster.Spec.Topology.Version,
225+
CusterName: cluster.Name,
229226
// FIXME: This assumes that the source and destination registry names are the same.
230227
// This is true now with a single registry addon provider, but may not be true in the future.
231228
SourceRegistryAddress: registryMetadata.AddressFromClusterNetwork,

pkg/handlers/generic/lifecycle/registry/syncer/testdata/registry-syncer-template.yaml.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ initContainers:
33
# In the case when it runs as a Job, it will prematurely exit.
44
# This init container will wait for the destination registry to be ready.
55
- name: wait-for-registry
6-
image: ghcr.io/d2iq-labs/kubectl-betterwait:{{ .KubernetesVersion }}
6+
image: ghcr.io/d2iq-labs/kubectl-betterwait:v1.30.100
77
args:
88
- --for=condition=Ready
99
- --timeout=-1s # a negative number here means wait forever
@@ -17,7 +17,7 @@ initContainers:
1717
name: kubeconfig
1818
readOnly: true
1919
- name: port-forward-registry
20-
image: ghcr.io/d2iq-labs/kubectl-betterwait:{{ .KubernetesVersion }}
20+
image: ghcr.io/d2iq-labs/kubectl-betterwait:v1.30.100
2121
command:
2222
- /bin/kubectl
2323
args:

0 commit comments

Comments
 (0)