From 07decda9b477a193f1bf56c396dd4c93eefc7497 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Mon, 27 Mar 2023 17:29:10 -0400 Subject: [PATCH] Revert "feat: Disable kube-proxy and enable Calico in eBPF mode" (#678) --- .../inventory/group_vars/kubernetes/k3s.yml | 1 - ansible/inventory/group_vars/master/k3s.yml | 43 ++++++++++++------- .../playbooks/templates/calico-ebpf.yaml.j2 | 14 ------ .../templates/calico-installation.yaml.j2 | 2 - 4 files changed, 28 insertions(+), 32 deletions(-) delete mode 100644 ansible/playbooks/templates/calico-ebpf.yaml.j2 diff --git a/ansible/inventory/group_vars/kubernetes/k3s.yml b/ansible/inventory/group_vars/kubernetes/k3s.yml index dc3e3d61..b97feae5 100644 --- a/ansible/inventory/group_vars/kubernetes/k3s.yml +++ b/ansible/inventory/group_vars/kubernetes/k3s.yml @@ -55,6 +55,5 @@ k3s_server_manifests_urls: # (list) A flat list of templates to deploy on the primary control plane # /var/lib/rancher/k3s/server/manifests k3s_server_manifests_templates: - - calico-ebpf.yaml.j2 - calico-installation.yaml.j2 - kube-vip-daemonset.yaml.j2 diff --git a/ansible/inventory/group_vars/master/k3s.yml b/ansible/inventory/group_vars/master/k3s.yml index 6e6663f0..14bda64f 100644 --- a/ansible/inventory/group_vars/master/k3s.yml +++ b/ansible/inventory/group_vars/master/k3s.yml @@ -10,25 +10,38 @@ k3s_server: node-ip: "{{ ansible_host }}" tls-san: - "{{ kubevip_address }}" - https-listen-port: 6443 - docker: false # Disable Docker - this will use the default containerd CRI - flannel-backend: "none" # This needs to be in quotes + # Disable Docker - this will use the default containerd CRI + docker: false + flannel-backend: "none" # This needs to be in quotes disable: - - flannel # Disable flannel - replaced with Calico - - local-storage # Disable local-path-provisioner - installed with Flux - - metrics-server # Disable metrics-server - installed with Flux - - servicelb # Disable servicelb - replaced with metallb and installed with Flux - - traefik # Disable traefik - replaced with ingress-nginx and installed with Flux + # Disable flannel - replaced with Calico + - flannel + # Disable local-path-provisioner - installed with Flux + - local-storage + # Disable metrics-server - installed with Flux + - metrics-server + # Disable servicelb - replaced with metallb and installed with Flux + - servicelb + # Disable traefik - replaced with ingress-nginx and installed with Flux + - traefik disable-network-policy: true disable-cloud-controller: true - disable-kube-proxy: true # Disable kube-proxy - replaced with Calico eBPF write-kubeconfig-mode: "644" - cluster-cidr: "10.42.0.0/16" # Network CIDR to use for pod IPs - service-cidr: "10.43.0.0/16" # Network CIDR to use for service IPs + # Network CIDR to use for pod IPs + cluster-cidr: "10.42.0.0/16" + # Network CIDR to use for service IPs + service-cidr: "10.43.0.0/16" kube-controller-manager-arg: - - "bind-address=0.0.0.0" # Required to monitor kube-controller-manager with kube-prometheus-stack + # Required to monitor kube-controller-manager with kube-prometheus-stack + - "bind-address=0.0.0.0" + kube-proxy-arg: + # Required to monitor kube-proxy with kube-prometheus-stack + - "metrics-bind-address=0.0.0.0" kube-scheduler-arg: - - "bind-address=0.0.0.0" # Required to monitor kube-scheduler with kube-prometheus-stack - etcd-expose-metrics: true # Required to monitor etcd with kube-prometheus-stack + # Required to monitor kube-scheduler with kube-prometheus-stack + - "bind-address=0.0.0.0" + # Required to monitor etcd with kube-prometheus-stack + etcd-expose-metrics: true kube-apiserver-arg: - - "anonymous-auth=true" # Required for HAProxy health-checks + # Required for HAProxy health-checks + - "anonymous-auth=true" diff --git a/ansible/playbooks/templates/calico-ebpf.yaml.j2 b/ansible/playbooks/templates/calico-ebpf.yaml.j2 deleted file mode 100644 index 5202d616..00000000 --- a/ansible/playbooks/templates/calico-ebpf.yaml.j2 +++ /dev/null @@ -1,14 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: tigera-operator ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: kubernetes-services-endpoint - namespace: tigera-operator -data: - KUBERNETES_SERVICE_HOST: "{{ k3s_registration_address }}" - KUBERNETES_SERVICE_PORT: "{{ k3s_server['https-listen-port'] }}" diff --git a/ansible/playbooks/templates/calico-installation.yaml.j2 b/ansible/playbooks/templates/calico-installation.yaml.j2 index 0ded939a..8e28a922 100644 --- a/ansible/playbooks/templates/calico-installation.yaml.j2 +++ b/ansible/playbooks/templates/calico-installation.yaml.j2 @@ -7,8 +7,6 @@ spec: registry: quay.io imagePath: calico calicoNetwork: - hostPorts: Disabled - linuxDataplane: BPF # https://projectcalico.docs.tigera.io/networking/ip-autodetection nodeAddressAutodetectionV4: cidrs: