2023-02-18 17:46:04 +00:00
|
|
|
---
|
|
|
|
# ----------------------------------------------
|
|
|
|
# -- Helmfile diff changes
|
|
|
|
# ----------------------------------------------
|
|
|
|
kind: pipeline
|
|
|
|
type: kubernetes
|
|
|
|
name: Show helmfile diffs
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
2023-03-23 13:49:48 +00:00
|
|
|
exclude:
|
2023-02-18 17:46:04 +00:00
|
|
|
- main
|
|
|
|
event:
|
2023-03-23 13:49:48 +00:00
|
|
|
- push
|
2023-02-18 17:46:04 +00:00
|
|
|
|
|
|
|
steps:
|
2023-03-23 13:49:48 +00:00
|
|
|
- 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
|
2023-02-18 17:46:04 +00:00
|
|
|
|
2023-03-23 13:49:48 +00:00
|
|
|
- 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
|
2023-02-18 17:46:04 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
# ----------------------------------------------
|
|
|
|
# -- Helmfile apply changes
|
|
|
|
# ----------------------------------------------
|
|
|
|
kind: pipeline
|
|
|
|
type: kubernetes
|
|
|
|
name: Apply helmfile changes
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
event:
|
2023-03-23 13:49:48 +00:00
|
|
|
- push
|
2023-02-18 17:46:04 +00:00
|
|
|
|
|
|
|
steps:
|
2023-03-23 13:49:48 +00:00
|
|
|
- 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
|
2023-02-18 17:46:04 +00:00
|
|
|
|
2023-03-23 13:49:48 +00:00
|
|
|
- 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
|
2023-02-18 17:46:04 +00:00
|
|
|
|
2023-03-23 13:49:48 +00:00
|
|
|
---
|
|
|
|
# ----------------------------------------------
|
|
|
|
# -- 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
|
2023-04-19 06:58:38 +00:00
|
|
|
SOPS_AGE_KEY:
|
|
|
|
from_secret: SOPS_AGE_KEY
|
2023-03-23 13:49:48 +00:00
|
|
|
commands:
|
|
|
|
- cdh --kind helmfile -p $DRONE_WORKSPACE/helmfile.yaml --helmfile-environment badhouseplants -o
|