workflow according to Story
UPDATE + ADD BINS
- UPDATE BIN VERSIONS
- ADD BINS: K9S, HELM + HELMFILE
UPDATED CONFIG
- config should be dynamic e.g. there should be a var for the count of workers (so jinja logic is requried)
- kubernetes version should be a variable
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
disableDefaultCNI: true
kubeProxyMode: none
nodes:
- role: control-plane
image: kindest/node:v1.32.2
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
- role: worker
image: kindest/node:v1.32.2
extraMounts:
- hostPath: /mnt/data-node1 # Host directory to mount
containerPath: /data # Mount path inside the KinD node
- role: worker
image: kindest/node:v1.32.2
extraMounts:
- hostPath: /mnt/data-node2 # Host directory to mount
containerPath: /data # Mount path inside the KinD node
- role: worker
image: kindest/node:v1.32.2
extraMounts:
- hostPath: /mnt/data-node3 # Host directory to mount
containerPath: /data # Mount path inside the KinD node
TEST PLAYBOOK
- update bin versions, add helmfile to the bins
- update and test with molecue
cat <<EOF > install-configure-docker.yaml
---
- hosts: "{{ target_host | default('all') }}"
become: true
vars:
docker_install_compose: true
docker_version: '' # leave empty for latest version or set e.g. '=5:23.0.6-1~ubuntu.23.04~lunar'
install_kind: true
kind_version: 0.22.0
kubectl_version: 1.30.0
EOF
- test with kind enabled first against some test vm
- the template of kind cluster should be DRY = e.g. loop over workers
kubernetes_version: 1.32
count_controlplane_nodes: 1
count_workers_nodes: 3
enable_ingress_ports: true/false
enable_host_paths: true/false
e.g. true enables this block under a control plane node:
```yaml
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
- test with molecule - first the given coverage-yml - if this works extend for kind option
workflow according to Story
UPDATE + ADD BINS
UPDATED CONFIG
TEST PLAYBOOK