From 403082c26618a63eb567f634f7940dc1074bfc59 Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Mon, 7 Feb 2022 10:57:09 +0100 Subject: [PATCH] FEAT: more compact helm chart definition omit separate helm_repo variable --- baseline.yml | 4 ++-- vars/helm.yml | 38 ++++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/baseline.yml b/baseline.yml index 4c95719..c682336 100644 --- a/baseline.yml +++ b/baseline.yml @@ -8,9 +8,9 @@ include_vars: helm.yml - name: add chart repos kubernetes.core.helm_repository: - name: "{{ item.repo }}" + name: "{{ item.chart.split('/')[0] }}" repo_url: "{{ item.url }}" - loop: "{{ helm_repos }}" + loop: "{{ helm_charts }}" - name: update helm repos command: helm repo update changed_when: no diff --git a/vars/helm.yml b/vars/helm.yml index 3ad9f35..396c043 100644 --- a/vars/helm.yml +++ b/vars/helm.yml @@ -1,16 +1,9 @@ --- -helm_repos: - - { repo: argocd, url: https://argoproj.github.io/argo-helm } - - { repo: bitnami, url: https://charts.bitnami.com/bitnami } - - { repo: ingress-nginx, url: https://kubernetes.github.io/ingress-nginx } - - { repo: jetstack, url: https://charts.jetstack.io } - - { repo: keel, url: https://charts.keel.sh } - - { repo: prometheus-community, url: https://prometheus-community.github.io/helm-charts } - helm_charts: - - chart: ingress-nginx/ingress-nginx - name: ingress-nginx + - name: ingress-nginx + chart: ingress-nginx/ingress-nginx + url: https://kubernetes.github.io/ingress-nginx vals: controller: image: @@ -24,27 +17,31 @@ helm_charts: additionalLabels: release: monitoring # same as prometheus-community chart name - - chart: jetstack/cert-manager - name: cert-manager + - name: cert-manager + url: https://charts.jetstack.io + chart: jetstack/cert-manager vals: installCRDs: true - - chart: argocd/argo-cd - name: argocd + - name: argocd + chart: argocd/argo-cd + url: https://argoproj.github.io/argo-helm vals: server: replicas: 0 dex: enabled: false - - chart: keel/keel - name: keel + - name: keel + url: https://charts.keel.sh + chart: keel/keel vals: helmProvider: enabled: false - - chart: bitnami/metrics-server - name: metrics-server + - name: metrics-server + url: https://charts.bitnami.com/bitnami + chart: bitnami/metrics-server namespace: metrics version: 5.8.8 vals: @@ -54,8 +51,9 @@ helm_charts: kubelet-insecure-tls: true kubelet-preferred-address-types: InternalIP - - chart: prometheus-community/kube-prometheus-stack - name: monitoring + - name: monitoring + url: https://prometheus-community.github.io/helm-charts + chart: prometheus-community/kube-prometheus-stack namespace: metrics vals: alertmanager: