21 Commits

Author SHA1 Message Date
Dalton Hubble
1ddecb1cef Change Cilium configuration to use kube-proxy replacement
* Skip creating the kube-proxy DaemonSet when Cilium is chosen
2024-08-23 07:15:18 -07:00
Dalton Hubble
720adbeb43 Configure Cilium agents to connect to apiserver explicitly
* Cilium v1.14 seems to have problems reliably accessing the
apiserver via default in-cluster service discovery (relies on
kube-proxy instead of DNS) after some time
* Configure Cilium agents to use the DNS name resolving to the
cluster's load balanced apiserver and port. Regrettably, this
relies on external DNS rather than being self-contained, but its
what Cilium pushes users towards
2023-10-29 16:08:21 -07:00
Dalton Hubble
251adf88d4 Emulate Cilium KubeProxyReplacement partial mode
* Cilium KubeProxyReplacement mode used to support a partial
option, but in v1.14 it became true or false
* Emulate the old partial mode by disabling KubeProxyReplacement
but turning on the individual features
* The alternative of enabling KubeProxyReplacement has ramifications
because Cilium then needs to be configured with the apiserver server
address, which creates a dependency on the cloud provider's DNS,
clashes with kube-proxy, and removing kube-proxy creates complications
for how node health is assessed. Removing kube-proxy is further
complicated by the fact its still used by other supported CNIs which
creates a tricky support matrix

Docs: https://docs.cilium.io/en/latest/network/kubernetes/kubeproxy-free/#kube-proxy-hybrid-modes
2023-08-26 10:45:23 -07:00
Dalton Hubble
a4fc73db7e Fix Cilium kube-proxy-replacement mode to true
* In Cilium v1.14, kube-proxy-replacement mode again changed
its valid values, this time from partial to true/false. The
value should be true for Cilium to support HostPort features
as expected

```
cilium status --verbose
Services:
  - ClusterIP:      Enabled
  - NodePort:       Enabled (Range: 30000-32767)
  - LoadBalancer:   Enabled
  - externalIPs:    Enabled
  - HostPort:       Enabled
```
2023-08-21 19:53:46 -07:00
Dalton Hubble
35848a50c6 Upgrade Cilium from v1.13.4 to v1.14.0
* https://github.com/cilium/cilium/releases/tag/v1.14.0
2023-07-30 09:17:31 -07:00
Tobias Jungel
7c559e15e2 Update cilium masquerade flag
14ced84f7e
introduced `enable-ipv6-masquerade` and `enable-ipv4-masquerade`. This
updates the ConfigMap of cilium to align with the expected flag.

enable-ipv4-masquerade is enabled and enable-ipv6-masquerade is
disabled.
2023-05-23 17:47:23 -07:00
Dalton Hubble
0a5d722de6 Change Cilium to use an init container to install CNI plugins
* Starting in Cilium v1.13.1, the cilium-cni plugin is installed
via an init container rather than by the Cilium agent container

Rel: https://github.com/cilium/cilium/issues/24457
2023-03-29 10:03:08 -07:00
Dalton Hubble
5fe3380d5f Update Cilium from v1.12.6 to v1.13.0
* https://github.com/cilium/cilium/releases/tag/v1.13.0
* Change kube-proxy-replacement from probe (deprecated) to
partial and disable nodeport health checks as recommended
* Add ciliumloadbalanacerippools to ClusterRole
* Enable BPF socket load balancing from host namespace
2023-03-14 11:13:23 -07:00
Dalton Hubble
6d92cab7a0 Update Cilium from v1.11.7 to v1.12.0
* https://github.com/cilium/cilium/releases/tag/v1.12.0
2022-08-08 19:56:05 -07:00
Dalton Hubble
f325be5041 Update Cilium from v1.11.4 to v1.11.5
* https://github.com/cilium/cilium/releases/tag/v1.11.5
2022-05-31 15:21:36 +01:00
James Harmison
5bbca44f66 Update cilium ds name and label to align with upstream 2022-04-20 18:47:59 -07:00
Dalton Hubble
37f45cb28b Update Cilium from v1.10.5 to v1.11.0
* https://github.com/cilium/cilium/releases/tag/v1.11.0
2021-12-10 11:23:56 -08:00
Dalton Hubble
c6fa09bda1 Update Calico and Cilium CNI providers
* Update Calico from v3.20.0 to v3.20.1
* Update Cilium from v1.10.3 to v1.10.4
* Remove Cilium wait for BGF mount
2021-09-21 09:11:49 -07:00
Dalton Hubble
bfc2fa9697 Fix ClusterIP access when using Cilium
* When a router sets node(s) as next-hops in a network,
ClusterIP Services should be able to respond as usual
* https://github.com/cilium/cilium/issues/14581
2021-09-15 19:43:58 -07:00
Dalton Hubble
5c0bebc1e7 Add Cilium init container to auto-mount cgroup2
* Add init container to auto-mount /sys/fs/cgroup cgroup2
at /run/cilium/cgroupv2 for the Cilium agent
* Enable CNI exclusive mode, to disable other configs
found in /etc/cni/net.d/
* https://github.com/cilium/cilium/pull/16259
2021-07-24 10:30:06 -07:00
Dalton Hubble
f87aa7f96a Change CNI config directory to /etc/cni/net.d
* Change CNI config directory from `/etc/kubernetes/cni/net.d`
to `/etc/cni/net.d` (Kubelet default)
2021-04-01 16:48:46 -07:00
Dalton Hubble
c6e3a2bcdc Update Cilium from v1.8.5 to v1.9.0-rc3
* https://github.com/cilium/cilium/releases/tag/v1.9.0-rc3
* https://github.com/cilium/cilium/releases/tag/v1.9.0-rc2
* https://github.com/cilium/cilium/releases/tag/v1.9.0-rc1
2020-11-03 00:05:32 -08:00
Dalton Hubble
f2dd897d67 Change seccomp annotations to Pod seccompProfile
* seccomp graduated to GA in Kubernetes v1.19. Support
for seccomp alpha annotations will be removed in v1.22
* Replace seccomp annotations with the GA seccompProfile
field in the PodTemplate securityContext
* Switch profile from `docker/default` to `runtime/default`
(no effective change, since docker is the runtime)
* Verify with docker inspect SecurityOpt. Without the
profile, you'd see `seccomp=unconfined`

Related:
* https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.19.md#seccomp-graduates-to-general-availability
2020-09-10 00:28:58 -07:00
Dalton Hubble
2686d59203 Allow leader election among Cilium operator replicas
* Allow Cilium operator Pods to leader elect when Deployment
has more than one replica
* Use topology spread constraint to keep multiple operators
from running on the same node (pods bind hostNetwork ports)
2020-09-07 17:48:19 -07:00
Dalton Hubble
45053a62cb Update Cilium from v1.8.1 to v1.8.2
* Drop unused option https://github.com/cilium/cilium/pull/12618
2020-07-25 15:52:19 -07:00
Dalton Hubble
af36c53936 Add experimental Cilium CNI provider
* Accept experimental CNI `networking` mode "cilium"
* Run Cilium v1.8.0 with overlay vxlan tunnels and a
minimal set of features. We're interested in:
  * IPAM: Divide pod_cidr into /24 subnets per node
  * CNI networking pod-to-pod, pod-to-external
  * BPF masquerade
  * NetworkPolicy as defined by Kubernetes (no L7)
* Continue using kube-proxy with Cilium probe mode
* Firewall changes:
  * Require UDP 8472 for vxlan (Linux kernel default) between nodes
  * Optional ICMP echo(8) between nodes for host reachability (health)
  * Optional TCP 4240 between nodes for host reachability (health)
2020-06-21 16:21:09 -07:00