feat: Move webhooks to add-ons directory
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
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
|
|
||||||
@@ -4,4 +4,3 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- ./flux-installation.yaml
|
- ./flux-installation.yaml
|
||||||
- ./flux-cluster.yaml
|
- ./flux-cluster.yaml
|
||||||
- ./crds
|
|
||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user