Remove debugging;Revert default quotes;Test dynamic helm chart values
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Danny Bessems 2022-07-10 09:54:41 +02:00
parent 0b97ae2fc5
commit d6c885240a
3 changed files with 59 additions and 50 deletions

View File

@ -63,15 +63,15 @@
create_namespace: yes
wait: yes
kubeconfig: "{{ kubeconfig.path }}"
values:
defaultSettings:
defaultDataPath: /mnt/blockstorage
defaultReplicaCount: 1
ingress:
enabled: true
host: storage.{{ vapp['metacluster.fqdn'] }}
persistence:
defaultClassReplicaCount: 1
values: "{{ components.longhorn.chart_values }}"
# defaultSettings:
# defaultDataPath: /mnt/blockstorage
# defaultReplicaCount: 1
# ingress:
# enabled: true
# host: storage.{{ vapp['metacluster.fqdn'] }}
# persistence:
# defaultClassReplicaCount: 1
- name: Install harbor chart
kubernetes.core.helm:
@ -81,15 +81,15 @@
create_namespace: yes
wait: yes
kubeconfig: "{{ kubeconfig.path }}"
values:
expose:
ingress:
hosts:
core: registry.{{ vapp['metacluster.fqdn'] }}
externalURL: https://registry.{{ vapp['metacluster.fqdn'] }}
harborAdminPassword: "{{ vapp['guestinfo.rootpw'] }}"
notary:
enabled: false
values: "{{ components.harbor.chart_values }}"
# expose:
# ingress:
# hosts:
# core: registry.{{ vapp['metacluster.fqdn'] }}
# externalURL: https://registry.{{ vapp['metacluster.fqdn'] }}
# harborAdminPassword: "{{ vapp['guestinfo.rootpw'] }}"
# notary:
# enabled: false
- name: Push images to registry
ansible.builtin.shell:
@ -126,41 +126,41 @@
create_namespace: yes
wait: yes
kubeconfig: "{{ kubeconfig.path }}"
values:
gitea:
admin:
username: administrator
password: "{{ vapp['guestinfo.rootpw'] }}"
email: admin@{{ vapp['metacluster.fqdn'] }}
image:
pullPolicy: IfNotPresent
ingress:
enabled: true
hosts:
- host: git.{{ vapp['metacluster.fqdn'] }}
paths:
- path: /
pathType: Prefix
values: "{{ components.gitea.chart_values }}"
# gitea:
# admin:
# username: administrator
# password: "{{ vapp['guestinfo.rootpw'] }}"
# email: admin@{{ vapp['metacluster.fqdn'] }}
# image:
# pullPolicy: IfNotPresent
# ingress:
# enabled: true
# hosts:
# - host: git.{{ vapp['metacluster.fqdn'] }}
# paths:
# - path: /
# pathType: Prefix
- name: Install argo-cd chart
kubernetes.core.helm:
name: argo-cd
chart_ref: /opt/metacluster/helm-charts/argo-cd
chart_ref: /opt/metacluster/helm-charts/argocd
release_namespace: argo-cd
create_namespace: yes
wait: yes
kubeconfig: "{{ kubeconfig.path }}"
values:
server:
extraArgs:
- --insecure
ingress:
enabled: true
hosts:
- gitops.{{ vapp['metacluster.fqdn'] }}
configs:
secret:
argocdServerAdminPassword: "{{ vapp['guestinfo.rootpw'] | password_hash('bcrypt') }}"
values: "{{ components.argocd.chart_values }}"
# server:
# extraArgs:
# - --insecure
# ingress:
# enabled: true
# hosts:
# - gitops.{{ vapp['metacluster.fqdn'] }}
# configs:
# secret:
# argocdServerAdminPassword: "{{ vapp['guestinfo.rootpw'] | password_hash('bcrypt') }}"
- name: Cleanup tempfile
ansible.builtin.file:

View File

@ -31,13 +31,10 @@
loop_control:
label: "{{ item.key }}"
- ansible.builtin.debug:
msg: "{{ chart_values | to_nice_yaml(default_style='\"', indent=2, width=4096) }}"
- name: Write dict to vars_file
ansible.builtin.blockinfile:
path: /opt/firstboot/ansible/vars/metacluster.yml
block: "{{ { 'components': chart_values } | to_nice_yaml(default_style='\"', indent=2, width=4096) }}"
block: "{{ { 'components': chart_values } | to_nice_yaml(indent=2, width=4096) }}"
- name: Parse helm charts for container images
ansible.builtin.shell:

View File

@ -66,11 +66,23 @@ components:
- path: /
pathType: Prefix
argo-cd:
argocd:
helm:
version: 4.9.7 # (= ArgoCD v2.4.2)
chart: argo/argo-cd
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
chart_values:
server:
extraArgs:
- --insecure
ingress:
enabled: true
hosts:
- gitops.[% vapp['metacluster.fqdn'] %]
configs:
secret:
argocdServerAdminPassword: "[% vapp['guestinfo.rootpw'] | password_hash('bcrypt') %]"
dependencies: