-
Notifications
You must be signed in to change notification settings - Fork 101
/
Copy pathcluster-with-kcp.yaml
119 lines (119 loc) · 2.92 KB
/
cluster-with-kcp.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
apiVersion: cluster.x-k8s.io/${CAPI_VERSION}
kind: Cluster
metadata:
labels:
cni: ${CLUSTER_NAME}-crs-0
name: ${CLUSTER_NAME}
namespace: ${NAMESPACE}
spec:
clusterNetwork:
pods:
cidrBlocks: ["${POD_CIDR}"]
services:
cidrBlocks: ["${SERVICE_CIDR}"]
controlPlaneRef:
apiVersion: controlplane.cluster.x-k8s.io/${CAPI_VERSION}
kind: KubeadmControlPlane
name: ${CLUSTER_NAME}
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/${CAPM3_VERSION}
kind: Metal3Cluster
name: ${CLUSTER_NAME}
---
apiVersion: infrastructure.cluster.x-k8s.io/${CAPM3_VERSION}
kind: Metal3Cluster
metadata:
name: ${CLUSTER_NAME}
namespace: ${NAMESPACE}
spec:
controlPlaneEndpoint:
host: ${CLUSTER_APIENDPOINT_HOST}
port: ${CLUSTER_APIENDPOINT_PORT}
noCloudProvider: true
---
apiVersion: controlplane.cluster.x-k8s.io/${CAPI_VERSION}
kind: KubeadmControlPlane
metadata:
name: ${CLUSTER_NAME}
namespace: ${NAMESPACE}
spec:
machineTemplate:
nodeDrainTimeout: ${NODE_DRAIN_TIMEOUT}
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/${CAPM3_VERSION}
kind: Metal3MachineTemplate
name: ${CLUSTER_NAME}-controlplane
kubeadmConfigSpec:
clusterConfiguration: {}
users:
- name: ${IMAGE_USERNAME}
sshAuthorizedKeys:
- ${SSH_PUB_KEY_CONTENT}
sudo: ALL=(ALL) NOPASSWD:ALL
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
rolloutStrategy:
rollingUpdate:
maxSurge: 1
version: ${KUBERNETES_VERSION}
---
apiVersion: infrastructure.cluster.x-k8s.io/${CAPM3_VERSION}
kind: Metal3MachineTemplate
metadata:
name: ${CLUSTER_NAME}-controlplane
namespace: ${NAMESPACE}
spec:
template:
spec:
dataTemplate:
name: ${CLUSTER_NAME}-controlplane-template
image:
checksum: ${IMAGE_RAW_CHECKSUM}
checksumType: ${IMAGE_CHECKSUM_TYPE}
format: raw
url: ${IMAGE_RAW_URL}
---
apiVersion: infrastructure.cluster.x-k8s.io/${CAPM3_VERSION}
kind: Metal3DataTemplate
metadata:
name: ${CLUSTER_NAME}-controlplane-template
namespace: ${NAMESPACE}
spec:
clusterName: ${CLUSTER_NAME}
metaData:
ipAddressesFromIPPool:
- key: provisioningIP
name: provisioning-pool
objectNames:
- key: name
object: machine
- key: local-hostname
object: machine
- key: local_hostname
object: machine
prefixesFromIPPool:
- key: provisioningCIDR
name: provisioning-pool
networkData:
links:
ethernets:
- id: enp1s0
macAddress:
fromHostInterface: enp1s0
type: phy
- id: enp2s0
macAddress:
fromHostInterface: enp2s0
type: phy
networks:
ipv4:
- id: baremetalv4
ipAddressFromIPPool: baremetalv4-pool
link: enp2s0
routes:
- gateway:
fromIPPool: baremetalv4-pool
network: 0.0.0.0
prefix: 0
services:
dns:
- 8.8.8.8