Commit Graph
2031 Commits
Author SHA1 Message Date
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
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
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
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
Javad a4ac5d1121 Fix anonymous access cleanup during cluster upgrade (#13417) 2026-10-12 09:23:25 +00:00
Dasmat Hansda 38f82cdce9 refactor: unify inconsistent variables in apiserver endpoint (#13392) 2026-10-12 06:25:22 +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
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
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
Shuu 0839383414 fix: skip None resolvconf paths on Ansible Core 2.19 (#13548)
Empty base/head facts render to None on Ansible Core 2.19, which
difference(['']) does not remove. Use select to drop both.
2026-09-24 03:54:14 +00:00
Kay Yan ce6f5fe886 feat: add openSUSE MicroOS support (#13449)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2026-09-20 13:45:57 +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
longxiucai 53a30aea58 Fix kubelet.conf server line indentation (#13284)
The lineinfile tasks that rewrite the server field in kubelet.conf
replaced the whole line with a hard-coded indentation, corrupting the
file when the existing entry was indented differently. Capture the
original leading whitespace with a group regexp and restore it via
backrefs so the rewrite preserves the surrounding YAML structure.

Signed-off-by: longyuxiang <longyuxiang@kylinos.cn>
2026-09-15 06:37:18 +00:00
Max Gautier b1b01bc579 local_volume_provisioner: match upstream storage class syntax (#13504)
Use the upstream keys without converting them to snake case. This avoids
converting back to camel case when rendering, and aligns ourselves more
with our upstream.
2026-09-14 15:45:22 +00:00
jskrill 6413f2ae5c fix(kubernetes/node): use numeric priority for static pods (#13490)
Signed-off-by: Jules Skrill <julesskrill@gmail.com>
2026-09-14 14:37:20 +00:00
felipe88alves f6b046bcac feat: add preflight admission readiness check before kubeadm upgrade (#13140)
* feat: add preflight admission readiness check before kubeadm upgrade

  - linked to issue #13139
  - Add opt-in dry-run Job probe to verify the admission pipeline is ready before running kubeadm upgrade apply (workaround for Kubernetes #124237)
  - Gate the check behind kubeadm_upgrade_preflight_check_enabled (default false) with configurable retries and delay
  - Emit a warning instead of failing if the preflight check does not pass

* fix: refine preflight admission check Job and warning

- Use generateName for the dry-run preflight Job to avoid fixed-name collisions
- Expand the Kubernetes issue reference in the warning to a full GitHub URL

Created with AI-assistance
2026-09-10 08:14:36 +00:00
Kay Yan b7d99749b8 preinstall: generalize minimum-value semantics for managed sysctls (#13224)
* preinstall: generalize minimum-value semantics for managed sysctls

Move the hardcoded sysctl floor map out of 0080-system-configurations.yml
into a default variable, and introduce additional_sysctl_min so users can
declare their own sysctl floors. Floor semantics only apply a managed
value when the node's current value is lower; pre-tuned images (Bottlerocket,
EKS AMIs, OpenShift RHCOS, hardened distros) and newer kernels that
already set higher values are left alone.

Default floors are aligned with prior art from the OpenShift Node Tuning
Operator (TuneD '=>' floor syntax in the openshift / openshift-node
profiles) and kops. None of the floor keys are part of the kubelet
protect-kernel-defaults validation list, so the floor mechanism cannot
interfere with kubelet startup. Keys not present on the running
kernel/distro are skipped without failing.

additional_sysctl (exact-value semantics) is unchanged for backward
compatibility.

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

* preinstall: refine sysctl floor handling

Keep built-in floor values internal while preserving user overrides
through additional_sysctl_min.

Use sysctl --ignore for unknown keys and filter empty results without
masking other read errors.

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

---------

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2026-09-10 07:46:33 +00:00
wangsifei99 35f900dd72 Add cleanup kubeadm backups under /etc/kubernetes/tmp (#13415)
* Add cleanup kubeadm backups under /etc/kubernetes/tmp

* Add kubeadm_backup_retention_count=0 to test
2026-09-10 07:42:46 +00:00
Seena Fallah 44ab38baae control-plane: fix kubeadm ops when advertiseAddress cannot be derived from default gateway (#13156)
* download: add apiserver ip in InitConfiguration

In setups where the advertiseAddress cannot be derived from the
default gateway, setting localAPIEndpoint.advertiseAddress will
eliminate the error caused by that. this is like other kubeadm
configs that we have.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* control-plane: pass kubeadm config when creating token

kubeadm token create subcommand will generate a default config when
nothing as --config is passed. therefore if we have setups that need
the config values to let kubeadm work (like if the ip cannot be derived
by the default gateway) it will fail.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

---------

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2026-09-10 07:42:37 +00:00
Kay Yan fd206a19f5 CI: add Ubuntu 26.04 support and coverage (#13443)
* image-builder: add Ubuntu 26.04 image

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

* CI: add Ubuntu 26.04 support

Add an Ubuntu 26.04 CI job (ubuntu26-calico-all-in-one) to the main PR
matrix, OS-specific node vars, and update the coverage docs.

The VM image is published as quay.io/kubespray/vm-ubuntu-2604.

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

---------

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2026-09-10 03:56:33 +00:00
Max Gautier ff19dbd284 fix/ansible 2.19: local vol provisioner: don't rely on final evaluation (#13481)
- also remove mitogen workaround from local_volume_provisioner since
  creating the dirs is handled by kubernetes/preinstall instead
- correct the tag in kubernetes/preinstall as persistent_volumes isn't
  the same thing
2026-09-08 22:46:35 +00:00
Alexander Skiba (MANZ Solutions) 12355b7e0a Fix lint violation: jinja[invalid] to make pre-commit pass (#13337) 2026-09-07 07:24:28 +00:00
Max Gautier 490253f6f0 fix/ansible-core 2.19: ntp_timezone implicit string -> bool (#13469) 2026-09-05 04:46:22 +00:00
Ali Afsharzadeh e125a30b16 Fix k8s-certs-renew renewing on nodes without super-admin.conf (#13414)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-09-03 14:30:21 +00:00
Ali AfsharzadehandChengHao Yang ae329ee192 Fix k8s-certs-renew renewing all certificates on every timer run (#13413)
* Fix k8s-certs-renew renewing all certificates on every timer run

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

* Strip trailing whitespace from systemd-analyze calendar output

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

* Remove issue link

Co-authored-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>

---------

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
Co-authored-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2026-08-21 07:07:16 +00:00
Shaleen Bathla a7391a1461 kubelet, crio service: standardize unit file permissions to 0644 (#13408)
* kubelet.service: use standard permissions

systemd[1]: Configuration file /etc/systemd/system/kubelet.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.

* crio.service: reduce execute permission

systemd[1]: Configuration file /etc/systemd/system/crio.service is marked executable. Please remove executable permission bits. Proceeding anyway.
2026-08-06 13:22:55 +00:00
tophac 4ee4ced065 Fix(#13396)Delete the leftover eviction_hard_control_plane variable (#13400) 2026-08-03 04:33:24 +00:00
emma034186-stack 5d17ea45a9 fix(cilium): stop early if kube_owner is not root (#13385)
Cilium's init containers run as UID 0 with capabilities (including
CAP_DAC_OVERRIDE) dropped, so host paths it writes to (e.g. /opt/cni/bin)
must be owned by root or it will fail with a permission error.

Add a pre-flight assert that fails fast with a clear message when
kube_network_plugin == cilium and kube_owner != root, instead of
changing CNI bin ownership defaults for all network plugins.
2026-07-22 14:17:51 +00:00
ChengHao Yang 80b3345ed8 fix: cri-dockerd doesn't support ExtendWebSocketsToKubelet
Disabled the FG ExtendWebSocketsToKubelet when `container_manager` set `docker`, let CI can passed.
2026-07-06 16:57:50 +08:00
ujstor 7c8f928405 fix-absent-cni-kubeadm-join-control-planes (#13280) 2026-06-02 07:34:59 +05:30
Nikhil Kumar 2ffff07887 Replace injected Ansible fact variables in node and control-plane roles (#13240) 2026-06-02 07:34:51 +05:30
Zakhar Dvurechensky 9049703ce0 roles: rely on configured defaults (#13249)
Signed-off-by: Zakhar Dvurechensky <72825626+Zakharden@users.noreply.github.com>
2026-05-27 15:09:50 +05:30
Ali Afsharzadeh 6107c6ab7c Align nginx worker_rlimit_nofile with containerd defaults (#13255)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-05-21 17:10:48 +05:30
Sumit Solanki 7fd29b5529 kube-vip: optional Prometheus metrics (default port 2112) (#13229)
Add kube_vip_metrics_enabled and kube_vip_metrics_port; wire
prometheus_server and container port in the static pod manifest.
Default metrics port to 2112 to match kube-vip upstream. Document
and sample inventory updated.
2026-05-19 11:15:02 +05:30
Ali Afsharzadeh 17f270325d Remove deprecated apiserver-count kubeadm config option (#13262)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-05-18 16:17:51 +05:30
Justin Lamp 8c3f6270f8 Add toggle to disable node subnet allocation (#13239)
Signed-off-by: Justin Lamp <justin.lamp@netways.de>
2026-05-16 11:34:34 +05:30
Nikhil Kumar 2ed677ce86 Replace injected Ansible fact variables with ansible_facts in preinstall role (#13232) 2026-05-14 16:08:30 +05:30
Sumit Solanki e97333dbf8 fix: skip kube-proxy-only tasks when kube_proxy_remove is true (#13228)
* fix: skip kube-proxy-only tasks when kube_proxy_remove is true

Signed-off-by: Sumit Solanki <sumit.solanki@ibm.com>

* refactor: use  where defaults already define the var

Signed-off-by: Sumit Solanki <sumit.solanki@ibm.com>

---------

Signed-off-by: Sumit Solanki <sumit.solanki@ibm.com>
2026-05-07 18:31:20 +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
R. P. Taylor 9c953fffee Set fs.inotify.max_user_instances=8192 by default (#13075) 2026-04-21 19:01:54 +05:30
Chad Swenson f81842d0ed Implement structured authentication configuration for API server (#13035) 2026-04-21 08:25:52 +05:30
Yang-Ming Lin 65352fef39 Fix Flatcar flaky CI by enabling apiserver wait after DNS handler (#13063)
Remove the Flatcar/Fedora CoreOS exclusion from the wait handler
and unify the Flatcar-specific notify channel into the shared
"propagate resolvconf to k8s components" channel.
2026-04-03 20:17:03 +05:30
Srishti Jaiswal ba70ed35f0 Remove kubeadm config api version: v1beta3 for kubeadm config template (#13027) 2026-03-11 20:27:38 +05:30
Cheprasov Daniil 3bdd70c5d8 Feat: make kube-vip BGP source configurable (#13044) 2026-03-11 19:17:38 +05:30
Max Gautier 9cce89dc5e kubeadm: delete unused node-kubeconfig template (#13012) 2026-02-17 23:41:38 +05:30