From 8e766177940cfebeb877d4fb5b23c8bed020ca59 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Mon, 3 Apr 2023 17:25:45 +0200 Subject: [PATCH] Fix repository path;Add chart values;Fix ansible galaxy cli syntax --- .drone.yml | 2 +- ansible/roles/assets/tasks/main.yml | 3 +- .../roles/workloadcluster/tasks/gitops.yml | 2 +- .../bootstrap/templates/applicationset.j2 | 2 +- ansible/vars/workloadcluster.yml | 32 +++++++++++++++++++ 5 files changed, 37 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index b8bc581..5073570 100644 --- a/.drone.yml +++ b/.drone.yml @@ -39,7 +39,7 @@ steps: pull: always commands: - | - ansible-galaxy install \ + ansible-galaxy collection install \ -r ansible/requirements.yml \ -p /scratch/ansible-galaxy volumes: diff --git a/ansible/roles/assets/tasks/main.yml b/ansible/roles/assets/tasks/main.yml index 23ba858..ad8bc81 100644 --- a/ansible/roles/assets/tasks/main.yml +++ b/ansible/roles/assets/tasks/main.yml @@ -16,7 +16,8 @@ - /opt/metacluster/helm-charts - /opt/metacluster/k3s - /opt/metacluster/kube-vip - - /opt/workloadcluster/git-repositories/gitops + - /opt/workloadcluster/git-repositories/gitops/charts + - /opt/workloadcluster/git-repositories/gitops/values - /opt/workloadcluster/helm-charts - /opt/workloadcluster/node-templates - /var/lib/rancher/k3s/agent/images diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/gitops.yml b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/gitops.yml index 6fffb60..8b28efc 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/gitops.yml +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/gitops.yml @@ -8,7 +8,7 @@ - name: Create hard-links to populate new git-repository ansible.builtin.shell: cmd: >- - cp -lr {{ item.path }}/ /opt/workloadcluster/git-repositories/gitops/ + cp -lr {{ item.path }}/ /opt/workloadcluster/git-repositories/gitops/charts loop: "{{ helm_charts.files }}" loop_control: label: "{{ item.path | basename }}" diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/applicationset.j2 b/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/applicationset.j2 index 4160fe4..c2ae97d 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/applicationset.j2 +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/applicationset.j2 @@ -9,7 +9,7 @@ spec: repoURL: {{ _template.repository.url }} revision: HEAD directories: - - path: applicationset/* + - path: charts/* template: metadata: name: {% raw %}'{{ path.basename }}'{% endraw +%} diff --git a/ansible/vars/workloadcluster.yml b/ansible/vars/workloadcluster.yml index 230fcce..3e090ac 100644 --- a/ansible/vars/workloadcluster.yml +++ b/ansible/vars/workloadcluster.yml @@ -15,6 +15,38 @@ downstream: chart_values: !unsafe | defaultSettings: defaultDataPath: /mnt/blockstorage + global: + cattle: + systemDefaultRegistry: registry.{{ vapp['metacluster.fqdn'] }} + image: + longhorn: + engine: + repository: library/docker.io/longhornio/longhorn-engine + manager: + repository: library/docker.io/longhornio/longhorn-manager + ui: + repository: library/docker.io/longhornio/longhorn-ui + instanceManager: + repository: library/docker.io/longhornio/longhorn-instance-manager + shareManager: + repository: library/docker.io/longhornio/longhorn-share-manager + backingImageManager: + repository: library/docker.io/longhornio/backing-image-manager + supportBundleKit: + repository: library/docker.io/longhornio/support-bundle-kit + csi: + attacher: + repository: library/docker.io/longhornio/csi-attacher + provisioner: + repository: library/docker.io/longhornio/csi-provisioner + nodeDriverRegistrar: + repository: library/docker.io/longhornio/csi-node-driver-registrar + resizer: + repository: library/docker.io/longhornio/csi-resizer + snapshotter: + repository: library/docker.io/longhornio/csi-snapshotter + livenessProbe: + repository: library/docker.io/longhornio/livenessprobe sealed-secrets: version: 2.8.1 # (= Sealed Secrets v0.20.2)