Commit Graph
885 Commits
Author SHA1 Message Date
Dasmat Hansda e62c778293 fix: correct CiliumBGPNodeConfigOverride CRD wait condition and deprecate legacy BGP Peering Policy (#13366)
* fix: correct CiliumBGPNodeConfigOverride CRD wait condition and deprecate legacy BGP Peering Policy

- Fix copy-paste bug where cilium_bgp_advertisements was used instead of
  cilium_bgp_node_config_overrides when waiting for the
  CiliumBGPNodeConfigOverride CRD. This caused the CRD readiness check
  to be skipped when only node config overrides were configured.
- Add deprecation notices across docs, sample inventory, and defaults
  to guide users away from the legacy v2alpha1 CiliumBGPPeeringPolicy
  toward the supported BGP v2 API variables.

* fix(cilium): simplify BGP node override condition
2026-09-26 10:00:27 +00:00
Ali Afsharzadeh 49c7a478e1 Compare Calico pool CIDRs as networks (#13576)
The check compares the Calico IP pool CIDR with the inventory as
strings, so the same network in a different notation fails, for
example fd85:ee78:d8a6:202::1:0000/112 and fd85:ee78:d8a6:202::1:0/112.
Use ipaddr('net') on the two sides.

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-09-26 07:28:27 +00:00
Max Gautier 327e7fde9c collection: rename helm-apps to helm_apps (#13553)
needed for compatibily with Galaxy
2026-09-24 16:40:17 +00:00
Ali Afsharzadeh 0fd9672b0c Remove obsolete "Flatcar Container Linux by Kinvolk" fact checks (#13528)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-09-18 10:12:42 +00:00
Max Gautier 23f8593cf5 download/calico_crds: use flat manifest path (#13522)
The additional directory is unnecessary.
2026-09-17 07:41:25 +00:00
Max Gautier 5af06acee1 fix: ansible 2.19: calico resources final evaluation (#13503)
The bgp changes are a bit verbose, because I chose to reproduce the
exact semantics of the current code, so that the manifest handed to
calicoctl does not contain unset fields (instead of just using defaults
value).

It would be more readable to just accept default value in the
manifests, but might be a problem if there is other writer of the same
Calico resources.
2026-09-15 08:55:22 +00:00
Max Gautier 3437dde4b9 fix: ansible 2.19: calico: felix config final evaluation (#13496) 2026-09-10 13:48:36 +00:00
Max Gautier 712d13bd48 fix/ansible 2.19: calico: no implicit conditionals (#13480) 2026-09-09 05:20:36 +00:00
Oleksandr Kozmenko 70cb04d9d8 fix: remove redundant cni dependency for flannel/kube-router/macvlan/multus (#12766)
* fix: remove cni dependency for flannel

Inspired by https://github.com/kubernetes-sigs/kubespray/pull/9563.

* fix: remove cni dependency for kube-router/macvlan/multus

It is not needed there since network_plugin meta already has it. For plugins which have reset tasks it is also breaking them since downloaded CNI archive is no longer present.
2026-09-08 22:16:33 +00:00
Max Gautier 6aee13b285 Remove support and CI for EOL Debian 11 (#13483)
- also remove macvlan on debian support since the role works neither on
  debian 12 nor 13
- macvlan is no longer tested in CI as it does not work on rockylinux10
  either
2026-09-08 10:30:31 +00:00
Abhishek Kanyahal cf0e68ee98 Updates in the calico config and template to support disabling ipv4 pools during pure ipv6 deployment (#13225)
* #13157: Updates in the calico config and template to support disabling ipv4 pools during pure ipv6 deployment

Signed-off-by: root <kanyahal.abhishek@gmail.com>

* Updates in the calico config and template to support disabling ipv4 pools during pure ipv6 deployment

* Updates in the calico config and template to support disabling ipv4 pools during pure ipv6 deployment

---------

Signed-off-by: root <kanyahal.abhishek@gmail.com>
2026-09-03 13:10:27 +00:00
Mehrdad Biukian a369d66c43 fix(calico): make IPv6 pool validation actually run (#13450)
Three defects in the IPv6 branch of check.yml kept the IPv6 pool
assertion from ever executing:

1. 'alico_ipv6 is defined' - typo of calico_ipv6, so the set_fact
   was always skipped (Jinja2 treats the undefined var as False).
2. The set_fact stored the pool as calico_pool_conf, overwriting the
   IPv4 pool fact on dual-stack clusters, while the IPv6 assertion
   gated on calico_pool_ipv6_conf - a name that was never set.
3. The assertion body also read calico_pool_conf, so even with the
   gate fixed it would validate against the IPv4 pool's values.

Store the IPv6 pool as calico_pool_ipv6_conf, gate the set_fact on
the registered calico_ipv6 result, and make the assertion read the
IPv6 fact - mirroring the IPv4 pattern directly above.

Verified with ansible-playbook on mocked calicoctl output:
- old code: set_fact skipped, no validation (reproduces the report)
- new code: mismatched blockSize caught with a clear assertion msg
- matching config passes through unchanged

Signed-off-by: Mehrdad Biukian Naeini <mehrdadbiukian@gmail.com>
2026-09-03 10:32:21 +00:00
Kay Yan 990d3035a1 Fix custom_cni manifest apply failure for multi-namespace resources (#13091)
* fix(custom_cni): make namespace optional

Keep kube-system as the default for existing manifests. An empty custom_cni_namespace omits kubectl's namespace flag so manifests spanning multiple namespaces can be applied without changing legacy behavior.

Signed-off-by: Kay Yan <kay.yan@daocloud.io>

* docs(custom_cni): document multi-namespace manifests

Signed-off-by: Kay Yan <kay.yan@daocloud.io>

---------

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2026-09-02 09:38:20 +00:00
Mehrdad Biukian f7b0af0d60 fix: render routingMode native when cilium_tunnel_mode is disabled (#13427)
* fix: render routingMode native when cilium_tunnel_mode is disabled

When cilium_tunnel_mode is set to 'disabled', the previous template rendered
'tunnelProtocol: disabled', which Cilium does not recognise and falls back to
vxlan. With native routing this conflicts and agents CrashLoopBackOff.

Render 'routingMode: native' instead when disabled, matching the Cilium Helm
chart API (per maintainer review on #13427 and #13314).

Refs kubernetes-sigs/kubespray#13267

Signed-off-by: Mehrdad Biukian Naeini <mehrdadbiukian@gmail.com>

* fix(cilium): tighten routingMode native render (remove stray blank line)

Per review comment on kubernetes-sigs/kubespray#13427, drop the extra
blank line after the routingMode/tunnelProtocol if-block so the rendered
Helm values file is clean.

Validated by rendering the template for cilium_tunnel_mode in
{disabled, vxlan, geneve}: disabled yields 'routingMode: native' with no
tunnelProtocol; vxlan/geneve yield 'tunnelProtocol: <mode>'.

Signed-off-by: Mehrdad Biukian Naeini <mehrdadbiukian@gmail.com>

---------

Signed-off-by: Mehrdad Biukian Naeini <mehrdadbiukian@gmail.com>
2026-08-31 03:18:08 +00:00
Nikhil Kumar bf077e7360 Replace injected Ansible fact variables in network_plugin role (#13382) 2026-08-16 14:24:17 +00:00
wangsifei99 d668c509bb fix: Unneeded bpf fstab entry added when using Cilium #13364 (#13377) 2026-07-20 09:28:12 +00:00
somaz 0355ed62b9 fix(cilium): wire scrape port variables to Helm values template (#13370)
Signed-off-by: somaz <genius5711@gmail.com>
2026-07-15 09:57:33 +00:00
Ali Soltaninasab 971e5f561b Support authentication for custom CNI Helm repositories (#13294)
* Add authentication support for custom CNI Helm repository

Pass optional Helm repository username and password values to the custom CNI chart configuration. These values use default(omit) so authentication fields are only included when explicitly defined by the user.

* Document custom CNI Helm repository authentication variables

Add commented sample variables for configuring a username and password when the custom CNI Helm repository requires authentication.

* Address Copilot documentation feedback

Document paired repository credentials and secure password storage.
Remove authentication placeholders from the public Cilium example.
2026-07-15 04:05:20 +00:00
Ali Afsharzadeh 648e55a379 Rename cilium certgen and envoy image variables (#13260)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-07-14 14:33:17 +00:00
Aleksandr BorisovandAli Afsharzadeh c263d746b6 Fix Multus manifest generation with global inventory (#13309)
* Fix Multus manifest generation with global inventory

* Update roles/network_plugin/multus/tasks/main.yml

Co-authored-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>

---------

Co-authored-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-06-30 12:50:11 +00:00
ICHxandric-mb 60929432f5 flannel: set EnableNFTables when kube_proxy_mode use nftables (#13291)
* flannel: set EnableNFTables when kube_proxy_mode use nftables

* Clean up cni-flannel.yml.j2 by removing comments

Removed commented-out environment variable for cache readiness.

* update cni-flannel.yml.j2

---------

Co-authored-by: ric-mb <noreply@github.com>
2026-06-24 02:50:17 +00:00
Justin Lamp 6bb1e2f290 Set http proxy environments for helm app installations (#13234)
* Set http proxy environments for helm app installations

Signed-off-by: Justin Lamp <justin.lamp@netways.de>

* Change http_proxy env variables from legacy static entries to new proxy_env variable

Signed-off-by: Justin Lamp <justin.lamp@netways.de>

---------

Signed-off-by: Justin Lamp <justin.lamp@netways.de>
2026-05-10 08:49:45 +05:30
Ali Afsharzadeh 09e9c43570 Disable controller-manager allocate-node-cidrs for cilium cluster-pool ipam (#13148)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-05-06 15:26:22 +05:30
Kay Yan a254f5ea68 network_plugin/cilium: fail fast when Gateway API CRDs are incompatible (#13223)
Cilium < 1.20 unconditionally registers a field indexer for TLSRoute
v1alpha2 when the Gateway API controller is enabled, but Gateway API
>= 1.5.0 ships TLSRoute v1alpha2 with served=false in the standard
channel. The result is cilium-operator CrashLoopBackOff with:

  no matches for kind "TLSRoute" in version "gateway.networking.k8s.io/v1alpha2"

The fix landed in Cilium 1.20 only and will not be backported.

Add a preflight assert that triggers only when all of the following
hold: cilium_gateway_api_enabled, gateway_api_enabled, cilium_version
< 1.20.0, gateway_api_version >= 1.5.0, and gateway_api_channel ==
"standard". Users hit by this combo get a clear error and two
workarounds (pin gateway_api_version to 1.4.1, or switch
gateway_api_channel to "experimental") instead of debugging a crash
loop after the fact.

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2026-04-30 11:43:26 +05:30
Kay Yan 817c0a6eda fix(cilium): wire cilium_enable_prometheus to Helm values template (#13142)
The cilium_enable_prometheus variable was defined in defaults and
documented in sample inventory but never mapped to the Helm values
template, making it a no-op. Add the prometheus.enabled field to
values.yaml.j2 so that setting cilium_enable_prometheus: true
correctly enables Prometheus metrics on the Cilium agent.

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2026-04-14 07:28:36 +05:30
Karim Farid 47bb0301e4 Fix undefined variable error for CiliumBGPAdvertisement labels (#13149) 2026-04-09 08:13:31 +05:30
ERIK 341da0e8cb Fix kubeadm task failure when cilium_identity_allocation_mode is undefined (#13121)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2026-03-20 14:32:13 +05:30
VoidQuark fae47ab9e6 fix(cilium): quote empty string defaults to prevent null in Helm values (#13109) 2026-03-18 12:43:42 +05:30
Ali Afsharzadeh e979e770f2 Fix calico api server permissions (#13101)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-03-17 16:19:50 +05:30
Ali Afsharzadeh b1e3816b2f Add calico-tier-getter RBAC (#13100)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-03-17 16:19:42 +05:30
Shaleen Bathla 7acdc4df64 cilium: honor resource limits and requests by default (#13092)
Signed-off-by: Shaleen Bathla <shaleen.bathla@servicenow.com>
2026-03-16 08:49:40 +05:30
Ali Afsharzadeh a51773e78f Upgrade cilium from 1.18.6 to 1.19.1 (#13095)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-03-14 09:39:34 +05:30
Shaleen Bathla 979fe25521 cilium: remove unused bpf clock probe variable (#13050)
Signed-off-by: Shaleen Bathla <shaleen.bathla@servicenow.com>
2026-03-11 16:39:38 +05:30
Ali Afsharzadeh da6539c7a0 Enable create_namespace option for custom_cni with helm (#13061)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-03-05 15:12:20 +05:30
Srishti Jaiswal 31c33015c4 Use calico crds.yaml for KDD CRDs and drop tarball artifacts (#12985) 2026-02-12 20:40:00 +05:30
Tushar240503 bf69e67240 refactor/dynamic-role-loading-network (#12933)
Signed-off-by: Tushar Sharma <tusharkumargzb6@gmail.com>
2026-02-03 21:58:29 +05:30
r3m8 3a3e5d6954 fix(cilium): add dynamic api server endpoint configuration (#12624) 2026-01-01 17:26:34 +05:30
Qasim Mehmood aaaf82f308 Fix cilium portmap (#12814) 2025-12-24 18:12:31 +05:30
Ali Afsharzadeh 31cce09fbc Check calico version in check mode (#12586)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-12-10 00:39:29 -08:00
Ali Afsharzadeh 39744146b4 Remove legacy cilium_remove_old_resources task (#12771)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-12-07 07:36:55 -08:00
Chris Ricker 2342d0cd57 Calico: populate kubernetes-services-endpoint for localhost LB (#12598)
When loadbalancer_apiserver_localhost is enabled, Calico falls back to the
Kubernetes service IP because the kubernetes-services-endpoint ConfigMap is
empty. CNI then fails to reach the API server even though an nginx proxy is
listening on localhost.

Update kube_apiserver_global_endpoint to always reference the localhost load
balancer (respecting the configured port) and populate the ConfigMap for both
eBPF and localhost LB modes.
2025-12-03 07:22:19 -08:00
Max Gautier 9975b5d525 Remove download support for old calico versions (#12724)
we no longer deploy those versions
2025-11-20 04:56:01 -08:00
Ali Afsharzadeh b3ee6d6b75 Adjust hubble export values for cilium 1.18 schema change (#12665)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-11-18 00:07:37 -08:00
Anurag Ojha 5eccf9ea6c fix(cilium):correct loadBalancer.mode rendering in values.yaml (#12701) 2025-11-14 06:39:38 -08:00
Chris Ricker 47140083dc Update Calico apiserver RBAC for Kubernetes 1.33+ (#12654)
Add missing RBAC permissions for Calico apiserver to function correctly
with Kubernetes 1.33+

Changes:

1. Add K8s 1.33 ValidatingAdmissionPolicy resources to calico-webhook-reader
   - validatingadmissionpolicies
   - validatingadmissionpolicybindings

Kubernetes 1.33 introduced ValidatingAdmissionPolicy resources (KEP-3488)
that require explicit RBAC permissions. Without these changes, Calico
apiserver on k8s 1.33+ will not work and needless errors are logged
2025-11-14 00:23:38 -08:00
Ali Afsharzadeh f8e74aafb9 Fix cilium_policy_audit_mode variable (#12569)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-10-07 09:15:02 -07:00
Takuya Murakami 8e401f94ea [calico] Add version 3.30.3 and make it default (#12523)
Signed-off-by: Takuya Murakami <murakami_da@nec.com>
2025-09-02 00:41:16 -07:00
David Bidorff fe7592dd0c fix: provide an option to ignore sysctl errors about unknown keys (#12514)
* fix: provide an option to ignore sysctl errors about unknown keys

* fix: rename sysctl_ignoreerrors and remove useless var definitions
2025-09-01 07:07:14 -07:00
Max Gautier 84504d156f Fold kubernetes-apps/network_plugin into network_plugin (#12506)
For what I can see, there is no reason for the split, and it makes
things confusing.
2025-08-27 18:43:10 -07:00
Ali Afsharzadeh 303dd1cbc1 Enable reserved variable name checks and fix violations (#12463)
* Enable reserved variable name checks and fix violations

Updated .ansible-lint configuration to skip only var-naming[pattern]
and var-naming[no-role-prefix] instead of skipping the entire var-naming rule.
This enables the check for reserved variable names.

Renamed variables that used reserved names to avoid conflicts.
Updated all references in tasks, variables, and templates.

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>

* Rename namespace variable inside tasks instead of deleting it

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>

* Change hosts variable to vm_hosts

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>

* Use k8s_namespace instead of dashboard_namespace in dashboard.yml.j2 template

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>

---------

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-08-21 00:47:07 -07:00