Files
home-automation/.woodpecker/predeploy.yml
Wolfgang Hottgenroth 804e9bf742
Some checks failed
ci/woodpecker/tag/build/4 Pipeline failed
ci/woodpecker/tag/build/3 Pipeline failed
ci/woodpecker/tag/build/2 Pipeline failed
ci/woodpecker/tag/build/1 Pipeline failed
ci/woodpecker/tag/predeploy Pipeline failed
namespace and config 13
2025-11-21 12:11:10 +01:00

38 lines
1.2 KiB
YAML

steps:
create_namespace:
image: quay.io/wollud1969/k8s-admin-helper:0.3.4
environment:
KUBE_CONFIG_CONTENT:
from_secret: kube_config
NAMESPACE: "homea2"
commands:
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
- export KUBECONFIG=/tmp/kubeconfig
- kubectl create namespace ${NAMESPACE} || echo "Namespace ${NAMESPACE} already exists"
when:
event: [tag]
ref:
exclude:
- refs/tags/*-configchange
apply_configuration:
image: quay.io/wollud1969/k8s-admin-helper:0.3.4
environment:
KUBE_CONFIG_CONTENT:
from_secret: kube_config
NAMESPACE: "homea2"
commands:
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
- export KUBECONFIG=/tmp/kubeconfig
- kubectl create configmap home-automation-config \
--from-file=devices=config/devices.yaml \
--from-file=groups=config/groups.yaml \
--from-file=layout=config/layout.yaml \
--from-file=rules=config/rules.yaml \
--from-file=scenes=config/scenes.yaml \
--namespace=$NAMESPACE \
--dry-run=client -o yaml | kubectl apply -f -
when:
event: [tag]