feat(k3s): allow custom Helm manifests installation
This commit is contained in:
parent
f9aa2cfed5
commit
193ee7c447
3 changed files with 16 additions and 0 deletions
|
@ -7,3 +7,4 @@ k3s_operator_ips: []
|
|||
k3s_cluster_cidr: '10.42.0.0/16'
|
||||
k3s_service_cidr: '10.43.0.0/16'
|
||||
k3s_cluster_additional_helm_charts: []
|
||||
k3s_cluster_helm_customizations: []
|
||||
|
|
|
@ -42,12 +42,26 @@
|
|||
when: k3s_cluster_type is match("ha")
|
||||
failed_when: true
|
||||
|
||||
- name: install K3S Helm customizations
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ k3s_manifests_dir }}/{{ item.name | regex_replace('[^\\w]', '') }}.yaml"
|
||||
content: '{{ item.content }}'
|
||||
mode: '0600'
|
||||
owner: root
|
||||
group: root
|
||||
loop: '{{ k3s_cluster_helm_customizations }}'
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
no_log: true
|
||||
|
||||
- name: install Helm charts
|
||||
connection: local
|
||||
kubernetes.core.helm: '{{ item }}'
|
||||
loop: '{{ k3s_cluster_additional_helm_charts }}'
|
||||
loop_control:
|
||||
label: '{{ item.release_name }}'
|
||||
no_log: true
|
||||
tags: [helm]
|
||||
|
||||
- name: install OpenTofu resources
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
---
|
||||
k3s_manifests_dir: '/var/lib/rancher/k3s/server/manifests'
|
||||
|
|
Loading…
Add table
Reference in a new issue