Commit Graph
2008 Commits
Author SHA1 Message Date
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
Max Gautier e7f4c9f9f6 kubeadm_patches: remove old patches on inventory change (#13019)
Currently, if changing the inventory variable `kubeadm_patches`, new
patches will be created, but the existing ones will also be left on the
filesystem, and applied by kubeadm ; this means that removed or changed
configuration can linger.

Cleanup old patches (which are the difference between existing patches
on filesystem and the one created for the current runs).
2026-02-17 09:56:01 +05:30
Chad Swenson 8af9f37b28 Undefined check for apiserver_loadbalancer_domain_name in apiserver_sans (#13009) 2026-02-16 15:22:01 +05:30
Max Gautier a4215cbef9 Remove workaround for kubeadm bug which is no longer necessary (#12991)
Introduced in 14b63ede8 (Fixup kubelet.conf to point to
kubelet-client-current.pem (#7347), 2021-03-09)
2026-02-14 19:37:59 +05:30
Max Gautier bf3fef05fd control-plane: do not adjust apiserver endpoint (#12870)
This essentially revert the functionnality of 9b0f57a0a (Adjust
endpoints for kube-proxy,controller,scheduler to proper ip (#5150),
2019-09-09).

This is no longer needed since kubeadm now default to use the local
kube-apiserver for control plane components (feature gate
"ControlPlaneKubeletLocalMode")

https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init/#feature-gates
2026-02-13 15:52:01 +05:30
Srishti Jaiswal 054f7bf07b use admin.conf for local kubeconfig (#12997) 2026-02-12 22:08:01 +05:30
Srishti Jaiswal 46058349ce use kubeadm:cluster-admins for admin kubeconfig (#12998) 2026-02-12 19:06:01 +05:30
Srishti Jaiswal d5b91828a3 Use kubeam kubeconfig user instead of generating a kubeconfig with Ansible (#12958) 2026-02-12 15:16:01 +05:30
Mohamed Omar Zaian a77221d12b [kubernetes] Support Kubernetes v1.35.0 (#12812) 2026-02-10 14:54:02 +05:30
Max Gautier 34f43d21e3 Revert "kubelet: conditionalize staticPodPath location (#12433)" (#12970)
* Revert "kubelet: conditionalize staticPodPath location (#12433)"

This reverts commit 082507cff2.

* Add kubelet_static_pod_path to removed variables
2026-02-09 07:31:09 +05:30
Tushar240503 c5c2cf16a0 Move inline defaults to defaults/main.yml (#12926) 2026-02-03 14:14:29 +05:30
Max Gautier fcecaf6943 wait for control plane node to become ready after joining (#12794)
When joining a control plane node and "upgrading" the cluster setup (for
example, to update etcd addresses after adding a new etcd) in the same
playbook run, the node can take a bit of time to become ready after
joining.
This triggers a kubeadm preflight check (ControlPlaneNodesReady) in
kubeadm upgrade, which is run directly after the join tasks.

Add a configurable wait for the control plane node to become Ready to
fix this race condition.
2026-01-28 22:15:51 +05:30
Max Gautier df3f0a2341 k8s-certs-renew: fix broken script (#12876)
Unproquer quoting of variable assignment make the shell interpret it as
a command ; since the variable is unused anyway, just delete it.
2026-01-19 22:57:47 +05:30
Kubernetes Prow Robot 62e90b3122 Merge pull request #12872 from VannTen/fix/defaut_lb_address
Use loadbalancer IP as default apiserver endpoint if no LB hostname is used
2026-01-19 21:45:50 +05:30
Max Gautier 6b5cc5bdfb Fix defaults for apiserver_loadbalancer_domain_name
Since we're not longer injecting pseudo DNS into /etc/hosts,
'lb-apiserver.kubernetes.local' (the previous default) won't resolve to
anything.

Instead, default to the loadbalancer IP if defined, or to the node local
loadbalancer if it's in use.

Make the necessary adjustements in use site to deal with ip addresses as
well as hostnames.
2026-01-19 09:43:48 +01:00
Bas 52b68bccad Fix: ansible_facts.selinux.status added. (#12861) 2026-01-14 23:31:40 +05:30
Will Xiang 82c4c0afdf fix syntax in haproxy.cfg.j2 for IPv6 binding (#12862) 2026-01-14 12:33:35 +05:30
Qasim Mehmood 17c72367bc kube-vip: Fix template, drop all capabilities and use kube_vip_version (#12835)
* Drop capabilities in kube-vip and use kube_vip_version

* Preserve trailing newline for kube_vip_cidr env var
2026-01-07 07:43:38 +05:30
Kubernetes Prow Robot 14b20ad2a2 Merge pull request #12832 from VannTen/cleanup/network_facts
network_facts: streamline set_fact and setup calls
2026-01-06 15:01:10 +05:30
Max Gautier 51304d57e2 network_facts: streamline set_fact and setup calls
- invoke setup module only once to gather ipv4 and ipv6 addresses
- eliminate remaining use of `fallback_ip` and `fallback_ip6`, allowing
  us to define (with `set_fact` all the "computed" IPs variable in one
  go, since there is no longer a dependency between them.
2026-01-05 15:54:56 +01:00
LawiK974 20ab9179af Update kube-vip to v1.0.3 (#12815) 2026-01-04 22:52:37 +05:30
Max Gautier 6a517e165e Fix kubeadm init retry (#12785)
We currently always fail on the kubeadm init retry, because of the
remnants of the first try.

Ignore the related errors in the retry to unblock it.
2025-12-25 15:14:31 +05:30
Bas e80087df93 Fix for #12435 - setting timezone under SELinux. (#12436)
Signed-off-by: Bas Meijer <bas.meijer@enexis.nl>
2025-12-24 16:40:31 +05:30
Max Gautier 88df61357b Use run_once for kubeadm init phase upload-certs (#12759)
Before "5ca23e3bf (Changed to use first_kube_control_plane to parse
kubeadm_certificate_key (#11875), 2025-01-14)", kubespray would have
problem adding new control planes when the order of the nodes in kubectl
output and the ansible inventory were not the same.

But the underlying problem is that the operation is fundamentally
something that should be done only once, and recorded for all host in
play.

Since `register` and `sef_fact` when used with `run_once` set the
variable for all the hosts, use it. Also allows to use the variable
directly instead of relying on hostvars to make the task more readable.
2025-12-07 21:07:27 -08:00