mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2025-12-28 11:42:37 +01:00
42 lines
1.5 KiB
Django/Jinja
42 lines
1.5 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' }}
|
|
linuxDataplane: {{ 'BPF' if calico_ebpf else 'Iptables' }}
|
|
|
|
---
|
|
|
|
# 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: {}
|
|
|
|
{% if calico_ebpf %}
|
|
---
|
|
kind: ConfigMap
|
|
apiVersion: v1
|
|
metadata:
|
|
name: kubernetes-services-endpoint
|
|
namespace: tigera-operator
|
|
data:
|
|
KUBERNETES_SERVICE_HOST: '{{ apiserver_endpoint }}'
|
|
KUBERNETES_SERVICE_PORT: '6443'
|
|
{% endif %}
|