feat: switch kubeconfig to tailnet endpoint and deploy Hetzner CSI
All checks were successful
Deploy Cluster / Terraform (push) Successful in 51s
Deploy Cluster / Ansible (push) Successful in 3m12s

This commit is contained in:
2026-03-01 17:12:12 +00:00
parent 54717cccad
commit 2bc9749b81
5 changed files with 48 additions and 3 deletions

View File

@@ -0,0 +1,4 @@
---
hcloud_token: ""
cluster_name: "k8s-cluster"
csi_manifest_url: "https://raw.githubusercontent.com/hetznercloud/csi-driver/v2.12.0/deploy/kubernetes/hcloud-csi.yml"

View File

@@ -0,0 +1,30 @@
---
- name: Create Hetzner CSI secret
shell: |
kubectl -n kube-system create secret generic hcloud-csi \
--from-literal=token='{{ hcloud_token }}' \
--from-literal=network='{{ cluster_name }}-network' \
--dry-run=client -o yaml | kubectl apply -f -
no_log: true
when: hcloud_token is defined
changed_when: true
- name: Deploy Hetzner CSI
command: kubectl apply -f {{ csi_manifest_url }}
changed_when: true
- name: Wait for CSI controller rollout
command: kubectl rollout status deployment/hcloud-csi-controller -n kube-system
register: csi_controller_rollout
until: csi_controller_rollout.rc == 0
retries: 30
delay: 10
changed_when: false
- name: Wait for CSI node daemonset rollout
command: kubectl rollout status daemonset/hcloud-csi-node -n kube-system
register: csi_node_rollout
until: csi_node_rollout.rc == 0
retries: 30
delay: 10
changed_when: false