vms/recipes/nuo/templates/conf/kind/cluster.yaml.pktpl.hcl

40 lines
1.0 KiB
HCL
Raw Normal View History

2023-10-11 09:29:46 +02:00
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: ${Vars.Cluster.Name}
networking:
podSubnet: "${Vars.Cluster.PodSubNet}"
serviceSubnet: "${Vars.Cluster.ServieSubNet}"
nodes:
%{ for nd in Vars.Cluster.Nodes }
- role: ${nd.Role}
image: kindest/node:v${Vars.Cluster.Version}
%{ if nd.Role == "control-plane"}
kubeadmConfigPatches:
- |
kind: InitConfiguration
%{ if Vars.Cluster.IngressReady }
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
%{ endif }
extraPortMappings:
- containerPort: 31000
hostPort: 31000
listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0"
- containerPort: 80
hostPort: 8080
listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0"
%{ if Vars.Cluster.IngressReady }
labels:
ingress-ready: true
%{ endif }
%{ endif }
%{ if nd.Role == "worker" }
kubeadmConfigPatches:
- |
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
system-reserved: memory=2Gi
%{ endif }
%{ endfor ~}