Skip to content

Conversation

@rarescosma
Copy link
Contributor

Warning

This is a public repository, ensure not to disclose:

  • personal data beyond what is necessary for interacting with this pull request, nor
  • business confidential information, such as customer names.

What kind of PR is this?

Required: Mark one of the following that is applicable:

  • kind/feature
  • kind/improvement
  • kind/deprecation
  • kind/documentation
  • kind/clean-up
  • kind/bug
  • kind/other

Optional: Mark one or more of the following that are applicable:

Important

Breaking changes should be marked kind/admin-change or kind/dev-change depending on type
Critical security fixes should be marked with kind/security

  • kind/admin-change
  • kind/dev-change
  • kind/security
  • [kind/adr](set-me)

Release notes

Cilium values are controlled via group_vars/all/k8s_cluster/ck8s-cilium.yaml and mimic the structure of their CAPI equivalent.

Platform Administrator notice

A migration or devbox templates will be required to copy over the new group_vars/all/k8s_cluster/ck8s-cilium.yaml file.

Additionally, to enable the installation the following changes are required in group_vars/all/k8s_cluster/ck8s-k8s-cluster.yaml:

kube_network_plugin: cilium
cilium_identity_allocation_mode: "crd"
cilium_version: "v1.17.5"

cilium_enable_hubble: true
cilium_hubble_install: true
cilium_hubble_tls_generate: true

# See https://github.com/kubernetes-sigs/kubespray/issues/12276
kube_owner: root

What does this PR do / why do we need this PR?

Adds experimental support for running Cilium as CNI in Kubespray clusters.

Information to reviewers

Checklist

  • Proper commit message prefix on all commits
  • Change checks:
    • The change is transparent
    • The change is disruptive
    • The change requires no migration steps
    • The change requires migration steps
  • Documentation checks:
  • Metrics checks:
    • The metrics are still exposed and present in Grafana after the change
    • The metrics names didn't change (Grafana dashboards and Prometheus alerts required no updates)
    • The metrics names did change (Grafana dashboards and Prometheus alerts required an update)
  • Logs checks:
    • The logs do not show any errors after the change
  • PodSecurityPolicy checks:
    • Any changed Pod is covered by Kubernetes Pod Security Standards
    • Any changed Pod is covered by Gatekeeper Pod Security Policies
    • The change does not cause any Pods to be blocked by Pod Security Standards or Policies
  • NetworkPolicy checks:
    • Any changed Pod is covered by Network Policies
    • The change does not cause any dropped packets in the NetworkPolicy Dashboard
  • Audit checks:
    • The change does not cause any unnecessary Kubernetes audit events
    • The change requires changes to Kubernetes audit policy
  • Falco checks:
    • The change does not cause any alerts to be generated by Falco
  • Bug checks:
    • The bug fix is covered by regression tests

@rarescosma rarescosma requested a review from a team as a code owner July 2, 2025 07:43
@rarescosma rarescosma force-pushed the rares/kubespray-cilium-support branch from a80af1a to 3ae92fa Compare July 2, 2025 10:42
@rarescosma
Copy link
Contributor Author

Following the CAPI lead, the installation of ServiceMonitors is now disabled by default.

@rarescosma rarescosma self-assigned this Jul 4, 2025
@rarescosma rarescosma added the kind/feature New feature or request label Jul 4, 2025
@rarescosma
Copy link
Contributor Author

Dropping a reminder here that the "install ServiceMonitor CRD early" solution from CAPI needs to be ported to Kubespray as well.

@rarescosma rarescosma requested review from Ajarmar and Xartos July 7, 2025 14:23
@rarescosma rarescosma force-pushed the rares/kubespray-cilium-support branch 2 times, most recently from 13b4276 to dd6d527 Compare July 16, 2025 03:16
@rarescosma rarescosma changed the title Experimental cilium support Add cilium support in Kubespray Jul 16, 2025
@rarescosma rarescosma force-pushed the rares/kubespray-cilium-support branch 2 times, most recently from 69cf48b to c81fa3b Compare July 17, 2025 14:26
@rarescosma
Copy link
Contributor Author

rarescosma commented Jul 17, 2025

Yes, I agree. It would be nice if we can be as close to upstream as possible, I think we've been lagging behind on getting things upstreamed recently but as a general rule it makes sense to only make changes that at least are possible to upstream.

Changed the implementation so that we only require backports and cherry-picks from upstream

@Ajarmar can you take another look when you've got some spare time?

@rarescosma rarescosma force-pushed the rares/kubespray-cilium-support branch from c81fa3b to 44c81ef Compare July 18, 2025 12:59
@rarescosma rarescosma changed the title Add cilium support in Kubespray Add Cilium support in Kubespray 2.27 Jul 18, 2025
@rarescosma rarescosma changed the base branch from main to release-2.27.0 July 18, 2025 12:59
Copy link
Contributor

@lucianvlad lucianvlad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@rarescosma
Copy link
Contributor Author

rarescosma commented Aug 4, 2025

Referencing changes to base config in CAPI that should be mirrored here, once the Cilium initiative on Kubespray picks up steam again: https://github.com/elastisys/ck8s-cluster-api/pull/406

Copy link
Contributor

@Ajarmar Ajarmar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I like the new solution (haven't tested though).

I have one question: do we want any of this on main as well, for v2.28 and following releases?

@rarescosma
Copy link
Contributor Author

LGTM! I like the new solution (haven't tested though).

I have one question: do we want any of this on main as well, for v2.28 and following releases?

Thank you!

Why would we not want it on main plus the 2.28?
Feels weird to introduce a feature just for an old release branch :)

Also, I'd like to mention that upstream has some interesting ongoing work for installing CRDs early into the clusters, which might let us remove some of the diff in our fork.

@rarescosma rarescosma merged commit 3715b64 into release-2.27.0 Aug 7, 2025
1 check passed
@rarescosma rarescosma deleted the rares/kubespray-cilium-support branch August 7, 2025 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants