-
Notifications
You must be signed in to change notification settings - Fork 0
/
controlplane.yaml.tpl
277 lines (257 loc) · 7.26 KB
/
controlplane.yaml.tpl
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
machine:
certSANs:
- ${control_plane_vip}
- ${hostname}
- ${node_ip}
kubelet:
extraArgs:
node-ip: ${node_ip}
v: 5
extraConfig:
serverTLSBootstrap: true
allowedUnsafeSysctls:
- net.ipv4.ip_forward
maxPods: ${available_hosts_per_subnet}
nodeIP:
validSubnets:
- ${node_ip}/32
network:
hostname: ${hostname}
interfaces:
- interface: eth0
addresses:
- ${node_ip}/${element(split("/", network_cidr), 1)}
vip:
ip: ${control_plane_vip}
nameservers: ${jsonencode(network_dns_servers)}
time:
servers:
- time.google.com
features:
kubernetesTalosAPIAccess:
enabled: true
allowedRoles:
- os:reader
allowedKubernetesNamespaces:
- kube-system
- default
kubePrism:
enabled: true
port: 7445
cluster:
discovery:
enabled: true
registries:
kubernetes:
disabled: false
service:
disabled: true
network:
dnsDomain: ${kubernetes_cluster_domain}
podSubnets: ${format("%#v",split(",",pod_cidr))}
serviceSubnets: ${format("%#v",split(",",service_cidr))}
cni:
name: custom
proxy:
disabled: true
externalCloudProvider:
enabled: true
manifests:
- https://raw.githubusercontent.com/hcavarsan/homelab/main/manifests/talos/fluxcd.yaml
- https://raw.githubusercontent.com/hcavarsan/homelab/main/manifests/talos/fluxcd-install.yaml
allowSchedulingOnControlPlanes: true
etcd:
advertisedSubnets:
- ${network_cidr}
extraArgs:
listen-metrics-urls: http://0.0.0.0:2381
controllerManager:
extraArgs:
node-cidr-mask-size-ipv4: ${new_subnet_bits}
extraManifests: []
inlineManifests:
- name: external-dns
contents: |-
apiVersion: v1
kind: Namespace
metadata:
name: external-dns
- name: cilium
contents: |-
apiVersion: v1
kind: Namespace
metadata:
name: cilium
labels:
pod-security.kubernetes.io/enforce: "privileged"
- name: csr-approver
contents: |-
${indent(8, manifests_csr_approver)}
- name: proxmox-ccm
contents: |-
${indent(8, manifests_promox_ccm)}
- name: cilium-deploy
contents: |-
${indent(8, manifests_cilium)}
- name: cilium-lb-pool
contents: |-
apiVersion: cilium.io/v2alpha1
kind: CiliumLoadBalancerIPPool
metadata:
name: main-pool
spec:
cidrs:
- cidr: 192.168.68.20/29
- name: cilium-l2-policy
contents: |-
apiVersion: cilium.io/v2alpha1
kind: CiliumL2AnnouncementPolicy
metadata:
name: policy
spec:
loadBalancerIPs: true
interfaces:
- .*
nodeSelector:
matchLabels:
kubernetes.io/os: linux
- name: fluxcd
contents: |-
apiVersion: v1
kind: Namespace
metadata:
name: flux-system
labels:
app.kubernetes.io/instance: flux-system
app.kubernetes.io/part-of: flux
pod-security.kubernetes.io/warn: restricted
pod-security.kubernetes.io/warn-version: latest
- name: flux-system-secret
contents: |-
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: github-creds
namespace: flux-system
data:
identity: ${base64encode(identity)}
identity.pub: ${base64encode(identitypub)}
known_hosts: ${base64encode(knownhosts)}
- name: flux-vars
contents: |-
apiVersion: v1
kind: ConfigMap
metadata:
namespace: flux-system
name: cluster-settings
data:
STORAGE_CLASS: "default-class"
STORAGE_CLASS_XFS: "xfs-class"
CLUSTER_0_VIP: ${control_plane_vip}
- name: cert-manager
contents: |-
apiVersion: v1
kind: Namespace
metadata:
name: cert-manager
labels:
pod-security.kubernetes.io/enforce: "privileged"
- name: cloudflare-api-token
contents: |-
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: cloudflare-api-token
namespace: cert-manager
data:
api-token: ${base64encode(cloudflare_token)}
- name: cloudflare-api-token-external-dns
contents: |-
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: cloudflare-api-token
namespace: external-dns
data:
api-token: ${base64encode(cloudflare_token)}
- name: cloudflare-api-cluster-issuer
contents: |-
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
annotations:
meta.helm.sh/release-name: cert-manager
meta.helm.sh/release-namespace: cert-manager
name: letsencrypt-production
labels:
app.kubernetes.io/managed-by: Helm
meta.helm.sh/release-name: "cert-manager"
meta.helm.sh/release-namespace: "cert-manager"
spec:
acme:
email: [email protected]
preferredChain: ""
privateKeySecretRef:
name: cloudflare-issuer-account-key
server: https://acme-v02.api.letsencrypt.org/directory
solvers:
- dns01:
cloudflare:
apiTokenSecretRef:
key: api-token
name: cloudflare-api-token
email: [email protected]
- name: externaldns-deploy
contents: |-
${indent(8, manifests_external_dns)}
- name: csi-proxmox-deploy
contents: |-
${indent(8, manifests_csi_proxmox)}
- name: csi-proxmox-ns
contents: |-
apiVersion: v1
kind: Namespace
metadata:
name: csi-proxmox
labels:
pod-security.kubernetes.io/enforce: privileged
pod-security.kubernetes.io/audit: baseline
pod-security.kubernetes.io/warn: baseline
- name: traefik-ingress-ns
contents: |-
apiVersion: v1
kind: Namespace
metadata:
name: traefik-ingress
labels:
pod-security.kubernetes.io/enforce: privileged
pod-security.kubernetes.io/audit: baseline
pod-security.kubernetes.io/warn: baseline
- name: traefik-ingress-default-cert
contents: |-
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: cavarsa-app
namespace: traefik-ingress
spec:
secretName: cavarsa-app
issuerRef:
kind: ClusterIssuer
name: letsencrypt-production
commonName: '*.cavarsa.app'
dnsNames:
- '*.cavarsa.app'
- name: traefik-ingress-default-tls
contents: |-
apiVersion: traefik.containo.us/v1alpha1
kind: TLSStore
metadata:
name: default
namespace: traefik-ingress
spec:
defaultCertificate:
secretName: cavarsa-app