#!/bin/sh set -eux {{/* Robustness, Calico 3.x wants things as Titlecase; this causes pain */}} {{- $_ := set .Values.conf.node "CALICO_IPV4POOL_IPIP" (title .Values.conf.node.CALICO_IPV4POOL_IPIP ) -}} {{- $_ := set .Values.conf.node "CALICO_STARTUP_LOGLEVEL" (title .Values.conf.node.CALICO_STARTUP_LOGLEVEL ) -}} {{- $_ := set .Values.conf.node "FELIX_LOGSEVERITYSCREEN" (title .Values.conf.node.FELIX_LOGSEVERITYSCREEN ) -}} {{- $envAll := . }} {{ if empty .Values.conf.node.CALICO_IPV4POOL_CIDR }} {{ $_ := set .Values.conf.node "CALICO_IPV4POOL_CIDR" .Values.networking.podSubnet }} {{ end }} # An idempotent script for interacting with calicoctl to instantiate # peers, and manipulate calico settings that we must perform # post-deployment. CTL=/calicoctl # Generate configuration the way we want it to be, it doesn't matter # if it's already set, in that case Calico will no nothing. # BGPConfiguration: nodeToNodeMeshEnabled & asNumber $CTL apply -f - <