5969 Commits
Author SHA1 Message Date
Luca Marsella a3d30ad42c fix(etcd): default etcd_secret_changed to false (#13691)
etcd_secret_changed is only set by check_certs.yml, which runs only
when cert_management is "script". With cert_management set to "none",
the "Restart etcd if certs changed" tasks fail because the variable is
undefined.

Signed-off-by: Luca Marsella <marsluca7@gmail.com>
2026-10-29 10:46:47 +00:00
MohammadReza ef0be3345c fix(cri-o): remove CRI-O binaries from their install paths on reset (#13676) 2026-10-29 07:58:47 +00:00
Ali Afsharzadeh 311e114fc3 Upgrade cilium from 1.20.3 to 1.20.4 (#13681)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-10-28 03:11:18 +00:00
Parsa Gheiratian a296c6a239 fix(metallb): wire metallb_controller_tolerations into controller Dep… (#13384)
* fix(metallb): wire metallb_controller_tolerations into controller Deployment

The metallb_controller_tolerations default was introduced in #7334 along
with template wiring, but the wiring was lost in #9120 when the manifest
was regenerated for the CRD switch. Since then the variable has been
defined in roles/kubernetes-apps/metallb/defaults/main.yml but silently
ignored: only metallb_config.controller.tolerations reached the
controller Deployment, while the speaker DaemonSet still honors both
metallb_speaker_tolerations and its metallb_config override.

Merge the role default with the optional metallb_config override, and
only emit the tolerations key when the merged list is non-empty, so
current rendering is unchanged for users who set neither variable.

Signed-off-by: vexsx <p.gheiratian1382@yahoo.com>

* Update metallb.yaml.j2

simplify metallb_controller_tolerations merge using default([])

---------

Signed-off-by: vexsx <p.gheiratian1382@yahoo.com>
2026-10-26 15:46:11 +00:00
Kay Yan cb7ff78696 Use upstream GHCR images for Flannel and its CNI plugin (#13672)
* Use upstream GHCR images for Flannel and its CNI plugin

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

* Remove redundant Flannel image documentation

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

---------

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2026-10-26 08:40:08 +00:00
SEONGHYUN HONGandguoard 4427a95bfe fix(control-plane): fetch discovery kubeconfig when adding control plane nodes with remove_anonymous_access (#13683)
* fix(control-plane): fetch discovery kubeconfig when adding control plane nodes

The 'Get kubeconfig for join discovery process' task is run_once, so its
'when' is evaluated only for the first control plane node. On an existing
cluster that node has already run kubeadm, so the task is skipped for all
hosts and 'Copy discovery kubeconfig' fails on the new control plane nodes
with "'dict object' has no attribute 'stdout'" when
remove_anonymous_access (file discovery) is enabled.

Drop the kubeadm_already_run condition from the run_once fetch. The copy
and join tasks keep their per-host conditions.

Signed-off-by: s3onghyun <s3onghyun.hong@gmail.com>

* control-plane: mark discovery kubeconfig fetch as not changed

Co-authored-by: guoard <guoard@users.noreply.github.com>

---------

Signed-off-by: s3onghyun <s3onghyun.hong@gmail.com>
Co-authored-by: guoard <guoard@users.noreply.github.com>
2026-10-26 03:56:06 +00:00
MohammadReza fdb798e7ea fix(cri-o): remove kubic repo cleanup that breaks CRI-O reset on Debian (#13675) 2026-10-20 06:35:11 +00:00
longxiucai 547d4991e8 Add missing retries to the etcd-events ensure-member check (#13669)
The etcd twin of "Join Member | Ensure member is in etcd-events cluster"
retries the etcdctl member list check (retries/delay/until), the events
copy does not: a transient etcdctl failure right after the member was
added - exactly when the events cluster quorum is shifting - aborts the
play on etcd_events_cluster deployments while the main etcd path rides
the same blip out. Mirror the twin's retry block with the events register
variable. Second instance of the etcd/etcd-events task divergence; the
first was #13640.

Signed-off-by: longyuxiang <longyuxiang@kylinos.cn>
2026-10-19 04:09:41 +00:00
MohammadReza c2ffcdc411 chore(deps): bump flannel to 0.28.10 (#13666) 2026-10-19 03:49:40 +00:00
MohammadReza 050ab46e92 Fix deprecations that ansible-core 2.23 removes (#13667)
* chore: fix deprecations that ansible-core 2.23 removes

* chore: unwrap the templated assert in assert-sorted-checksums.yml
2026-10-18 10:03:38 +00:00
MohammadReza ee61864e43 chore(deps): upgrade cilium from 1.20.2 to 1.20.3 (#13660) 2026-10-15 17:44:23 +00:00
Frank bebc536fae fix: configure Kubernetes feature gates with dictionaries (#13608)
* fix: configure Kubernetes feature gates with dictionaries

* docs: update feature gate settings to dictionaries
2026-10-15 15:26:39 +00:00
Ali Afsharzadeh 6b3cbe1cbb Rewrite k8s-certs-renew script in Python (#13502)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-10-15 14:06:25 +00:00
MohammadReza 0addac084f chore(deps): bump prometheus-operator CRDs to 0.94.1 (#13657) 2026-10-15 11:12:26 +00:00
Mathieu Parent bb9bd87210 Make system_upgrade_reboot: always work for apt (#13655) 2026-10-14 21:58:10 +00:00
longxiucai 8a88284568 Fix macvlan gateway interface detection for names with dots or dashes (#13642)
The [[:alnum:]]* capture truncates interface names at the first character
that is not a letter or digit: eth0.100 (VLAN) becomes eth0, br-9a93...
becomes br, bond0.200 becomes bond0. The result feeds
node_default_gateway_interface, which the macvlan MASQUERADE rules use as
the -o match (RedHat post-up/post-down and the Flatcar NAT service under
enable_nat_default_gateway), so pod traffic egressing the default gateway
loses NAT because the rule references a wrong or nonexistent interface.

Capture the whole whitespace-delimited token after ' dev ' instead. The
leading space also keeps the greedy match from latching onto names that
themselves end in 'dev' (e.g. lan-dev).
2026-10-14 08:27:05 +00:00
MohammadReza cbc8d9abc0 Bump local-volume-provisioner to v2.10.0 (#13649)
* chore(deps): bump local-volume-provisioner to 2.10.0

* fix(local_volume_provisioner): keep info logs and add upstream's liveness probe
2026-10-14 05:08:53 +00:00
Max Gautierandgithub-actions[bot] 3c455b365a Patch versions updates (#13644)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-14 03:01:05 +00:00
Max Gautier 1011c240b4 downloads: split file and containers (#13581)
Splits the definitions into two dicts, while joining then for now to
preserve the downloads dict.

Update all consumers of the variables, which are roughly:
- manual includes of the download role (which will be removed in the
  short future)
- install tasks using the resolved 'dest' to find the artefacts

This will make further division of the downloads role easier.
2026-10-13 09:58:21 +00:00
JaeyungLee 40d5c77c8e reopen PR #12580 (#13162) 2026-10-13 09:52:21 +00:00
longxiucai 527f251431 Fix etcd-events member add failing when the member already exists (#13640)
join_etcd_member.yml tolerates 'Peer URLs already exists' since #6587,
but the etcd-events twin was missed: when a previous run was interrupted
after the member was added, the re-run keeps retrying etcdctl member add
until etcd_retries is exhausted and aborts the play. Mirror the exact
until/failed_when pair from the etcd version.
2026-10-13 09:14:21 +00:00
Ali Afsharzadeh e6d9473a96 Report kube-proxy server update as changed only when it changes (#13631)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-10-13 08:18:10 +00:00
Ali Afsharzadeh 6a91511e13 Upgrade snapshot-controller to v8.6.0 (#13629) 2026-10-12 10:23:34 +00:00
MohammadReza 9a067a62b9 Fix containerd tracing with containerd 2.x (#13630)
* fix(containerd): pass tracing settings as OpenTelemetry environment variables

* fix(containerd): address review on tracing

* fix(containerd): drop tracing comments
2026-10-12 10:11:23 +00:00
Javad a4ac5d1121 Fix anonymous access cleanup during cluster upgrade (#13417) 2026-10-12 09:23:25 +00:00
longxiucai 69ad777b45 Fix reset rescue skipping pod cleanup when there are no network namespaces (#13632)
With an empty 'ip netns list' (the common case), xargs without -r still
runs 'ip netns delete' once with no argument. That fails, so the && chain
short-circuits and 'crictl rmp -a -f' never runs: the rescue path leaves
the pod sandboxes behind, which is exactly what it is there to clean up.
Other tasks in the same file already use xargs -r.
2026-10-12 09:01:36 +00:00
MohammadReza c5dd17b5cb feat(etcd): default etcd_snapshot_count to 10000 to match etcd 3.6+ (#13600) 2026-10-12 06:55:39 +00:00
Dasmat Hansda 38f82cdce9 refactor: unify inconsistent variables in apiserver endpoint (#13392) 2026-10-12 06:25:22 +00:00
Jathavedhan 7c57bc015d Enable Calico loadbalancer controller in calico-kube-controllers (#13611)
calico-kube-controllers ran without the loadbalancer controller, so
Service LoadBalancer IPs were never allocated from Calico IP pools.
Add it to both datastore lists on Calico 3.30.0 and later, where the
controller exists, and make the lists configurable.

Signed-off-by: Jathavedhan M <jathavedhan.m@ibm.com>
2026-10-12 04:01:34 +00:00
Jay.HandAli Afsharzadeh 457217aaa0 Allow setting --service-account-extend-token-expiration for kube-apiserver in hardening.yaml (#13616)
* kube-apiserver: add --service-account-extend-token-expiration

* Update docs/ansible/vars.md

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

* Update docs/operations/hardening.md

* Update docs/operations/hardening.md

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

---------

Co-authored-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-10-12 03:57:19 +00:00
MohammadReza b1881b5a3e chore(deps): bump runc to 1.5.2 (#13622) 2026-10-08 19:39:59 +00:00
ERIK d74d180c09 reset: unmount calico cgroup2 fs before deleting /run/calico (#13592)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2026-10-08 12:17:58 +00:00
Ali Afsharzadeh d98540de2c Add etcd_feature_gates and restore the etcd 3.5 flag names (#13569)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-10-08 03:41:59 +00:00
MohammadReza 5eae65cc2a chore(deps): bump nerdctl to 2.4.1 (#13617) 2026-10-08 02:44:00 +00:00
MohammadRezaandAli Afsharzadeh 622a1666ed Remove upgrade shims shipped in 2.31.0 and 2.32.0 (#13598)
* chore: remove upgrade shims shipped in 2.31.0 and 2.32.0

* fix(validate_inventory): anchor every name in the removed_vars regex

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

---------

Co-authored-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-10-04 10:00:23 +00:00
Farshad Asadpour c58f0aff41 [argocd] Bump ArgoCD version to 3.5.3 (#13591)
Argo CD publishes its tested Kubernetes versions at
https://argo-cd.readthedocs.io/en/stable/operator-manual/tested-kubernetes-versions/

3.5.3 is the latest available Argo CD release. Its matrix covers v1.33
through v1.36, which does not include the v1.37.1 shipped by this
branch, so this is the best available option rather than a combination
upstream has marked as tested. The 2.14 series is no longer listed on
that matrix.

argocd_version is derived from the first entry of
argocd_install_checksums, so adding the checksum for 3.5.3 at the top
of the list selects it.
2026-10-04 07:20:20 +00:00
Ali Afsharzadeh 15ea3a9bba Upload kubeadm ClusterConfiguration before the control plane upgrade (#13594)
kubeadm upgrade reads ClusterConfiguration only from the kubeadm-config
ConfigMap, so it keeps the old etcd version. The etcd version then
changes on all control plane nodes at the same time, and the control
plane stops. Upload the ClusterConfiguration first. Then kubeadm
upgrades etcd on one node at a time.

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-09-30 09:06:38 +00:00
Kay Yan ebf1560fc0 Revert EL8 Python bootstrap and Calico CI (#13596)
This reverts commit e19d1c9a55.

Allow further maintainer discussion without introducing additional changes.

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2026-09-30 08:20:38 +00:00
Kay Yan e19d1c9a55 Enable AlmaLinux 8 and Rocky Linux 8 Calico CI with Python 3.12 bootstrap (#13593)
* Enable AlmaLinux 8 and Rocky Linux 8 Calico CI

Install Python 3.12 with yum before gathering facts when the interpreter
selected by Ansible is missing or older than Python 3.9, and add
bootstrap_os_install_python to control distribution-specific Python
bootstrap installation.

EL8 only ships the libselinux Python bindings for the distribution
Python 3.6, so ansible.posix.selinux fails once Kubespray runs with
Python 3.12. Keep using the module when the bindings are importable and
otherwise set the policy in /etc/selinux/config and apply the runtime
state with setenforce.

Enable rockylinux8-calico in regular PR CI, add almalinux8-calico as a
manual job, and document the RHEL 8 family lifecycle.

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

* Fix EL8 containerd compatibility and SELinux runtime transitions

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

---------

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2026-09-29 10:32:14 +00:00
MohammadReza d5190f6071 refactor: resolve ansible-core 2.19 TODOs now that 2.21 is the minimum (#13588) 2026-09-28 21:35:32 +00:00
MohammadReza ec07470009 Bump registry to 3.1.2 (#13531)
* chore(deps): bump registry to 2.8.3

* chore(deps): bump registry to 3.1.2
2026-09-28 12:36:35 +00:00
Max Gautier cad55c82c6 Cleanup leftover variables from yq removal (#13582) 2026-09-28 08:22:32 +00:00
Dasmat Hansda a9c2b73d31 fix: ensure consistent etcd certificate permissions on first etcd node (#13367)
* fix(etcd): ensure consistent certificate permissions on first etcd node

The etcd certificate generation script runs on the first etcd node and
creates certs with default ownership and permissions. Subsequent copy
tasks set explicit ownership and permissions on the remaining etcd
nodes, resulting in inconsistent permissions across the cluster.

This can cause issues such as etcd backup jobs failing on the first
node due to missing read access to certificate files.

Add an ansible.builtin.file task after cert generation to explicitly
set the correct ownership and permissions on the first etcd node.

* fix(etcd): guard client certificate permissions

* fix(etcd): set certificate permissions during installation
2026-09-28 07:32:33 +00:00
Ali Afsharzadeh baf68247eb Fix network range asserts on Ansible 2.19 (#13575)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-09-26 15:04:28 +00:00
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
Mehrdad Biukian d75f23cba3 fix(container-engine/cri-o): flush Restart crio handler inside the role (#13416)
* fix(container-engine/cri-o): flush Restart crio handler inside the role

During a Kubernetes upgrade (e.g. 1.32 -> 1.33) the cri-o systemd service is
not restarted even though the new cri-o binaries are deployed. This leaves the
node running the old cri-o version (reported as crio://1.32.x after kubelet is
upgraded to 1.33.x); a manual 'systemctl restart crio' fixes it.

The cri-o role notifies 'Restart crio' from several tasks (binary copy,
registries, proxy drop-in, service file, etc.) but never flushes the handler
itself. The handler only fired when the kubernetes/node role ran its own
'meta: flush_handlers' later in the same play. That cross-role dependency is
fragile during upgrades: if kubernetes/node is skipped, tagged out, or the
flush is reordered, the restart is silently dropped.

Route every restart through the single handler: crio.conf and config.json now
notify 'Restart crio' and the ad-hoc 'trigger service restart only when needed'
task is dropped (its restart duplicated what the handler already does, and a
restarted unit also starts a stopped one). Then add 'meta: flush_handlers'
right after the service start task so the pending handlers run as part of this
role regardless of any downstream role's flush timing.

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

* test(youki): run youki before cri-o in molecule converge

The converge ran container-engine/cri-o before container-engine/youki, the reverse of the order used by the container-engine role, which installs the runtime roles (kata-containers, gvisor, crun, youki) before the container manager role.

With cri-o flushing its restart handler inside the role, cri-o is now restarted while /usr/local/bin/youki does not exist yet: CRI-O skips the runtime whose binary is missing, so the youki runtime handler is never registered and the verify step fails with 'failed to find runtime handler youki from runtime list map[crun:...]'. Running the roles in the playbook order puts the youki binary in place before cri-o starts.

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

---------

Signed-off-by: Mehrdad Biukian Naeini <mehrdadbiukian@gmail.com>
2026-09-26 09:50:28 +00:00
Ali Afsharzadeh ac72c82651 Compare the ip var with local IPs as addresses (#13577)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-09-26 09:36:28 +00:00
Ali Afsharzadeh 90f7c2505f Set priorityClassName and priority on static pods (#13578)
With priority only (#13490), the API server rejects the mirror pods
and the kubelet does not give the pods the node-critical OOM score.
Set both fields, like kubeadm does for its static pods.

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-09-26 08:46:28 +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 58be448c63 Remove yq as it's no longer needed
After removing it's use in argocd install, yq is no longer used
anywhere.

Remove it everywhere.
2026-09-25 19:46:04 +02:00