Files
k3s-ansible/roles/k3s_server_post/templates/calico.crs.j2
Ethan Shold e7ba494a00 Add Tigera Operator/Calico CNI option
Small tweak to reduce delta from head

Set calico option to be disabled by default

Add rescue blocks in case updating existing

Refactor items and update comments

Refactor and consolidate calico.yml into block

Refactor to use template for Calico CRs

Revert use_calico to false

Template blockSize

Align default cidr in template with all.yml sample

Apply upstream version tags

Revert to current ver tags. Upstream's don't work.

Update template address detection

Add Tigera Operator/Calico CNI option
2024-01-14 01:31:42 -06:00

29 lines
1.2 KiB
Django/Jinja

# This section includes base Calico installation configuration.
# For more information, see: https://docs.tigera.io/calico/latest/reference/installation/api#operator.tigera.io/v1.Installation
apiVersion: operator.tigera.io/v1
kind: Installation
metadata:
name: default
spec:
# Configures Calico networking.
calicoNetwork:
# Note: The ipPools section cannot be modified post-install.
ipPools:
- blockSize: {{ calico_blockSize if calico_blockSize is defined else '26' }}
cidr: {{ calico_cidr if calico_cidr is defined else '10.52.0.0/16' }}
encapsulation: {{ calico_encapsulation if calico_encapsulation is defined else 'VXLANCrossSubnet' }}
natOutgoing: {{ calico_natOutgoing if calico_natOutgoing is defined else 'Enabled' }}
nodeSelector: {{ calico_nodeSelector if calico_nodeSelector is defined else 'all()' }}
nodeAddressAutodetectionV4:
interface: {{ container_iface if container_iface is defined else 'eth0' }}
---
# This section configures the Calico API server.
# For more information, see: https://docs.tigera.io/calico/latest/reference/installation/api#operator.tigera.io/v1.APIServer
apiVersion: operator.tigera.io/v1
kind: APIServer
metadata:
name: default
spec: {}