fix(cluster): configure script would fail on macos
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
2 files changed
+9
-11
No files matched your search
@@ -2,12 +2,12 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- default
|
|
||||||
- kube-system
|
|
||||||
- networking
|
|
||||||
# Be sure to NOT downgrade k3s by keep the value in
|
# Be sure to NOT downgrade k3s by keep the value in
|
||||||
# ./provision/ansible/inventory/group_vars/kubernetes/k3s.yml
|
# ./provision/ansible/inventory/group_vars/kubernetes/k3s.yml
|
||||||
# updated if you need to re-run the Ansible playbook.
|
# updated if you need to re-run the Ansible playbook.
|
||||||
# To enable automatic Kubernetes upgrades uncomment
|
# To enable automatic Kubernetes upgrades uncomment
|
||||||
# the below line
|
# the below line
|
||||||
# - system-upgrade
|
# - system-upgrade
|
||||||
|
- default
|
||||||
|
- kube-system
|
||||||
|
- networking
|
||||||
+5
-7
@@ -219,17 +219,15 @@ 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-system" "${PROJECT_DIR}/cluster/apps/"
|
cp -rf "${PROJECT_DIR}/tmpl/cluster/flux-system/" "${PROJECT_DIR}/cluster/apps/"
|
||||||
|
|
||||||
WEBHOOK_DIR="${PROJECT_DIR}/cluster/apps/flux-system/webhooks/github/"
|
envsubst < "${PROJECT_DIR}/tmpl/cluster/flux-system/webhooks/github/secret.sops.yaml" \
|
||||||
|
> "${PROJECT_DIR}/cluster/apps/flux-system/webhooks/github/secret.sops.yaml"
|
||||||
|
|
||||||
envsubst < "${WEBHOOK_DIR}/receiver.yaml" | tee "${WEBHOOK_DIR}/receiver.yaml" > /dev/null
|
sops --encrypt --in-place "${PROJECT_DIR}/cluster/apps/flux-system/webhooks/github/secret.sops.yaml"
|
||||||
envsubst < "${WEBHOOK_DIR}/secret.sops.yaml" | tee "${WEBHOOK_DIR}/secret.sops.yaml" > /dev/null
|
|
||||||
|
|
||||||
sops --encrypt --in-place "${WEBHOOK_DIR}/secret.sops.yaml"
|
|
||||||
|
|
||||||
if [[ $(yq eval --no-doc 'contains({"resources": ["flux-system"]})' "${PROJECT_DIR}/cluster/apps/kustomization.yaml") == false ]]; then
|
if [[ $(yq eval --no-doc 'contains({"resources": ["flux-system"]})' "${PROJECT_DIR}/cluster/apps/kustomization.yaml") == false ]]; then
|
||||||
yq -i '.resources += [ "flux-system" ]' "${PROJECT_DIR}/cluster/apps/kustomization.yaml"
|
yq --inplace '.resources += [ "flux-system" ]' "${PROJECT_DIR}/cluster/apps/kustomization.yaml"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user