feat: migrate core addons toward flux
This commit is contained in:
22
ansible/roles/addon-secrets-bootstrap/tasks/main.yml
Normal file
22
ansible/roles/addon-secrets-bootstrap/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Apply Hetzner cloud secret
|
||||
shell: >-
|
||||
kubectl -n kube-system create secret generic hcloud
|
||||
--from-literal=token='{{ hcloud_token }}'
|
||||
--from-literal=network='{{ cluster_name }}-network'
|
||||
--dry-run=client -o yaml | kubectl apply -f -
|
||||
changed_when: true
|
||||
no_log: true
|
||||
when: hcloud_token | default('') | length > 0
|
||||
|
||||
- name: Apply Tailscale operator OAuth secret
|
||||
shell: >-
|
||||
kubectl -n {{ tailscale_operator_namespace | default('tailscale-system') }} create secret generic operator-oauth
|
||||
--from-literal=client_id='{{ tailscale_oauth_client_id }}'
|
||||
--from-literal=client_secret='{{ tailscale_oauth_client_secret }}'
|
||||
--dry-run=client -o yaml | kubectl apply -f -
|
||||
changed_when: true
|
||||
no_log: true
|
||||
when:
|
||||
- tailscale_oauth_client_id | default('') | length > 0
|
||||
- tailscale_oauth_client_secret | default('') | length > 0
|
||||
Reference in New Issue
Block a user