cilium

by QuenchWorks

Helm chartv0.0.20App 1.20.5Apache-2.0Verified publisher

Cilium networking for Kubernetes: the eBPF agent DaemonSet (CNI, IPAM through CiliumNodes, network policy, VXLAN overlay) with the QuenchWorks Cilium Operator as a dependency. Hardened by QuenchWorks: the agent built from source on Wolfi, CVE-gated, cosign-signed and pinned by digest.

About this chart

Cilium

Cilium is an eBPF-based CNI: it gives pods their addresses, connects them across nodes and enforces Kubernetes and Cilium network policy. This chart runs the Cilium agent as a DaemonSet on the QuenchWorks cilium image (built from the cilium/cilium source on Wolfi, 0 fixable CVEs, cosign-signed, pinned by digest) and installs the QuenchWorks Cilium Operator chart with it, so one release is a complete Cilium.

Install

Cilium is the cluster's network, so the cluster must start without another CNI (kind: networking.disableDefaultCNI: true). Install once per cluster, in kube-system:

helm install cilium oci://ghcr.io/quenchworks/charts/cilium -n kube-system
kubectl get ciliumnodes
kubectl -n kube-system exec ds/cilium -- cilium-dbg status --brief

Nodes turn Ready once their agent is up.

What it configures

Cluster-pool IPAM (the operator hands each node a /24 of 10.0.0.0/8), a VXLAN overlay, IPv4 masquerading, Kubernetes NetworkPolicy and CiliumNetworkPolicy, and kube-proxy left in place. The settings land in the cilium-config ConfigMap, which the agents and the operator both read; the name is fixed.

With envoy.enabled, the L7 proxy runs as its own cilium-envoy DaemonSet (the quench cilium-envoy image, built from cilium/proxy at the commit this Cilium release pins), and the agent turns on enable-l7-proxy and external-envoy-proxy, so CiliumNetworkPolicy HTTP, Kafka and DNS rules are enforced. Its bootstrap is upstream's, rendered for this appVersion into files/cilium-envoy-bootstrap.json; regenerate it on every appVersion bump.

Not included: Hubble and its relay, clustermesh, IPv6 and cloud IPAM modes.

Values

KeyDefaultMeaning
config.ipam.clusterPoolIPv4CIDR10.0.0.0/8pod address range
config.ipam.clusterPoolIPv4MaskSize24per-node block size
config.routingModetunneltunnel (overlay) or native
config.tunnelProtocolvxlanvxlan or geneve
config.kubeProxyReplacement"false""true" also needs k8s-service-host/k8s-service-port in extraConfig
config.policyEnforcementModedefaultdefault, always or never
config.extraConfig{}any other cilium-config key; overrides the chart's
cilium-operator.enabledtruethe operator subchart; its values go under this key
envoy.enabledtruethe cilium-envoy DaemonSet and L7 policy
envoy.image.digestpinnedthe cilium-envoy image, by digest
envoy.logLevelinfoEnvoy log level
resources100m / 256Mi, 1Gi limitagent resources (GOMEMLIMIT follows the limit)
tolerationseverythingan agent runs on every node

Privileges

Like upstream, the agent and its init containers run as root on the host network with the capabilities they need to program the node (NET_ADMIN, SYS_ADMIN, BPF maps on the host's bpffs, the CNI plugin and config written to the host). Treat the release as part of the node.

Release gate

The gate starts a two-node kind cluster with no CNI, installs this chart, and requires every CiliumNode to get a pod CIDR, every node to turn Ready, cilium-dbg status to report the agent OK with both nodes reachable over the overlay, CoreDNS to answer a pod on the other node, a deny-all ingress NetworkPolicy to stop cross-node pings that worked before it, an L7 CiliumNetworkPolicy that lets GET /allowed through and gets a 403 from Envoy for GET /denied, and no agent restarts.

The chart depends on the quench-common and cilium-operator charts from oci://ghcr.io/quenchworks/charts.

Deploy cilium with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cilium on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcilium is pinned at v0.0.20 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply