From a2bd88b8b060e557235851d6646cc99ade42caf3 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Thu, 23 Mar 2023 13:49:48 +0000 Subject: [PATCH] Start using CDH (#42) Reviewed-on: https://git.badhouseplants.net/badhouseplants/k8s-cluster-config/pulls/42 --- .drone.yml | 114 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 67 insertions(+), 47 deletions(-) diff --git a/.drone.yml b/.drone.yml index a326c90..2c60c08 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,35 +8,35 @@ name: Show helmfile diffs trigger: branch: - exclude: + exclude: - main event: - - push + - push steps: -- name: Diff badhouseplants - image: ghcr.io/helmfile/helmfile:canary - environment: - KUBECONFIG_CONTENT: - from_secret: KUBECONFIG_CONTENT - SOPS_AGE_KEY: - from_secret: SOPS_AGE_KEY - commands: - - mkdir $HOME/.kube - - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config - - helmfile -e badhouseplants diff --suppress-secrets + - name: Diff badhouseplants + image: ghcr.io/helmfile/helmfile:canary + environment: + KUBECONFIG_CONTENT: + from_secret: KUBECONFIG_CONTENT + SOPS_AGE_KEY: + from_secret: SOPS_AGE_KEY + commands: + - mkdir $HOME/.kube + - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config + - helmfile -e badhouseplants diff --suppress-secrets -- name: Diff eterosoft - image: ghcr.io/helmfile/helmfile:canary - environment: - SOPS_AGE_KEY: - from_secret: SOPS_AGE_KEY - KUBECONFIG_CONTENT: - from_secret: KUBECONFIG_CONTENT - commands: - - mkdir $HOME/.kube - - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config - - helmfile -e etersoft diff --suppress-secrets + - name: Diff eterosoft + image: ghcr.io/helmfile/helmfile:canary + environment: + SOPS_AGE_KEY: + from_secret: SOPS_AGE_KEY + KUBECONFIG_CONTENT: + from_secret: KUBECONFIG_CONTENT + commands: + - mkdir $HOME/.kube + - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config + - helmfile -e etersoft diff --suppress-secrets --- # ---------------------------------------------- @@ -50,30 +50,50 @@ trigger: branch: - main event: - - push + - push steps: -- name: Apply badhouseplants - image: ghcr.io/helmfile/helmfile:canary - environment: - KUBECONFIG_CONTENT: - from_secret: KUBECONFIG_CONTENT - SOPS_AGE_KEY: - from_secret: SOPS_AGE_KEY - commands: - - mkdir $HOME/.kube - - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config - - helmfile -e badhouseplants apply --suppress-secrets + - name: Apply badhouseplants + image: ghcr.io/helmfile/helmfile:canary + environment: + KUBECONFIG_CONTENT: + from_secret: KUBECONFIG_CONTENT + SOPS_AGE_KEY: + from_secret: SOPS_AGE_KEY + commands: + - mkdir $HOME/.kube + - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config + - helmfile -e badhouseplants apply --suppress-secrets -- name: Apply eterosoft - image: ghcr.io/helmfile/helmfile:canary - environment: - KUBECONFIG_CONTENT: - from_secret: KUBECONFIG_CONTENT - SOPS_AGE_KEY: - from_secret: SOPS_AGE_KEY - commands: - - mkdir $HOME/.kube - - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config - - helmfile -e etersoft apply --suppress-secrets + - name: Apply eterosoft + image: ghcr.io/helmfile/helmfile:canary + environment: + KUBECONFIG_CONTENT: + from_secret: KUBECONFIG_CONTENT + SOPS_AGE_KEY: + from_secret: SOPS_AGE_KEY + commands: + - mkdir $HOME/.kube + - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config + - helmfile -e etersoft apply --suppress-secrets +--- +# ---------------------------------------------- +# -- Check da helm pipeline +# ---------------------------------------------- +kind: pipeline +type: kubernetes +name: Check helmfiles +trigger: + event: + - cron + cron: + - daily + +steps: + - name: Check badhouseplants + image: ghcr.io/allanger/check-da-helm-helmfile:stable + environment: + RUST_LOG: info + commands: + - cdh --kind helmfile -p $DRONE_WORKSPACE/helmfile.yaml --helmfile-environment badhouseplants -o