Commit Graph
8944 Commits
Author SHA1 Message Date
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
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
Max Gautier 49ca08fe0d CI: Make tf-elastx_ubuntu24-calico manual (#13508)
This jobs is regularly failing for external reasons (can't provision the
VMs, unable to SSH into them, etc) and is also slower than the rest.

Mkae it manual.
2026-09-14 15:05: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
Shruti ca71ebf3d1 facts: continue gathering when a host is unreachable (#13438) 2026-09-14 07:27:22 +00:00
arhuman 8c19dcf51e Bump ansible-static-lint pre-commit hook to v0.5.1 (#13506) 2026-09-14 07:13:18 +00:00
Max Gautier ba14261690 pre-commit: run slow hooks only in CI (#13494)
collection-build-install and check-checksums-sorted have low value for
local development, as what they check isn't likely to be touched by most
contributors
It's also enough to run once pre-commit with --hook-stage manual in CI
to run all hooks (since hooks without a 'stages' applies to all stages)
2026-09-11 15:02:37 +00:00
Max Gautier d2c4885769 Drop debian 13 docker support (#13499)
Debian 13 eliminated apt-key needed to add docker repository.
It needs some work to be supported again.
2026-09-10 14:04:42 +00:00
Max Gautier 3d13ab9e1c CI: put back flatcar in flakey (#13497)
It's sill flakey
2026-09-10 13:48:44 +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 16ad6da94e fix: ansible 2.19: etcd_events_address final evaluation list (#13498) 2026-09-10 13:40:35 +00:00
Narwhal-fish b99fff7373 CI: add support for Fedora 44 and retire Fedora 42 in CI configurations (#13464)
* ci: add Fedora 44 and retire Fedora 42

Signed-off-by: Narwhal-fish <johnnyfish0221@gmail.com>

* chore: adjust order of fedora-44 in main.yml

---------

Signed-off-by: Narwhal-fish <johnnyfish0221@gmail.com>
2026-09-10 12:52:34 +00:00
Nikhil Kumar cfa983e8c7 Replace injected Ansible fact variables in etcd role (#13338) 2026-09-10 11:24:34 +00:00
longxiucai 5e5b072597 fix(cert_manager): stop deleting the namespace on every upgrade run (#13493)
The "Remove legacy namespace" task unconditionally ran
kubectl delete namespace on every playbook run carrying the upgrade
tag, wiping user-managed resources in the cert-manager namespace (for
example custom Issuer secrets) as well as cert-manager's own state,
before the namespace was recreated and the manifests re-applied.

The legacy addon migration this cleanup was written for dates back to
2018 and no longer applies; the apply path (kube module, state latest)
upgrades cert-manager in place without a namespace reset.

Signed-off-by: longyuxiang <longyuxiang@kylinos.cn>
2026-09-10 09:24:36 +00:00
Max Gautier 2acfd9344a CI: test reset on flatcar (#13492)
This is a good way to validate reset behavior with immutable systems
2026-09-10 09:08:41 +00:00
Max Gautier e4eb65dba2 fix/ansible 2.19: reset: no implicit conditionals (#13485) 2026-09-10 09:04:35 +00:00
W GengandWeigang Geng 65832d2e2e Make any_errors_fatal configurable again (#13488)
The plays carry `any_errors_fatal: "{{ any_errors_fatal | default(true) }}"`,
added in #1201 so the behaviour could be turned off.

`any_errors_fatal` is an Ansible play keyword, and Ansible reserves keyword
names in the variable namespace. Setting it through -e, group_vars or
host_vars is rejected with "Found variable using reserved name:
any_errors_fatal" and the value never reaches the play, so the expression
always falls through to `default(true)`. The knob has been inert since it was
introduced.

Rename the variable to `kubespray_any_errors_fatal`. Default behaviour is
unchanged -- still fatal -- but `-e kubespray_any_errors_fatal=false` now
works as #1201 intended.

This matters most in playbooks/internal_facts.yml, where the fatal bootstrap
play runs ahead of the play that gathers and caches facts: one unreachable
host aborts the run before any facts are cached, the playbook still exits 0,
and a later `scale.yml --limit=...` refuses because the excluded hosts have
no cache entries. roles/network_facts already sets ignore_unreachable: true
for this reason, but it never executes.

Refs #13407

Claude-Session: https://claude.ai/code/session_017RCEoUNR9gthd455d8Anrx

Signed-off-by: Weigang Geng <3356786+gengwg@users.noreply.github.com>
Co-authored-by: Weigang Geng <3356786+gengwg@users.noreply.github.com>
2026-09-10 08:38:36 +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
ERIK 26aa4586e9 fix(flannel): make image tag prefix version-aware (#13476)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2026-09-10 07:12:34 +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 5be4b0a9fe CI: add helm for kubelet-csr-approver/custom-cni-helm tests (#13457)
Currently this only works because helm_enabled is not actually checked
for some helm installation cases.
2026-09-09 13:36:34 +00:00
Max Gautier 0378060c91 fix/ansible 2.19: ssl_ca_dirs: don't rely on final evaluation (#13477) 2026-09-09 09:13:25 +00:00
Kay Yan 230cd19497 fix(openeuler): add configurable openeuler_repo_baseurl for faster mirrors (#13134)
Add openeuler_repo_baseurl variable to override the default baseurl
(repo.openeuler.org) with a faster mirror. CI uses Huawei Cloud CDN,
reducing package installation from >900s timeout to ~2min.

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2026-09-09 07:32:34 +00:00
Max Gautier 8e8751465b fix/ansible-core 2.19: implicit list to bool conversion in download (#13470) 2026-09-09 05:24:34 +00:00
Max Gautier 712d13bd48 fix/ansible 2.19: calico: no implicit conditionals (#13480) 2026-09-09 05:20:36 +00:00
Max Gautierandgithub-actions[bot] 15dab0c60c Patch versions updates (#13458)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-09 00:48:32 +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
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
Meza 1754a6b493 fix(etcd): update etcd-metrics to endpointslice using single subset (#12846)
Signed-off-by: Meza <meza-xyz@proton.me>
2026-09-08 15:18:32 +00:00
Max Gautier 7cd8c41218 fix/ansible 2.19: tests: no implicit conditionals (#13479) 2026-09-08 12:54:33 +00:00
arhuman b7b08b33c4 Add astl for fast local Ansible static linting (#13472) 2026-09-08 12:18:30 +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
Ali Afsharzadeh bf2727f6fd Skip component releases published without binary artifacts (#13381)
* Skip component releases published without binary artifacts

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

* Don't use intermediate variable

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

* Fail update-hashes when a component only returns 404s

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

---------

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-09-08 10:20:32 +00:00
Razvan Petrescu 5ca00279b8 Add contrib/terraform/opennebula: provision Kubespray VMs on OpenNebula (#13390) 2026-09-08 10:16:29 +00:00
Max Gautier c554ee816d fix/ansible-core 2.19: etcd: avoid mutating methods in template (#13474)
2.19 disallow methods with side effects in Jinja. Use a simple loop by
adding all the SANs source in one list.

Also check the sources before hand for failing on CIDR notation.

Link: https://github.com/ansible/ansible/issues/85202
2026-09-08 09:12:32 +00:00
Max Gautier 4b7dfaef87 fix/ansible 2.19: etcd: don't rely on final evaluation (#13475)
Suggested-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-09-08 08:04:32 +00:00
Sandaru Wijewardhana 2dd05e4841 Bump nerdctl to v2.3.5 (#13437)
Signed-off-by: sandaruwijewardhana <sandaruwijewardhana@gmail.com>
2026-09-08 07:44:30 +00:00
Max Gautier bbad309f41 update-hashes: temporarily exclude gvisor (#13459)
Gvisor changed it's release artefacts, which makes the whole updater
script fail.
Let's exclude them for now.
2026-09-08 07:22:30 +00:00
Nikhil Kumar 33a26fb9e3 openSUSE: add Leap 16.0 support and CI coverage (#13473) 2026-09-07 14:58:29 +00:00
Max Gautier 85cfaa2cef fix/ansible-core 2.19: docker: bool implict conversion (#13471) 2026-09-07 09:00:28 +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
Kay Yan e164ca4315 image-builder: add openSUSE Leap 16.0 image (#13453)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2026-09-03 15:04:21 +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
Max Gautier afd33dd657 lint: Disable name-casing (and remove comment) (#13456)
ansible-lint is pretty opiniated, and a lots of its opinion are not
particularly useful for Kubespray, so delete the comment about not
adding skip rule entries.

We should not add them willy-nilly but some stuff just does not make
sense, in that case name[casing] when prefixing tasks name with role
name.
2026-09-03 14:04:22 +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