-
Notifications
You must be signed in to change notification settings - Fork 1
/
cluster-template.yaml
176 lines (176 loc) · 4.84 KB
/
cluster-template.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
kind: TalosControlPlane
metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
version: ${KUBERNETES_VERSION}
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: PacketMachineTemplate
name: "${CLUSTER_NAME}-control-plane"
controlPlaneConfig:
init:
generateType: init
talosVersion: ${TALOS_VERSION}
configPatches:
- op: replace
path: /machine/install
value:
disk: /dev/sda
image: ghcr.io/siderolabs/installer:${TALOS_VERSION}
bootloader: true
wipe: false
# review options here
- op: add
path: /machine/kubelet/extraArgs
value:
cloud-provider: external
# provider-id: "equinixmetal://{{ `{{ v1.instance_id }}` }}"
- op: add
path: /cluster/apiServer/extraArgs
value:
cloud-provider: external
- op: add
path: /cluster/controllerManager/extraArgs
value:
cloud-provider: external
- op: add
path: /cluster/allowSchedulingOnMasters
value: true
- op: add
path: /cluster/extraManifests
value:
- https://github.com/equinix/cloud-provider-equinix-metal/releases/download/v3.5.0/deployment.yaml
controlplane:
generateType: controlplane
talosVersion: ${TALOS_VERSION}
configPatches:
- op: replace
path: /machine/install
value:
disk: /dev/sda
image: ghcr.io/siderolabs/installer:${TALOS_VERSION}
bootloader: true
wipe: false
# review options here
- op: add
path: /machine/kubelet/extraArgs
value:
cloud-provider: external
# provider-id: "equinixmetal://{{ `{{ v1.instance_id }}` }}"
- op: add
path: /cluster/apiServer/extraArgs
value:
cloud-provider: external
- op: add
path: /cluster/controllerManager/extraArgs
value:
cloud-provider: external
- op: add
path: /cluster/allowSchedulingOnMasters
value: true
- op: add
path: /cluster/extraManifests
value:
- https://github.com/equinix/cloud-provider-equinix-metal/releases/download/v3.5.0/deployment.yaml
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: PacketMachineTemplate
metadata:
name: "${CLUSTER_NAME}-control-plane"
spec:
template:
spec:
os: "${NODE_OS:=talos_v1}"
billingCycle: hourly
machineType: "${CONTROLPLANE_NODE_TYPE}"
sshKeys:
- "${SSH_KEY}"
tags: []
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: "${CLUSTER_NAME}"
spec:
clusterNetwork:
pods:
cidrBlocks:
- ${POD_CIDR:=192.168.0.0/16}
services:
cidrBlocks:
- ${SERVICE_CIDR:=172.26.0.0/16}
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: PacketCluster
name: "${CLUSTER_NAME}"
controlPlaneRef:
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
kind: TalosControlPlane
name: "${CLUSTER_NAME}-control-plane"
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: PacketCluster
metadata:
name: "${CLUSTER_NAME}"
spec:
projectID: "${PROJECT_ID}"
facility: "${FACILITY}"
vipManager: "CPEM"
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
metadata:
name: ${CLUSTER_NAME}-worker-a
labels:
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
pool: worker-a
spec:
replicas: ${WORKER_MACHINE_COUNT}
clusterName: ${CLUSTER_NAME}
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
pool: worker-a
template:
metadata:
labels:
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
pool: worker-a
spec:
version: ${KUBERNETES_VERSION}
clusterName: ${CLUSTER_NAME}
bootstrap:
configRef:
name: ${CLUSTER_NAME}-worker-a
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
kind: TalosConfigTemplate
infrastructureRef:
name: ${CLUSTER_NAME}-worker-a
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: PacketMachineTemplate
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: PacketMachineTemplate
metadata:
name: ${CLUSTER_NAME}-worker-a
spec:
template:
spec:
os: "${NODE_OS:=talos_v1}"
billingCycle: hourly
machineType: "${WORKER_NODE_TYPE}"
sshKeys:
- "${SSH_KEY}"
tags: []
---
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
kind: TalosConfigTemplate
metadata:
name: ${CLUSTER_NAME}-worker-a
spec:
template:
spec:
generateType: join
talosVersion: ${TALOS_VERSION}