Commit Graph

7970 Commits (e8bdd47eccb35dee145e92e251512f2f55d060f3)
 

Author SHA1 Message Date
Javad e8bdd47ecc
Fix kubelet-csr-approver deployment failes if kube_network_plugin=cni(generic) (#11704)
* Make Helm's 'atomic' parameter configurable from role variables

* Configure Helm with 'atomic' and 'wait' set to false for generic CNI to prevent kubelet-csr-approver installation failures
2024-11-16 14:54:54 +00:00
Max Gautier c4b53ff01a
Include scripts and conf files in the ansible collection (#11707)
We use shell scripts and conf files in some roles (notably, certificates
provisioning), so we need to include them in order for the collection to
work when using the configurations depending on those roles.
2024-11-15 09:40:52 +00:00
Max Gautier 68718dcb6f
Stricter kubeadm validation (config and runtime checks) (#11710)
* kubeadm: do not ignore preflight errors blindly

The "ignoring all errors" seems to date back to the inception of the
kubeadm support (it was --skip-preflight-check before).

This can mask real errors and prevent users from seeing them.

Do not ignore any errors by default and make the set of ignored errors
configurable.

* download/kubeadm: remove redundant task

The mode is already set by the previous `copy` task.

* Validate kubeadm configs

This should help to fail early when we have invalid kubeadm configs (from
a kubespray bug or a misconfiguration).

* kubeadm-upgrade: remove unnecessary bool cast

* Convert kubeadm join discovery timeout to v1beta4 config

* CI: Ignore kubeadm:Mem errors on some setup.
2024-11-15 06:34:52 +00:00
Kubernetes Prow Robot 05e2b47db6
Merge pull request #11530 from VannTen/ci/cleanup_with_k8s_gc
[CI] Use Kubernetes GC to clean kubevirt VMs (packet-* jobs)
2024-11-14 10:49:15 +00:00
Max Gautier 47f67818b6
CI: (packet-ci) simplify role layout 2024-11-14 09:41:02 +01:00
Max Gautier 236a7486f4
CI: directly use ANSIBLE_VERBOSITY instead of tweaking command line
https://docs.ansible.com/ansible/latest/reference_appendices/config.html#envvar-ANSIBLE_VERBOSITY
2024-11-14 09:41:01 +01:00
Max Gautier b5464afa55
CI: workaround for upgrade test backward compatibility
The new CI does not define k8s_cluster group, so it relies on
kubernetes-sigs/kubespray#11559.

This does not work for upgrade testing (which use the previous release).
We can revert this commit after 2.27.0
2024-11-14 09:41:01 +01:00
Max Gautier ceb4b2fa7d
CI: use current tests/ directory for upgrade testing
We should not rollback our test setup during upgrade test.
The only reason to do that would be for incompatible changes in the test
inventory, and we already checkout master for those (${CI_JOB_NAME}.yml)

Also do some cleanup by removing unnecessary intermediary variables
2024-11-14 09:41:00 +01:00
Max Gautier ff4de880ae
CI: Replace kubevirt dynamic inventory with generated yaml
VirtualMachineInstance resources sometimes temporarily loose their
IP (at least as far as the kubevirt controllers can see).
See https://github.com/kubevirt/kubevirt/issues/12698 for the upstream
bug.

This does not seems to affect actual connection (if it did, our current
CI would not work).
However, our CI execute multiple playbooks, and in particular:
1. The provisioning playbook (which checks that the IPs have been
   provisioned by querying the K8S API)
2. Kubespray itself

If any of the VirtualMachineInstance looses its IP between after 1
checked for it, and before 2 starts, the dynamic inventory (which is
invoked when the playbook is launched by ansible-playbook) will not have
an ip for that host, and will try to use the name for ssh, which of
course will not work.

Instead, when we have a valid state during provisioning (all IPs
presents), use it to construct a static inventory which will be used for
the rest of the CI run.
2024-11-14 09:40:59 +01:00
Max Gautier 329ffd45f0
CI: use kubevirt.core dynamic inventory
This allows a single source of truth for the virtual machines in a
kubevirt ci-run.

`etcd_member_name` should be correctly handled in kubespray-defaults for
testing the recover cases.
2024-11-14 09:40:58 +01:00
Max Gautier 1a4567ac29
Remove deprecated key from kubeadmconfig/v1beta4 (#11709)
timeoutForControlPlane has been removed from v1beta4, instead remplaced
by https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/#kubeadm-k8s-io-v1beta4-Timeouts

The default for the new value are close enough that there is no need to
override them.
2024-11-14 08:29:13 +00:00
Andreas Gravgaard Andersen 9f88f19e31
remove nameless extraArgs entry (#11703)
* remove nameless extraArgs entry

Signed-off-by: Andreas Gravgaard Andersen <andreasga22@gmail.com>

* fix template name

Signed-off-by: Andreas Gravgaard Andersen <andreasga22@gmail.com>

---------

Signed-off-by: Andreas Gravgaard Andersen <andreasga22@gmail.com>
2024-11-13 17:52:48 +00:00
Max Gautier a8e7238c9f
CI: make the ansible inventory a directory
Not constraining the inventory to .ini allows us to use dynamic
inventory, which is needed for simplifying kubevirt jobs inventory.

Also reduces the scope of the ANSIBLE_INVENTORY variable.
2024-11-13 17:32:52 +01:00
Max Gautier c46e5dc33a
CI: use VirtualMachineInstance for VMs
VMI in Kubevirt are the abstraction below VirtualMachine.

- We don't really need the extra abstraction of VirtualMachine objects
- Convert the waiting for VMs ip address to use kubernetes.core.k8s_info
  and no shell pipeline
2024-11-13 17:32:50 +01:00
Kay Yan 81a66cc73d
add ci for openeuler (#11689)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2024-11-12 10:36:46 +00:00
dependabot[bot] 15af90db64
build(deps): bump ansible from 9.11.0 to 9.12.0 (#11705)
Bumps [ansible](https://github.com/ansible-community/ansible-build-data) from 9.11.0 to 9.12.0.
- [Changelog](https://github.com/ansible-community/ansible-build-data/blob/main/docs/release-process.md)
- [Commits](https://github.com/ansible-community/ansible-build-data/compare/9.11.0...9.12.0)

---
updated-dependencies:
- dependency-name: ansible
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-12 10:30:47 +00:00
Max Gautier 69201662df
Remove no_log in CI tests (#11702)
We always want to see the logs in the CI.
2024-11-11 03:54:44 +00:00
Max Gautier 06ae6cfe8a
Disable blank issue option in Github UI (#11701)
We're still getting bug reports circumventing the bug report template
and omitting informations.

Blank issue (aka, not using the form templates) can still be created
using the gh cli, the API, etc. This only disable the possibility in the
Web UI.
2024-11-11 03:44:46 +00:00
ChengHao Yang 76a5263ff3
Bump: pause container upgrade to 3.10 (#11695)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-08 16:46:45 +00:00
Kubernetes Prow Robot 91a77e417c
Merge pull request #11674 from tico88612/feat/kubeadm-v1beta4
Feat: kubeadm v1beta4 support
2024-11-08 13:34:44 +00:00
Lee Spottiswood aa76e39f79
adds nodelocaldns_additional_configs to facilitate additional CoreDNS config options (#11657) 2024-11-08 02:46:44 +00:00
Max Gautier bf6687b032
preinstall: fix checking that excluded host are cached (#11693)
- Lookup was not returning a list, making the difference filter spit out
  garbage -> query always return a list
- hostvars is a dictionnary, so convert to list before selectattr and
  map back to only get keys
2024-11-07 10:27:33 +00:00
anders-elastisys d23753e9f7
Add support to use exisitng fips with terraform openstack (#11558) 2024-11-07 03:13:29 +00:00
Timothée Oliger 4e58413140
Add a new crio_root variable in order to store CRI-O data on something else than /var/lib (#11692) 2024-11-07 02:01:29 +00:00
Lihai Tu b7c1d68ea3
Fix coredns version constraint (#11691) 2024-11-06 10:29:29 +00:00
ChengHao Yang bf01b73578
Feat: kubeadm images download support v1beta4
Currently there is not much difference between the files, if there are more changes in the future,
please use different files to distinguish them (you can use the kubeadm_config_api_version variable)

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 23:35:58 +08:00
ChengHao Yang 1ec6711e95
Feat: add kubeadm-controlplane.yaml support v1beta4
Currently there is not much difference between the files, if there are more changes in the future,
please use different files to distinguish them (you can use the kubeadm_config_api_version variable)

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 23:35:57 +08:00
ChengHao Yang 53e5d8b392
Feat: add kubeadm-client.conf support v1beta4
Remove kubeadm api version condition.
Currently there is not much difference between the files, if there are more changes in the future,
please use different files to distinguish them (you can use the kubeadm_config_api_version variable)

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 23:35:57 +08:00
ChengHao Yang 5929935a19
Refactor: use kubeadm_config_api_version variable
I added the kubeadm_config_api_version variable in the previous commit,
and remove kubeadm api version condition.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 23:35:57 +08:00
ChengHao Yang 9317e7ef25
Feat: add template kubeadm-config.yaml support v1beta4
v1beta4 has changed a lot in this file (e.g. ExtraArgs etc.), so it was implemented in separate files.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 23:35:57 +08:00
ChengHao Yang 9b7d2857d1
Feat: add kubeadm_config_api_version default variable
If kube_version is v1.31 or higher, it will be v1beta4, otherwise it
will be v1beta3.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 18:53:02 +08:00
Kubernetes Prow Robot a469c1c955
Merge pull request #11688 from VannTen/cleanup/preinstall_package_selection
Simplify package selection + fix openEuler package
2024-11-05 10:33:29 +00:00
Kubernetes Prow Robot 107c3cc6f4
Merge pull request #11633 from tico88612/feat/remove-in-tree-cloud-provider
Cleanup: remove in-tree cloud provider support
2024-11-05 09:13:30 +00:00
Kubernetes Prow Robot 25ca0acf73
Merge pull request #11667 from VannTen/ci-fix/kubelet_csr
Remove `shell` module usage from CI testcases
2024-11-05 08:41:29 +00:00
Max Gautier e1392c65b4
Fix openEuler packages
conntrack -> conntrack-tools
device-mapper-libs -> device-mapper
2024-11-05 09:36:40 +01:00
Max Gautier 8ff4ad2d8e
preinstall: simplify OS packages selection
Since a2019c1c2 (Add a JSON schema describing the packages install
structure, 2024-04-25), we use a custom structure to select which
packages should be installed on a particular host OS.

This has proven too rigid in practice, and the query is pretty
complicated.

Replace this by simply using an array of jinja conditions for the
packages, which should be easier to understand for everyone and more
flexible.

Also remove the associated schema and validation which are no longer
needed.
2024-11-05 09:35:50 +01:00
Max Gautier 0f0e24be0f
etcd: throttle restart for availability (#11677)
* etcd: throttle restart for availability

During upgrade, etcd member are restarted all at once.
This can impact the availability of the etcd cluster and subsequently of
the Kubernetes cluster.

Limit the concurrent restart so that the etcd cluster can keep quorum.

* Simplify etcd handlers
2024-11-05 06:11:29 +00:00
ChengHao Yang a070c72214
Refactor: simpify external_cloud_provider is defined
For this change, `external_cloud_provider` set default value to empty
string.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 08:32:39 +08:00
ChengHao Yang 38cd05c503
Refactor: simpify cloud_provider is defined condition
For this change, `cloud_provider` change the default value to empty
string.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 08:32:39 +08:00
ChengHao Yang c27cc33bd7
Refactor: var kube_override_hostname only reserve in kubespray-defaults
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 01:00:39 +08:00
ChengHao Yang 437026f514
Cleanup: remove all cloud_provider related tasks & files
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 00:51:00 +08:00
ChengHao Yang 0a2e68c9d3
Docs: edit cloud_provider description
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 00:51:00 +08:00
ChengHao Yang a2a11819b3
Docs: migrate to cloud_controllers
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 00:51:00 +08:00
ChengHao Yang 63ed2c70da
Docs: add removed message for cloud_provider
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-05 00:50:01 +08:00
Dmitry Chistyakov 31a206033f
Fix task name spelling (#11684) 2024-11-04 12:33:28 +00:00
ChengHao Yang 66d3cb7e6f
[cert-manager] upgrade to v1.15.3 (#11668)
* Feat: upgrade cert-manager version to v1.15.3

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

* Feat: upgrade cert-manager crd to v1.15.3

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

* Feat: update cert-manager v1.15.3 deployment files

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

* Docs: upgrade cert-manager to v1.15.3

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-04 10:39:29 +00:00
Max Gautier 5cb07e0aac
CI: remove shell usage for test playbooks
General cleanup + has the advantages of not requiring bash on the hosts.
2024-11-04 10:44:39 +01:00
Antoine Legrand e293a887da
Cache vagrant boxes (#11671) 2024-10-31 13:47:26 +00:00
ChengHao Yang 20df44521d
Feat: Add external OCI cloud controller manager (#11378)
* Feat: add external OCI cloud controller manager template & variable

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>

* Feat: add external OCI cloud controller manager workflow

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>

* Feat: migrate external OCI CCM config check from OCI cloud provider

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>

* cloud_controller: oracle: simpler asserts

Make the asserts check for Oracle Cloud Infrastructure external cloud
controller more compact, and hence readable.
Allows to put them back in the main tasks for less back and forth when
reading the code.

---------

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
Co-authored-by: Max Gautier <mg@max.gautier.name>
2024-10-31 12:53:26 +00:00
Kubernetes Prow Robot 3f027abae6
Merge pull request #11598 from VannTen/cleanup/fact_gathering
Do not serialize fact gathering for no_proxy
2024-10-31 10:59:26 +00:00