feat: Move webhooks to add-ons directory

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2022-12-16 17:02:50 -05:00
1 parent 1134b2927b
commit 8a257b07af
4 files changed
+5 -44

No files matched your search

@@ -1,30 +0,0 @@
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
metadata:
name: kube-prometheus-stack
namespace: flux-system
spec:
interval: 12h
url: https://github.com/prometheus-community/helm-charts.git
ref:
# renovate: registryUrl=https://prometheus-community.github.io/helm-charts chart=kube-prometheus-stack
tag: kube-prometheus-stack-42.1.0
ignore: |
# exclude all
/*
# include crd directory
!/charts/kube-prometheus-stack/crds
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: kube-prometheus-stack-crds
namespace: flux-system
spec:
interval: 30m
prune: false
wait: true
sourceRef:
kind: GitRepository
name: kube-prometheus-stack
@@ -1,6 +0,0 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: flux-system
resources:
- ./kube-prometheus-stack.yaml
-1
View File
@@ -4,4 +4,3 @@ kind: Kustomization
resources: resources:
- ./flux-installation.yaml - ./flux-installation.yaml
- ./flux-cluster.yaml - ./flux-cluster.yaml
- ./crds
Vendored
+5 -7
View File
@@ -299,16 +299,14 @@ setup_github_webhook() {
export BOOTSTRAP_FLUX_GITHUB_WEBHOOK_SECRET="${WEBHOOK_SECRET}" export BOOTSTRAP_FLUX_GITHUB_WEBHOOK_SECRET="${WEBHOOK_SECRET}"
_log "INFO" "Using GitHub Token '${WEBHOOK_SECRET}' for Flux" _log "INFO" "Using GitHub Token '${WEBHOOK_SECRET}' for Flux"
cp -rf "${PROJECT_DIR}/tmpl/cluster/flux/webhooks" "${PROJECT_DIR}/cluster/flux/config" mkdir -p "${PROJECT_DIR}/cluster/flux/add-ons"
cp -rf "${PROJECT_DIR}/tmpl/cluster/flux/webhooks" "${PROJECT_DIR}/cluster/flux/add-ons"
cp -rf "${PROJECT_DIR}/tmpl/cluster/flux/kustomization.yaml" "${PROJECT_DIR}/cluster/flux/add-ons"
envsubst < "${PROJECT_DIR}/tmpl/cluster/flux/webhooks/github/secret.sops.yaml" \ envsubst < "${PROJECT_DIR}/tmpl/cluster/flux/webhooks/github/secret.sops.yaml" \
> "${PROJECT_DIR}/cluster/flux/config/webhooks/github/secret.sops.yaml" > "${PROJECT_DIR}/cluster/flux/add-ons/webhooks/github/secret.sops.yaml"
sops --encrypt --in-place "${PROJECT_DIR}/cluster/flux/config/webhooks/github/secret.sops.yaml" sops --encrypt --in-place "${PROJECT_DIR}/cluster/flux/add-ons/webhooks/github/secret.sops.yaml"
if [[ $(yq eval --no-doc 'contains({"resources": ["./webhooks"]})' "${PROJECT_DIR}/cluster/flux/config/kustomization.yaml") == false ]]; then
yq --inplace '.resources += [ "./webhooks" ]' "${PROJECT_DIR}/cluster/flux/config/kustomization.yaml"
fi
fi fi
} }