1
+ apiVersion : cluster.x-k8s.io/v1beta1
2
+ kind : Cluster
3
+ metadata :
4
+ labels :
5
+ cluster.x-k8s.io/cluster-name : " ${CLUSTER_NAME}"
6
+ name : " ${CLUSTER_NAME}"
7
+ namespace : " ${NAMESPACE}"
8
+ spec :
9
+ clusterNetwork :
10
+ pods :
11
+ cidrBlocks :
12
+ - ${POD_CIDR:="192.168.0.0/16"}
13
+ serviceDomain : ${SERVICE_DOMAIN:="cluster.local"}
14
+ services :
15
+ cidrBlocks :
16
+ - ${SERVICE_CIDR:="10.128.0.0/12"}
17
+ infrastructureRef :
18
+ apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
19
+ kind : OCICluster
20
+ name : " ${CLUSTER_NAME}"
21
+ namespace : " ${NAMESPACE}"
22
+ controlPlaneRef :
23
+ apiVersion : controlplane.cluster.x-k8s.io/v1beta1
24
+ kind : KubeadmControlPlane
25
+ name : " ${CLUSTER_NAME}-control-plane"
26
+ namespace : " ${NAMESPACE}"
27
+ ---
28
+ apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
29
+ kind : OCICluster
30
+ metadata :
31
+ labels :
32
+ cluster.x-k8s.io/cluster-name : " ${CLUSTER_NAME}"
33
+ name : " ${CLUSTER_NAME}"
34
+ spec :
35
+ compartmentId : " ${OCI_COMPARTMENT_ID}"
36
+ ---
37
+ kind : KubeadmControlPlane
38
+ apiVersion : controlplane.cluster.x-k8s.io/v1beta1
39
+ metadata :
40
+ name : " ${CLUSTER_NAME}-control-plane"
41
+ namespace : " ${NAMESPACE}"
42
+ spec :
43
+ version : " ${KUBERNETES_VERSION}"
44
+ replicas : ${CONTROL_PLANE_MACHINE_COUNT}
45
+ machineTemplate :
46
+ metadata :
47
+ labels :
48
+ controlplane.remediation : " "
49
+ infrastructureRef :
50
+ kind : OCIMachineTemplate
51
+ apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
52
+ name : " ${CLUSTER_NAME}-control-plane"
53
+ namespace : " ${NAMESPACE}"
54
+ kubeadmConfigSpec :
55
+ clusterConfiguration :
56
+ kubernetesVersion : ${KUBERNETES_VERSION}
57
+ apiServer :
58
+ certSANs : [localhost, 127.0.0.1]
59
+ dns : {}
60
+ etcd : {}
61
+ networking : {}
62
+ scheduler : {}
63
+ initConfiguration :
64
+ nodeRegistration :
65
+ criSocket : /var/run/containerd/containerd.sock
66
+ kubeletExtraArgs :
67
+ cloud-provider : external
68
+ provider-id : oci://{{ ds["id"] }}
69
+ joinConfiguration :
70
+ discovery : {}
71
+ nodeRegistration :
72
+ criSocket : /var/run/containerd/containerd.sock
73
+ kubeletExtraArgs :
74
+ cloud-provider : external
75
+ provider-id : oci://{{ ds["id"] }}
76
+ ---
77
+ kind : OCIMachineTemplate
78
+ apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
79
+ metadata :
80
+ name : " ${CLUSTER_NAME}-control-plane"
81
+ # labels:
82
+ # controlplane.remediation: ""
83
+ spec :
84
+ template :
85
+ spec :
86
+ imageId : " ${OCI_IMAGE_ID}"
87
+ compartmentId : " ${OCI_COMPARTMENT_ID}"
88
+ shape : " ${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}"
89
+ shapeConfig :
90
+ ocpus : " ${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}"
91
+ metadata :
92
+ ssh_authorized_keys : " ${OCI_SSH_KEY}"
93
+ isPvEncryptionInTransitEnabled : ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true}
94
+ ---
95
+ apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
96
+ kind : OCIMachineTemplate
97
+ metadata :
98
+ name : " ${CLUSTER_NAME}-md-0"
99
+ # labels:
100
+ # machine.remediation: ""
101
+ spec :
102
+ template :
103
+ spec :
104
+ imageId : " ${OCI_IMAGE_ID}"
105
+ compartmentId : " ${OCI_COMPARTMENT_ID}"
106
+ shape : " ${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}"
107
+ shapeConfig :
108
+ ocpus : " ${OCI_NODE_MACHINE_TYPE_OCPUS=1}"
109
+ metadata :
110
+ ssh_authorized_keys : " ${OCI_SSH_KEY}"
111
+ isPvEncryptionInTransitEnabled : ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true}
112
+ ---
113
+ apiVersion : bootstrap.cluster.x-k8s.io/v1alpha4
114
+ kind : KubeadmConfigTemplate
115
+ metadata :
116
+ name : " ${CLUSTER_NAME}-md-0"
117
+ spec :
118
+ template :
119
+ spec :
120
+ joinConfiguration :
121
+ nodeRegistration :
122
+ kubeletExtraArgs :
123
+ cloud-provider : external
124
+ provider-id : oci://{{ ds["id"] }}
125
+ ---
126
+ apiVersion : cluster.x-k8s.io/v1beta1
127
+ kind : MachineDeployment
128
+ metadata :
129
+ name : " ${CLUSTER_NAME}-md-0"
130
+ # labels:
131
+ # machine.remediation: ""
132
+ spec :
133
+ clusterName : " ${CLUSTER_NAME}"
134
+ replicas : ${NODE_MACHINE_COUNT}
135
+ selector :
136
+ matchLabels :
137
+ template :
138
+ metadata :
139
+ labels :
140
+ machine.remediation : " "
141
+ spec :
142
+ clusterName : " ${CLUSTER_NAME}"
143
+ version : " ${KUBERNETES_VERSION}"
144
+ bootstrap :
145
+ configRef :
146
+ name : " ${CLUSTER_NAME}-md-0"
147
+ apiVersion : bootstrap.cluster.x-k8s.io/v1beta1
148
+ kind : KubeadmConfigTemplate
149
+ infrastructureRef :
150
+ name : " ${CLUSTER_NAME}-md-0"
151
+ apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
152
+ kind : OCIMachineTemplate
153
+ ---
154
+ apiVersion : cluster.x-k8s.io/v1beta1
155
+ kind : MachineHealthCheck
156
+ metadata :
157
+ name : " ${CLUSTER_NAME}-control-plane-unhealthy-5m"
158
+ spec :
159
+ clusterName : " ${CLUSTER_NAME}"
160
+ maxUnhealthy : 100%
161
+ nodeStartupTimeout : 10m
162
+ selector :
163
+ matchLabels :
164
+ controlplane.remediation : " "
165
+ unhealthyConditions :
166
+ - type : Ready
167
+ status : Unknown
168
+ timeout : 300s
169
+ - type : Ready
170
+ status : " False"
171
+ timeout : 300s
172
+ ---
173
+ apiVersion : cluster.x-k8s.io/v1beta1
174
+ kind : MachineHealthCheck
175
+ metadata :
176
+ name : " ${CLUSTER_NAME}-md-unhealthy-5m"
177
+ spec :
178
+ clusterName : " ${CLUSTER_NAME}"
179
+ maxUnhealthy : 100%
180
+ nodeStartupTimeout : 10m
181
+ selector :
182
+ matchLabels :
183
+ machine.remediation : " "
184
+ unhealthyConditions :
185
+ - type : Ready
186
+ status : Unknown
187
+ timeout : 300s
188
+ - type : Ready
189
+ status : " False"
190
+ timeout : 300s
0 commit comments