diff --git a/README.md b/README.md index 60d0956c..9ee8bb8f 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The following components will be installed in your [k3s](https://k3s.io/) cluste Feel free to read up on any of these technologies before you get started to be more familiar with them. - [cert-manager](https://cert-manager.io/) - SSL certificates - with Cloudflare DNS challenge -- [flannel](https://github.com/flannel-io/flannel) - default CNI provided by k3s +- [calico](https://www.tigera.io/project-calico/) - CNI (container network interface) - [flux](https://toolkit.fluxcd.io/) - GitOps tool for deploying manifests from the `cluster` directory - [hajimari](https://github.com/toboshii/hajimari) - start page with ingress discovery - [kube-vip](https://kube-vip.io/) - layer 2 load balancer for the Kubernetes control plane diff --git a/provision/ansible/inventory/group_vars/kubernetes/k3s.yml b/provision/ansible/inventory/group_vars/kubernetes/k3s.yml index 20d1bf38..0695eee1 100644 --- a/provision/ansible/inventory/group_vars/kubernetes/k3s.yml +++ b/provision/ansible/inventory/group_vars/kubernetes/k3s.yml @@ -25,8 +25,14 @@ k3s_use_unsupported_config: false # (string) Control Plane registration address k3s_registration_address: "{{ kubevip_address }}" +# (list) A list of URLs to deploy on the primary control plane. Read notes below. +k3s_server_manifests_urls: + - url: https://docs.projectcalico.org/archive/v3.20/manifests/tigera-operator.yaml + filename: tigera-operator.yaml + # (list) A flat list of templates to deploy on the primary control plane # /var/lib/rancher/k3s/server/manifests k3s_server_manifests_templates: + - "calico-installation.yaml.j2" - "kube-vip-rbac.yaml.j2" - "kube-vip-daemonset.yaml.j2" diff --git a/provision/ansible/inventory/group_vars/master/k3s.yml b/provision/ansible/inventory/group_vars/master/k3s.yml index 19bbaf11..768db3cb 100644 --- a/provision/ansible/inventory/group_vars/master/k3s.yml +++ b/provision/ansible/inventory/group_vars/master/k3s.yml @@ -12,8 +12,9 @@ k3s_server: # kube-vip - "{{ kubevip_address }}" docker: false - flannel-backend: "host-gw" # This needs to be in quotes + flannel-backend: "none" # This needs to be in quotes disable: + - flannel - traefik - servicelb - metrics-server diff --git a/provision/ansible/playbooks/templates/calico-installation.yaml.j2 b/provision/ansible/playbooks/templates/calico-installation.yaml.j2 new file mode 100644 index 00000000..38ef26d7 --- /dev/null +++ b/provision/ansible/playbooks/templates/calico-installation.yaml.j2 @@ -0,0 +1,16 @@ +--- +apiVersion: operator.tigera.io/v1 +kind: Installation +metadata: + name: default +spec: + calicoNetwork: + # Note: The ipPools section cannot be modified post-install. + ipPools: + - blockSize: 26 + cidr: "{{ k3s_server['cluster-cidr'] }}" + encapsulation: "VXLANCrossSubnet" + natOutgoing: Enabled + nodeSelector: all() + nodeMetricsPort: 9091 + typhaMetricsPort: 9093