2023-02-18 17:46:04 +00:00
|
|
|
---
|
|
|
|
# ----------------------------------------------
|
|
|
|
# -- Helmfile diff changes
|
|
|
|
# ----------------------------------------------
|
|
|
|
kind: pipeline
|
2023-05-18 17:58:57 +00:00
|
|
|
type: docker
|
2023-02-18 17:46:04 +00:00
|
|
|
name: Show helmfile diffs
|
2023-05-18 17:58:57 +00:00
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
2023-02-18 17:46:04 +00:00
|
|
|
|
|
|
|
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:
|
2023-05-21 10:08:53 +00:00
|
|
|
KUBECONFIG_CONTENT:
|
|
|
|
from_secret: KUBECONFIG_CONTENT
|
2023-03-23 13:49:48 +00:00
|
|
|
SOPS_AGE_KEY:
|
|
|
|
from_secret: SOPS_AGE_KEY
|
|
|
|
commands:
|
2023-05-21 10:08:53 +00:00
|
|
|
- mkdir $HOME/.kube
|
|
|
|
- echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config
|
2023-03-23 13:49:48 +00:00
|
|
|
- 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
|
2023-05-21 10:08:53 +00:00
|
|
|
KUBECONFIG_CONTENT:
|
|
|
|
from_secret: KUBECONFIG_CONTENT
|
2023-03-23 13:49:48 +00:00
|
|
|
commands:
|
2023-05-21 10:08:53 +00:00
|
|
|
- mkdir $HOME/.kube
|
|
|
|
- echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config
|
2023-03-23 13:49:48 +00:00
|
|
|
- helmfile -e etersoft diff --suppress-secrets
|
2023-02-18 17:46:04 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
# ----------------------------------------------
|
|
|
|
# -- Helmfile apply changes
|
|
|
|
# ----------------------------------------------
|
|
|
|
kind: pipeline
|
2023-05-18 17:58:57 +00:00
|
|
|
type: docker
|
2023-02-18 17:46:04 +00:00
|
|
|
name: Apply helmfile changes
|
|
|
|
|
2023-05-18 17:58:57 +00:00
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
2023-02-18 17:46:04 +00:00
|
|
|
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:
|
2023-05-21 10:08:53 +00:00
|
|
|
KUBECONFIG_CONTENT:
|
|
|
|
from_secret: KUBECONFIG_CONTENT
|
2023-03-23 13:49:48 +00:00
|
|
|
SOPS_AGE_KEY:
|
|
|
|
from_secret: SOPS_AGE_KEY
|
|
|
|
commands:
|
2023-05-21 10:08:53 +00:00
|
|
|
- mkdir $HOME/.kube
|
|
|
|
- echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config
|
2023-03-23 13:49:48 +00:00
|
|
|
- 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:
|
2023-05-21 10:08:53 +00:00
|
|
|
KUBECONFIG_CONTENT:
|
|
|
|
from_secret: KUBECONFIG_CONTENT
|
2023-03-23 13:49:48 +00:00
|
|
|
SOPS_AGE_KEY:
|
|
|
|
from_secret: SOPS_AGE_KEY
|
|
|
|
commands:
|
2023-05-21 10:08:53 +00:00
|
|
|
- mkdir $HOME/.kube
|
|
|
|
- echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config
|
2023-03-23 13:49:48 +00:00
|
|
|
- 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
|
2023-05-18 17:58:57 +00:00
|
|
|
type: docker
|
2023-03-23 13:49:48 +00:00
|
|
|
name: Check helmfiles
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- cron
|
|
|
|
cron:
|
|
|
|
- daily
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check badhouseplants
|
2023-05-04 11:13:08 +00:00
|
|
|
image: ghcr.io/allanger/check-da-helm-helmfile-secrets:stable
|
2023-03-23 13:49:48 +00:00
|
|
|
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
|