Skip to content

Commit 9c532c4

Browse files
committed
reorg of examples kustomize yamls
1 parent c422e2f commit 9c532c4

File tree

20 files changed

+1917
-752
lines changed

20 files changed

+1917
-752
lines changed

charts/cluster-api-runtime-extensions-nutanix/defaultclusterclasses/nutanix-cluster-class.yaml

Lines changed: 162 additions & 459 deletions
Large diffs are not rendered by default.

examples/capi-quick-start/aws-cluster-identity.yaml

Whitespace-only changes.
Lines changed: 366 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,366 @@
1+
apiVersion: v1
2+
binaryData:
3+
ca.crt: ${NUTANIX_ADDITIONAL_TRUST_BUNDLE=""}
4+
kind: ConfigMap
5+
metadata:
6+
name: ${CLUSTER_NAME}
7+
---
8+
apiVersion: v1
9+
data:
10+
nutanix-ccm.yaml: |
11+
---
12+
apiVersion: v1
13+
kind: ConfigMap
14+
metadata:
15+
name: nutanix-ccm-pc-trusted-ca-bundle
16+
namespace: kube-system
17+
binaryData:
18+
ca.crt: ${NUTANIX_ADDITIONAL_TRUST_BUNDLE=""}
19+
---
20+
# Source: nutanix-cloud-provider/templates/rbac.yaml
21+
apiVersion: v1
22+
kind: ServiceAccount
23+
metadata:
24+
name: cloud-controller-manager
25+
namespace: kube-system
26+
---
27+
# Source: nutanix-cloud-provider/templates/cm.yaml
28+
kind: ConfigMap
29+
apiVersion: v1
30+
metadata:
31+
name: nutanix-config
32+
namespace: kube-system
33+
data:
34+
nutanix_config.json: |-
35+
{
36+
"prismCentral": {
37+
"address": "${NUTANIX_ENDPOINT}",
38+
"port": ${NUTANIX_PORT=9440},
39+
"insecure": ${NUTANIX_INSECURE=false},
40+
"credentialRef": {
41+
"kind": "secret",
42+
"name": "nutanix-creds",
43+
"namespace": "kube-system"
44+
},
45+
"additionalTrustBundle": {
46+
"kind": "ConfigMap",
47+
"name": "nutanix-ccm-pc-trusted-ca-bundle",
48+
"namespace": "kube-system"
49+
}
50+
},
51+
"enableCustomLabeling": ${CCM_CUSTOM_LABEL=false},
52+
"topologyDiscovery": {
53+
"type": "Prism"
54+
}
55+
}
56+
---
57+
# Source: nutanix-cloud-provider/templates/rbac.yaml
58+
apiVersion: rbac.authorization.k8s.io/v1
59+
kind: ClusterRole
60+
metadata:
61+
annotations:
62+
rbac.authorization.kubernetes.io/autoupdate: "true"
63+
name: system:cloud-controller-manager
64+
rules:
65+
- apiGroups:
66+
- ""
67+
resources:
68+
- secrets
69+
verbs:
70+
- get
71+
- list
72+
- watch
73+
- apiGroups:
74+
- ""
75+
resources:
76+
- configmaps
77+
verbs:
78+
- get
79+
- list
80+
- watch
81+
- apiGroups:
82+
- ""
83+
resources:
84+
- events
85+
verbs:
86+
- create
87+
- patch
88+
- update
89+
- apiGroups:
90+
- ""
91+
resources:
92+
- nodes
93+
verbs:
94+
- "*"
95+
- apiGroups:
96+
- ""
97+
resources:
98+
- nodes/status
99+
verbs:
100+
- patch
101+
- apiGroups:
102+
- ""
103+
resources:
104+
- serviceaccounts
105+
verbs:
106+
- create
107+
- apiGroups:
108+
- ""
109+
resources:
110+
- endpoints
111+
verbs:
112+
- create
113+
- get
114+
- list
115+
- watch
116+
- update
117+
- apiGroups:
118+
- coordination.k8s.io
119+
resources:
120+
- leases
121+
verbs:
122+
- get
123+
- list
124+
- watch
125+
- create
126+
- update
127+
- patch
128+
- delete
129+
---
130+
# Source: nutanix-cloud-provider/templates/rbac.yaml
131+
kind: ClusterRoleBinding
132+
apiVersion: rbac.authorization.k8s.io/v1
133+
metadata:
134+
name: system:cloud-controller-manager
135+
roleRef:
136+
apiGroup: rbac.authorization.k8s.io
137+
kind: ClusterRole
138+
name: system:cloud-controller-manager
139+
subjects:
140+
- kind: ServiceAccount
141+
name: cloud-controller-manager
142+
namespace: kube-system
143+
---
144+
# Source: nutanix-cloud-provider/templates/cloud-provider-nutanix-deployment.yaml
145+
apiVersion: apps/v1
146+
kind: Deployment
147+
metadata:
148+
labels:
149+
k8s-app: nutanix-cloud-controller-manager
150+
name: nutanix-cloud-controller-manager
151+
namespace: kube-system
152+
spec:
153+
replicas: 1
154+
selector:
155+
matchLabels:
156+
k8s-app: nutanix-cloud-controller-manager
157+
strategy:
158+
type: Recreate
159+
template:
160+
metadata:
161+
labels:
162+
k8s-app: nutanix-cloud-controller-manager
163+
spec:
164+
hostNetwork: true
165+
priorityClassName: system-cluster-critical
166+
nodeSelector:
167+
node-role.kubernetes.io/control-plane: ""
168+
serviceAccountName: cloud-controller-manager
169+
affinity:
170+
podAntiAffinity:
171+
requiredDuringSchedulingIgnoredDuringExecution:
172+
- labelSelector:
173+
matchLabels:
174+
k8s-app: nutanix-cloud-controller-manager
175+
topologyKey: kubernetes.io/hostname
176+
dnsPolicy: Default
177+
tolerations:
178+
- effect: NoSchedule
179+
key: node-role.kubernetes.io/master
180+
operator: Exists
181+
- effect: NoSchedule
182+
key: node-role.kubernetes.io/control-plane
183+
operator: Exists
184+
- effect: NoExecute
185+
key: node.kubernetes.io/unreachable
186+
operator: Exists
187+
tolerationSeconds: 120
188+
- effect: NoExecute
189+
key: node.kubernetes.io/not-ready
190+
operator: Exists
191+
tolerationSeconds: 120
192+
- effect: NoSchedule
193+
key: node.cloudprovider.kubernetes.io/uninitialized
194+
operator: Exists
195+
- effect: NoSchedule
196+
key: node.kubernetes.io/not-ready
197+
operator: Exists
198+
containers:
199+
- image: "${CCM_REPO=ghcr.io/nutanix-cloud-native/cloud-provider-nutanix/controller}:${CCM_TAG=v0.3.2}"
200+
imagePullPolicy: IfNotPresent
201+
name: nutanix-cloud-controller-manager
202+
env:
203+
- name: POD_NAMESPACE
204+
valueFrom:
205+
fieldRef:
206+
fieldPath: metadata.namespace
207+
args:
208+
- "--leader-elect=true"
209+
- "--cloud-config=/etc/cloud/nutanix_config.json"
210+
resources:
211+
requests:
212+
cpu: 100m
213+
memory: 50Mi
214+
volumeMounts:
215+
- mountPath: /etc/cloud
216+
name: nutanix-config-volume
217+
readOnly: true
218+
volumes:
219+
- name: nutanix-config-volume
220+
configMap:
221+
name: nutanix-config
222+
kind: ConfigMap
223+
metadata:
224+
name: ${CLUSTER_NAME}
225+
---
226+
apiVersion: v1
227+
kind: Secret
228+
metadata:
229+
name: ${CLUSTER_NAME}
230+
stringData:
231+
credentials: |
232+
[
233+
{
234+
"type": "basic_auth",
235+
"data": {
236+
"prismCentral":{
237+
"username": "${NUTANIX_USER}",
238+
"password": "${NUTANIX_PASSWORD}"
239+
}
240+
}
241+
}
242+
]
243+
---
244+
apiVersion: v1
245+
kind: Secret
246+
metadata:
247+
name: ${CLUSTER_NAME}
248+
stringData:
249+
nutanix-ccm-secret.yaml: |
250+
apiVersion: v1
251+
kind: Secret
252+
metadata:
253+
name: nutanix-creds
254+
namespace: kube-system
255+
stringData:
256+
credentials: |
257+
[
258+
{
259+
"type": "basic_auth",
260+
"data": {
261+
"prismCentral":{
262+
"username": "${NUTANIX_USER}",
263+
"password": "${NUTANIX_PASSWORD}"
264+
},
265+
"prismElements": null
266+
}
267+
}
268+
]
269+
type: addons.cluster.x-k8s.io/resource-set
270+
---
271+
apiVersion: addons.cluster.x-k8s.io/v1beta1
272+
kind: ClusterResourceSet
273+
metadata:
274+
name: ${CLUSTER_NAME}
275+
spec:
276+
clusterSelector:
277+
matchLabels:
278+
ccm: nutanix
279+
resources:
280+
- kind: ConfigMap
281+
name: nutanix-ccm
282+
- kind: Secret
283+
name: nutanix-ccm-secret
284+
- kind: ConfigMap
285+
name: nutanix-ccm-pc-trusted-ca-bundle
286+
strategy: ApplyOnce
287+
---
288+
apiVersion: cluster.x-k8s.io/v1beta1
289+
kind: Cluster
290+
metadata:
291+
labels:
292+
ccm: nutanix
293+
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
294+
name: ${CLUSTER_NAME}
295+
spec:
296+
clusterNetwork:
297+
pods:
298+
cidrBlocks:
299+
- 172.20.0.0/16
300+
serviceDomain: cluster.local
301+
services:
302+
cidrBlocks:
303+
- 172.19.0.0/16
304+
topology:
305+
class: nutanix-quick-start
306+
controlPlane:
307+
metadata: {}
308+
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
309+
variables:
310+
- name: clusterConfig
311+
value:
312+
addons:
313+
cni:
314+
provider: Calico
315+
strategy: ClusterResourceSet
316+
controlPlane:
317+
nutanix:
318+
machineDetails:
319+
bootType: legacy
320+
cluster:
321+
name: ${NUTANIX_PRISM_ELEMENT_CLUSTER_NAME}
322+
type: name
323+
image:
324+
name: ${NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME}
325+
type: name
326+
memorySize: 4Gi
327+
subnet:
328+
- name: ${NUTANIX_SUBNET_NAME}
329+
type: name
330+
systemDiskSize: 40Gi
331+
vcpuSockets: 2
332+
vcpusPerSocket: 1
333+
nutanix:
334+
controlPlaneEndpoint:
335+
host: ${CONTROL_PLANE_ENDPOINT_IP}
336+
port: ${CONTROL_PLANE_ENDPOINT_PORT}
337+
prismCentralEndpoint:
338+
additionalTrustBundle: trust-bundle-root-ca
339+
host: ${NUTANIX_ENDPOINT}
340+
insecure: ${NUTANIX_INSECURE}
341+
port: 9440
342+
- name: workerConfig
343+
value:
344+
nutanix:
345+
machineDetails:
346+
bootType: legacy
347+
cluster:
348+
name: ${NUTANIX_PRISM_ELEMENT_CLUSTER_NAME}
349+
type: name
350+
image:
351+
name: ${NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME}
352+
type: name
353+
memorySize: 4Gi
354+
subnet:
355+
- name: ${NUTANIX_SUBNET_NAME}
356+
type: name
357+
systemDiskSize: 40Gi
358+
vcpuSockets: 2
359+
vcpusPerSocket: 1
360+
version: ${KUBERNETES_VERSION}
361+
workers:
362+
machineDeployments:
363+
- class: nutanix-quick-start-worker
364+
metadata: {}
365+
name: md-0
366+
replicas: ${WORKER_MACHINE_COUNT}

0 commit comments

Comments
 (0)