File tree 7 files changed +94
-0
lines changed
examples/capi-quick-start
7 files changed +94
-0
lines changed Original file line number Diff line number Diff line change 1
1
apiVersion : v1
2
2
kind : Secret
3
+ metadata :
4
+ labels :
5
+ cluster.x-k8s.io/provider : nutanix
6
+ name : ${CLUSTER_NAME}-dockerhub-credentials
7
+ stringData :
8
+ password : ${DOCKER_HUB_PASSWORD}
9
+ username : ${DOCKER_HUB_USERNAME}
10
+ type : Opaque
11
+ ---
12
+ apiVersion : v1
13
+ kind : Secret
3
14
metadata :
4
15
labels :
5
16
cluster.x-k8s.io/provider : nutanix
@@ -92,6 +103,11 @@ spec:
92
103
systemDiskSize : 40Gi
93
104
vcpuSockets : 2
94
105
vcpusPerSocket : 1
106
+ imageRegistries :
107
+ - credentials :
108
+ secretRef :
109
+ name : ${CLUSTER_NAME}-dockerhub-credentials
110
+ url : https://docker.io
95
111
nutanix :
96
112
controlPlaneEndpoint :
97
113
host : ${CONTROL_PLANE_ENDPOINT_IP}
Original file line number Diff line number Diff line change 1
1
apiVersion : v1
2
2
kind : Secret
3
+ metadata :
4
+ labels :
5
+ cluster.x-k8s.io/provider : nutanix
6
+ name : ${CLUSTER_NAME}-dockerhub-credentials
7
+ stringData :
8
+ password : ${DOCKER_HUB_PASSWORD}
9
+ username : ${DOCKER_HUB_USERNAME}
10
+ type : Opaque
11
+ ---
12
+ apiVersion : v1
13
+ kind : Secret
3
14
metadata :
4
15
labels :
5
16
cluster.x-k8s.io/provider : nutanix
@@ -92,6 +103,11 @@ spec:
92
103
systemDiskSize : 40Gi
93
104
vcpuSockets : 2
94
105
vcpusPerSocket : 1
106
+ imageRegistries :
107
+ - credentials :
108
+ secretRef :
109
+ name : ${CLUSTER_NAME}-dockerhub-credentials
110
+ url : https://docker.io
95
111
nutanix :
96
112
controlPlaneEndpoint :
97
113
host : ${CONTROL_PLANE_ENDPOINT_IP}
Original file line number Diff line number Diff line change 1
1
apiVersion : v1
2
2
kind : Secret
3
+ metadata :
4
+ labels :
5
+ cluster.x-k8s.io/provider : nutanix
6
+ name : ${CLUSTER_NAME}-dockerhub-credentials
7
+ stringData :
8
+ password : ${DOCKER_HUB_PASSWORD}
9
+ username : ${DOCKER_HUB_USERNAME}
10
+ type : Opaque
11
+ ---
12
+ apiVersion : v1
13
+ kind : Secret
3
14
metadata :
4
15
labels :
5
16
cluster.x-k8s.io/provider : nutanix
@@ -92,6 +103,11 @@ spec:
92
103
systemDiskSize : 40Gi
93
104
vcpuSockets : 2
94
105
vcpusPerSocket : 1
106
+ imageRegistries :
107
+ - credentials :
108
+ secretRef :
109
+ name : ${CLUSTER_NAME}-dockerhub-credentials
110
+ url : https://docker.io
95
111
nutanix :
96
112
controlPlaneEndpoint :
97
113
host : ${CONTROL_PLANE_ENDPOINT_IP}
Original file line number Diff line number Diff line change 1
1
apiVersion : v1
2
2
kind : Secret
3
+ metadata :
4
+ labels :
5
+ cluster.x-k8s.io/provider : nutanix
6
+ name : ${CLUSTER_NAME}-dockerhub-credentials
7
+ stringData :
8
+ password : ${DOCKER_HUB_PASSWORD}
9
+ username : ${DOCKER_HUB_USERNAME}
10
+ type : Opaque
11
+ ---
12
+ apiVersion : v1
13
+ kind : Secret
3
14
metadata :
4
15
labels :
5
16
cluster.x-k8s.io/provider : nutanix
@@ -92,6 +103,11 @@ spec:
92
103
systemDiskSize : 40Gi
93
104
vcpuSockets : 2
94
105
vcpusPerSocket : 1
106
+ imageRegistries :
107
+ - credentials :
108
+ secretRef :
109
+ name : ${CLUSTER_NAME}-dockerhub-credentials
110
+ url : https://docker.io
95
111
nutanix :
96
112
controlPlaneEndpoint :
97
113
host : ${CONTROL_PLANE_ENDPOINT_IP}
Original file line number Diff line number Diff line change
1
+ # Copyright 2023 D2iQ, Inc. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ ---
5
+ apiVersion : v1
6
+ kind : Secret
7
+ metadata :
8
+ name : ${CLUSTER_NAME}-dockerhub-credentials
9
+ stringData :
10
+ username : ${DOCKER_HUB_USERNAME}
11
+ password : ${DOCKER_HUB_PASSWORD}
12
+ type : Opaque
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
5
5
kind: Kustomization
6
6
7
7
resources:
8
+ - ../../../additional-resources/dockerhub-secret.yaml
8
9
- ../../../additional-resources/nutanix/csi-secret.yaml
9
10
- https://raw.githubusercontent.com/nutanix-cloud-native/cluster-api-provider-nutanix/1a7cd69ba35de01e56dcf2dda7f31973111d2317/templates/cluster-template-topology.yaml
10
11
@@ -58,3 +59,10 @@ patches:
58
59
- target:
59
60
kind: Cluster
60
61
path: ../../../patches/nutanix/remove-ccm/cluster-label.yaml
62
+
63
+ # A Nutanix cluster uses SNAT for outbound traffic by default.
64
+ # Because Dockerhub only sees a single request IP the rate limit gets hit for almost every cluster.
65
+ # Add a patch to set imageRegistry with docker.io credentials.
66
+ - target:
67
+ kind: Cluster
68
+ path: ../../../patches/dockerhub-image-registry.yaml
Original file line number Diff line number Diff line change
1
+ # Copyright 2024 D2iQ, Inc. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ - op : " add"
5
+ path : " /spec/topology/variables/0/value/imageRegistries"
6
+ value :
7
+ - url : https://docker.io
8
+ credentials :
9
+ secretRef :
10
+ name : ${CLUSTER_NAME}-dockerhub-credentials
You can’t perform that action at this time.
0 commit comments