Created
June 17, 2025 09:13
-
-
Save Alxandr/050dffb48397d17f4afe8724b97a784a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
set -euo pipefail | |
shopt -s nullglob | |
rm -rf tmp | |
mkdir -p tmp | |
common_patches=(05-talos/patches/common/*.yaml) | |
controlplane_patches=(05-talos/patches/controlplane/*.yaml) | |
worker_patches=(05-talos/patches/worker/*.yaml) | |
common_args=("${common_patches[@]/#/--config-patch @}") | |
controlplane_args=("${controlplane_patches[@]/#/--config-patch-control-plane @}") | |
worker_args=("${worker_patches[@]/#/--config-patch-worker @}") | |
# echo "${common_args[@]}" | |
# echo "${controlplane_args[@]}" | |
# echo "${worker_args[@]}" | |
talosctl gen config talos https://talos.lab.internal:6443/ \ | |
--output tmp \ | |
${common_args[@]} \ | |
${controlplane_args[@]} \ | |
${worker_args[@]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
set -euo pipefail | |
shopt -s nullglob | |
echo "Installing cilium..." | |
REPO_NAME=$(cat 20-cluster-bootstrap/01-cilium-repo.yaml | yq .metadata.name -r) | |
REPO_URL=$(cat 20-cluster-bootstrap/01-cilium-repo.yaml | yq .spec.url -r) | |
VERSION=$(cat 20-cluster-bootstrap/02-cilium-release.yaml | yq .spec.chart.spec.version -r) | |
NAME=$(cat 20-cluster-bootstrap/02-cilium-release.yaml | yq .spec.releaseName -r) | |
CHART_NAME=$(cat 20-cluster-bootstrap/02-cilium-release.yaml | yq .spec.chart.spec.chart -r) | |
TARGET_NAMESPACE=$(cat 20-cluster-bootstrap/02-cilium-release.yaml | yq .spec.targetNamespace -r) | |
cat 20-cluster-bootstrap/02-cilium-release.yaml | yq .spec.values -r > tmp/cilium-values.yaml | |
helm repo add "$REPO_NAME" "$REPO_URL" --force-update >/dev/null | |
helm upgrade --install "${NAME}" "${REPO_NAME}/${CHART_NAME}" \ | |
--namespace "${TARGET_NAMESPACE}" \ | |
--version "${VERSION}" \ | |
--values tmp/cilium-values.yaml \ | |
>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment