Commit Graph
100 Commits
Author SHA1 Message Date
Max Gautier 535703ea2e Upgrade ansible to 12.*, ansible-core to 2.19.* 2026-09-15 10:57:58 +02: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 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
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
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
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
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
Max Gautier 7cd8c41218 fix/ansible 2.19: tests: no implicit conditionals (#13479) 2026-09-08 12:54: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
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
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
Max Gautier 85cfaa2cef fix/ansible-core 2.19: docker: bool implict conversion (#13471) 2026-09-07 09:00: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
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
Max Gautier 6b7f486fca CI: runs openeuler on less PR (#13160)
Openeuler has a lot of flakes, so let's try to make it less painful on
PR by putting it in extended + adding a 2nd retry
2026-04-15 18:11:01 +05:30
Max Gautier ea36ebe236 CI: test download/container pre pull (#13152)
Patch the control plane to never pull ; this will fail if the images are
not correctly pre-loaded, which is the point.
2026-04-09 08:31:30 +05:30
Max Gautier fddf8ec565 Partial revert "ci(openeuler): improve mirror selection and stabilize CI checks (#13094)" (#13129)
This (partially) reverts commit 3c6d368397.

The fix didn't help with CI flakiness, so putting it back in the flakey
jobs
2026-03-28 19:18:12 +05:30
Max Gautier 6dad642f52 CI: make /tmp/releases world-readable (#13117) 2026-03-19 16:44:31 +05:30
Max Gautier 03d17fea92 proxy: Fix the no_proxy variable (#12981)
* CI: add no_proxy regression test

* proxy: Fix the no_proxy variable

Since 2.29, probably due to a change in ansible templating, the no_proxy
variable is rendered as an array of character rather than a string.

This results in broken cluster in some case.

Eliminate the custom jinja looping to use filters and list flatteing +
join instead.
Also simplify some things (no separate tasks file, just use `run_once`
instead of delegating to localhost)
2026-03-17 03:45:37 +05:30
Max Gautier f66e11e5cc CI: Fix terraform job not using correct extra vars (#13057) 2026-03-04 02:00:18 +05:30
Max Gautier 0c47a6891e Remove netcheker as we now use hydrophone for network tests (#13058) 2026-03-02 19:40:54 +05:30
Max Gautier 4ca7c2f5c5 system_packages: skip action if package set is empty (#13015)
We currently invoke the package module even if the set of package is
empty.

This apparently make the package manager of OpenEuler to regularly time
out.
2026-02-24 09:13:33 +05:30
Max Gautier 55787bd1a2 cleanup 1.32 crio checksums (Kubernetes 1.32 is no longer supported) (#13042) 2026-02-23 20:47:36 +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
Max Gautier 0c75e97601 Remove outdated RHEL8 documentation (#13017) 2026-02-16 21:44:10 +05:30
Max Gautier dcebecc6e0 CI: test disabled localhost LB (#13013) 2026-02-16 21:44:02 +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 Gautierandgithub-actions[bot] 005bdce7f1 Patch versions updates (#12993)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-14 10:07:59 +05:30
Max Gautier 6b8911ca60 CI: gives a little more time for openeuler to manage packages (#13008) 2026-02-14 00:34:01 +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
Max Gautier 8c128771d7 CI: create pr-flakey for jobs prone to failure
We have a lot of PRs where we endlessy retry the same flakey jobs, which
is useless and frustating for everyone.

Put those jobs into a separate matrix with 1 retries to migitate the
issue.
2026-02-13 10:53:15 +01:00
Max Gautier efdff890ed Introduce a timeout for package installation
Sometimes package installations can get into weird state and stuck for a
very long time.
Timeout the tasks to fail early, with a customizable timeout duration.
2026-02-13 10:52:40 +01:00
Max Gautierandgithub-actions[bot] 57364f4085 Patch versions updates (#12973)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-09 21:13:25 +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
Max Gautier 3aa0c0cc64 coredns: allow to customize service name (#12951) 2026-02-06 09:52:29 +05:30
Max Gautier 4245ddcee8 Make etcd node removal idempotent (#12949) 2026-02-05 11:40:28 +05:30
Max Gautier 868ff3cea9 Auto-bump checksums on last 3 branches (#12934)
We now have all supported release branches (last 3) using the new
checksums format, which means they all work with the auto-bump tooling.
2026-01-30 15:39:44 +05:30
Max Gautier 0b69a18e35 Remove nifcloud terraform provider support (it is no longer available) (#12936)
The nifcloud terraform provider has been deleted, so remove support and
CI.
2026-01-30 15:05:44 +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 37f7a86014 etcd-certs: only change necessary permissions (#12908)
We currently **recursively** set the permissions of /etc/ssl/etcd/ssl
(default path) to 700. But this removes group permission from the files
under it, and certain composents (like calio with etcd datastore) rely
on it ; thus, the upgrade of a cluster can fail because the
calico-kube-controller can't access the certs, and thus the etcd.

This works in other case because as far as I can tell, the apiserver
which do access the etcd run as root (the owner of the files, not just
the "group owner")

We also for some reasons do this twice.

Only create the etcd cert directory with the correct permissions once,
not recursively.
2026-01-27 20:25:52 +05:30
Max Gautierandgithub-actions[bot] fff7f10a85 Patch versions updates (#12912)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-27 20:21:53 +05:30
Max Gautier fba8708486 RELEASE.md: fix minor typo (#12891) 2026-01-22 16:43:29 +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
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
Max Gautierandgithub-actions[bot] bc5528f585 Patch versions updates (#12854)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-17 23:57:09 +05:30
Max Gautier 2740c13c0c Do not use apiserver LB in etcd certificates
etcd does not use the apiserver load balancer, there is no reason to
include it's DNS into etcd certificates.
2026-01-15 16:50:45 +01:00
Max Gautier 28f9c126bf ansible-lint: disable jinja[spacing] warning (#12848)
This pollutes ansible-lint output and force us to scroll to check what
the actuall issues are.
The spacing issues are minor and very opinionated, so it's no great
loss.
2026-01-12 13:42:07 +05:30
Max Gautier d91c7d7576 Fix ansible-lint config error (#12842) 2026-01-06 20:15:11 +05:30
Max Gautier 72cb1356ef ci: make opentofu elastx not optionnal 2026-01-05 15:55:01 +01:00
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
Max Gautier a1ec88e290 openstack-cleanup: delete old keypairs as well (#12833)
* openstack-cleanup: format and logging

* openstack-cleanup: delete old keypairs as well
2026-01-05 17:42: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
Max Gautier b7491b957b CI: move vagrant tests to ci-full (#12803)
Those tests are unfortunately broken, move them to ci-full
2025-12-21 19:16:32 -08:00
Max Gautierandgithub-actions[bot] 5cf8f3eefc Patch versions updates (#12799)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-20 02:54:31 -08:00
Max Gautier bcdd702e19 Enable hash updates on 2.28 (2 latest releases) (#12801) 2025-12-19 01:30:36 -08:00
Max Gautier 20693afe82 cleanup tags deprecated tags 'master' (#12795) 2025-12-17 03:34:08 -08:00
Max Gautier 9a90c9d6c8 Upgrade elastx ubuntu version (#12776)
This could fix the glibc version error we're currently having in CI.
2025-12-09 01:19:32 -08:00
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
Max Gautier 118b2dce02 Remove checksums for old versions of various components (#12735)
We only keep 3 minor versions for most stuff
2025-12-05 06:30:59 -08:00
Max Gautierandgithub-actions[bot] 2512e0c50c Patch versions updates (#12762)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-04 06:44:57 -08:00
Max Gautier 633d39448e Add a default (empty) value for supplementary_addresses_in_ssl_keys (#12761)
Most variables should have a default instead of relying on the default
filter.

(Note that the variable is misnomed, this should be certs and not keys,
but it's not worth breaking compat).
2025-12-04 05:28:57 -08:00
Max Gautier 4d87ac1032 Simplify collection of SubjectAlternativeNames for apiserver (#12507)
Remove a bunch of intermediate variables, which fixes a
"'UndefinedMarker' concatenation" error in ansible-lint v25.8.1.
2025-12-04 02:06:57 -08:00
Max Gautierandgithub-actions[bot] 3de6fa7220 Patch versions updates (#12743)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-25 01:04:37 -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
Max Gautier 9d06ce1a8d CI: enable unsafe_show_logs == true by default (#12702)
* CI: enable unsafe_show_logs == true by default

* Deduplicate defaults vars (unsafe_show_logs)
2025-11-19 23:10:00 -08:00
Max Gautier 5183679a89 crio: molecule: move variables to inventory
Fix download/file (which needs the variable to determine the correct
binaries)
2025-11-18 15:44:09 +01:00
Max Gautier b4fe577203 gvisor: molecule: move variables to inventory
Fix download/file (which needs the variable to determine the correct
binaries)
2025-11-18 15:44:08 +01:00
Max Gautier bde51ebddf youki: molecule: move variables to inventory
Fix download/file (which needs the variable to determine the correct
binaries)
2025-11-18 15:44:06 +01:00
Max Gautier 381426d6d5 cri-docker: molecule: move container_manager to inventory var 2025-11-18 15:44:05 +01:00
Max Gautier 6138c6a1a2 CI: use a dedicated disk for releases (#12692)
This should make 'no space left on device' problems easier to handle

Use /tmp/releases as local_release_dir CI created machine, while keeping
the same folder on the runner (needed for gitlab-ci runner pods)
2025-11-17 02:57:39 -08:00
Max Gautier 6115eba3c3 CI: label VirtualMachineInstance with PR id and pipeline ids (#12716)
Helps with CI debuggability
2025-11-17 02:21:39 -08:00
Max Gautier 71c69ec12c CI: Try a full ssh connection on hosts instead of only checking the port (#12416)
* CI: Try a full ssh connection on hosts instead of only checking the port

If we only try the port, we can try to connect in the playbook which is
executed next even though the managed node has not yet completed it's
boot-up sequence ("System is booting up. Unprivileged users are not
permitted to log in yet. Please come back later. For technical details,
see pam_nologin(8).")

This does not account for python-less hosts, but we don't use those in
CI anyway (for now, at least).

* CI: Remove connection method override when creating VMs

This prevented wait_for_connection to work correctly by hijacking the
connection to localhost, thus bypassing the connection check.
2025-11-15 08:37:37 -08:00
Max Gautier 5488e7d805 Update pre-commit hooks (#12707) 2025-11-14 07:51:41 -08:00
Max Gautier ca9873cfcb crictl: remove useless layer of include_tasks (#12656) 2025-11-14 06:57:39 -08:00
Max Gautier db599b3475 Patch version updates (#12696) 2025-11-14 04:41:45 -08:00
Max Gautier 61b8e4ce84 Test the correct version when testing collection + upgrade (#12675)
If we don't rebuild the collection and remove the previous archive we'll
test the first built.
2025-11-11 18:56:56 -08:00
Max Gautier 97a3776d8e Remove etcd member by peerURLs (#12682)
* Remove etcd member by peerURLs

The way to obtain the IP of a particular member is convoluted and depend
on multiple variables. The match is also textual and it's not clear
against what we're matching

It's also broken for etcd member which are not also Kubernetes nodes,
because the "Lookup node IP in kubernetes" task will fail and abort the
play.

Instead, match against 'peerURLs', which does not need new variable, and
use json output.

* Add testcase for etcd removal on external etcd

* do not merge

* fixup! Remove etcd member by peerURLs

* fixup! Remove etcd member by peerURLs
2025-11-10 03:52:56 -08:00
Max Gautier 990695de7b Let containerd create storage / state dir (#12681)
Containerd manages by itself, so there is no need to override it and
change permissions.
2025-11-10 03:42:56 -08:00
Max Gautier 452d4e63e0 Fix the (upgrade/remove_node) + collection test cases (#12672)
The 'old' playbook and the collection use '-' and '_' as separator,
which breaks the logic in scripts/testcases_run.sh.

Add aliases using the old schemes to make the test work and avoid
breaking anything.

Both '-' and '_' variants will be deleted once we switch to supporting
collection only.
2025-11-07 07:22:55 -08:00
Max Gautier e090c9ee26 Factor kubectl_apply_stdin into separate "vars only" role
This is needed to make it available to other roles than kubernetes-apps
2025-11-07 09:34:57 +01:00
Max Gautier 0d6d3f5828 kubectl_apply_stdin SSA support 2025-11-07 09:34:29 +01:00
Max Gautier b9662dbd86 cleanup: don't cleanup runc orphan binary on immutable distros (#12669) 2025-11-06 22:16:53 -08:00
Max Gautier 5acde6cfe2 Get conf checksum directly for localhost CP loadbalancer (#12632)
There is no need to stat the templated file, because the template module
already returns a checksum.
2025-10-23 22:57:36 -07:00
Max Gautier cde7b2b022 Remove leftover docs fragment about mitogen (#12630)
This was left behind from 1fb14b746 (docs: remove outdated mitogen
documentation. (#12619), 2025-10-14)
2025-10-17 08:44:43 -07:00
Max Gautier fbf957ab5d Fix breakage when ignoring all kubeadm preflight errors (#12606)
kubeadm errors out if 'all' is specified with specific checks, so check
that case when we add hardcoded checks.

Add a test to catch regression.
2025-10-13 05:54:58 -07:00
Max Gautier 8d7d9907a1 Rough rework of the CI setup documentation (#12094) 2025-09-15 03:24:11 -07:00
Max Gautierandgithub-actions[bot] 0b082ac2f4 Patch versions updates (#12518)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-01 20:05:12 -07:00
Max Gautier c03c68e8c7 Do not suppress output during cert generation (#12479)
Makes debugging easier.
2025-08-28 19:43:09 -07:00