Refine templating #5
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2022-07-09 12:35:29 +02:00
parent 243cf426d7
commit abacbf90ce
2 changed files with 34 additions and 34 deletions

View File

@ -25,7 +25,7 @@
- name: Aggregate chart_values into dict - name: Aggregate chart_values into dict
ansible.builtin.set_fact: ansible.builtin.set_fact:
chart_values: "{{ chart_values | default({}) | combine({ item.key: (item.value.helm.chart_values | default('~')) }) }}" chart_values: "{{ chart_values | default({}) | combine({ item.key: { 'chart_values': (item.value.helm.chart_values | default('~')) } }) }}"
loop: "{{ lookup('ansible.builtin.dict', components) }}" loop: "{{ lookup('ansible.builtin.dict', components) }}"
loop_control: loop_control:
label: "{{ item.key }}" label: "{{ item.key }}"

View File

@ -20,7 +20,7 @@ components:
version: 1.3.0 version: 1.3.0
chart: longhorn/longhorn chart: longhorn/longhorn
parse_logic: cat values.yaml | yq eval '.. | select(has("repository")) | .repository + ":" + .tag' parse_logic: cat values.yaml | yq eval '.. | select(has("repository")) | .repository + ":" + .tag'
chart_values: |4 chart_values:
defaultSettings: defaultSettings:
defaultDataPath: /mnt/blockstorage defaultDataPath: /mnt/blockstorage
defaultReplicaCount: 1 defaultReplicaCount: 1
@ -35,7 +35,7 @@ components:
version: 1.9.1 # (= Harbor v2.5.1) version: 1.9.1 # (= Harbor v2.5.1)
chart: harbor/harbor chart: harbor/harbor
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /' parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
chart_values: |4 chart_values:
expose: expose:
ingress: ingress:
hosts: hosts:
@ -50,7 +50,7 @@ components:
version: v5.0.9 # (= Gitea v1.16.8) version: v5.0.9 # (= Gitea v1.16.8)
chart: gitea-charts/gitea chart: gitea-charts/gitea
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | sed '/:/!s/$/:latest/' parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | sed '/:/!s/$/:latest/'
chart_values: |4 chart_values:
gitea: gitea:
admin: admin:
username: administrator username: administrator