mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Use hcloud-csi to provision volumes
This commit is contained in:
parent
43dd47e761
commit
c4c6c2ff79
3 changed files with 89 additions and 60 deletions
22
roles/k8s-manifests/tasks/hcloud-csi.yml
Normal file
22
roles/k8s-manifests/tasks/hcloud-csi.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
- name: Create secret with token for CSI driver
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: hcloud-csi
|
||||
namespace: kube-system
|
||||
stringData:
|
||||
token: "{{ hcloud_token_csi }}"
|
||||
|
||||
- name: Download the CSI driver manifest
|
||||
get_url:
|
||||
url: https://raw.githubusercontent.com/hetznercloud/csi-driver/master/deploy/kubernetes/hcloud-csi.yml
|
||||
dest: /tmp/hcloud-csi.yml
|
||||
mode: 0600
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Apply CSI driver manifest
|
||||
k8s:
|
||||
state: present
|
||||
definition: "{{ lookup('file', '/tmp/hcloud-csi.yml') }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue