Added cilium
This commit is contained in:
@@ -2,6 +2,36 @@
|
||||
set -euo pipefail
|
||||
CONFIGS={{ root }}/configs
|
||||
|
||||
function create_inline_manifest() {
|
||||
# Add indentation
|
||||
CONTENT=$(echo "$3" | sed 's/^/ /')
|
||||
|
||||
# Create inline manifest patch
|
||||
cat > $2 << EOF
|
||||
cluster:
|
||||
inlineManifests:
|
||||
- name: ${1}
|
||||
contents: |
|
||||
${CONTENT}
|
||||
EOF
|
||||
}
|
||||
|
||||
helm repo add cilium https://helm.cilium.io/
|
||||
helm repo update
|
||||
{% for cluster in clusters -%}
|
||||
{% if "cilium" in cluster -%}
|
||||
# Generate manifests
|
||||
CONTENT=$(helm template \
|
||||
cilium \
|
||||
cilium/cilium \
|
||||
--version {{ cluster.cilium.version }} \
|
||||
--namespace kube-system \
|
||||
--values {{ cluster.cilium.valuesFile }})
|
||||
|
||||
create_inline_manifest cilium ${CONFIGS}/{{cluster.name}}/cilium.yaml "${CONTENT}"
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
|
||||
# Generate the configuration for each node
|
||||
{% for node in nodes -%}
|
||||
talosctl gen config {{ node.cluster.name }} https://{{ node.cluster.controlPlaneIp }}:6443 -f \
|
||||
@@ -17,6 +47,9 @@ talosctl gen config {{ node.cluster.name }} https://{{ node.cluster.controlPlane
|
||||
{% for patch in node.patchesControlPlane -%}
|
||||
--config-patch-control-plane {{ patch|tojson|tojson }} \
|
||||
{% endfor -%}
|
||||
{% if "cilium" in node.cluster -%}
|
||||
--config-patch-control-plane "@${CONFIGS}/{{node.cluster.name}}/cilium.yaml" \
|
||||
{%- endif %}
|
||||
--with-docs=false \
|
||||
--with-examples=false \
|
||||
-o ${CONFIGS}/{{ node.filename }}.yaml
|
||||
|
||||
Reference in New Issue
Block a user