From 5c18869d60ea9fd381b4f91c6a48f5e80a60db3a Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Thu, 6 Apr 2023 08:47:37 +0200 Subject: [PATCH] Fix missing namespaces;Add default empty value --- ansible/roles/assets/tasks/manifests.yml | 4 ++-- .../ansible_payload/bootstrap/templates/applicationset.j2 | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ansible/roles/assets/tasks/manifests.yml b/ansible/roles/assets/tasks/manifests.yml index 5a89f82..52068fb 100644 --- a/ansible/roles/assets/tasks/manifests.yml +++ b/ansible/roles/assets/tasks/manifests.yml @@ -22,8 +22,8 @@ - name: Aggregate chart_values into dict ansible.builtin.set_fact: - workloadcluster_chartvalues: "{{ workloadcluster_chartvalues | default({}) | combine({ item.key: { 'chart_values': (item.value.chart_values | from_yaml) } }) }}" - when: item.value.chart_values is defined + workloadcluster_chartvalues: "{{ workloadcluster_chartvalues | default({}) | combine({ item.key: { 'chart_values': (item.value.chart_values | default('') | from_yaml) } }) }}" + # when: item.value.chart_values is defined loop: "{{ query('ansible.builtin.dict', downstream.helm_charts) }}" loop_control: label: "{{ item.key }}" 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 cdfd461..580752f 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/applicationset.j2 +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/applicationset.j2 @@ -19,6 +19,8 @@ spec: automated: prune: true selfHeal: true + syncOptions: + - CreateNamespace=true sources: - repoURL: {{ _template.repository.url }} targetRevision: {{ _template.repository.revision }}