softplayer-controller/hooks/cleanup-pipelineruns.sh
2024-05-04 19:54:14 +02:00

28 lines
692 B
Bash
Executable File

#!/usr/bin/env bash
if [[ $1 == "--config" ]] ; then
cat <<EOF
configVersion: v1
kubernetes:
- name: Watch bootstrap configmaps getting removed
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
executeHookOnSynchronization: false
executeHookOnEvent: ["Modified"]
jqFilter: ".status."
labelSelector:
matchExpressions:
- key: "component"
operator: "In"
values: ["bootstrap"]
EOF
else
# -------------------------------------------------------------------
# If status is succeeded, remove pipelinerun
# If failed, print a warning (till we have a notification system)
# -------------------------------------------------------------------
echo todo
fi