Compare commits

...

104 Commits

Author SHA1 Message Date
Ali Afsharzadeh
666a3a9500
Upgrade containerd and nerdctl from 2.1.6 to 2.2.1 (#12825) 2026-01-12 15:24:10 +05:30
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
Sivaram Singana
d41b629be3
updated elastx_ubuntu20 to ubuntu24 (#12844)
* Updated the job name to elastx_ubuntu24 and ci matrix and test file

Signed-off-by: sivaram <singana.sivaram.naidu@ibm.com>

* remove unused OVH CI tf file (tf-ovh_ubuntu20-calico.yml)

Signed-off-by: sivaram <singana.sivaram.naidu@ibm.com>

* remove ubuntu20 for pre-commit fix

Signed-off-by: sivaram <singana.sivaram.naidu@ibm.com>

---------

Signed-off-by: sivaram <singana.sivaram.naidu@ibm.com>
2026-01-10 23:35:56 +05:30
Ali Afsharzadeh
851abbc2e3
Disable discard_unpacked_layers for containerd >= 2.1 (#12821)
Only set `discard_unpacked_layers` in the CRI image config for containerd
versions earlier than 2.1.0.

Starting with containerd v2.1, the CRI plugin uses the Transfer Service for
image pulls by default. The `discard_unpacked_layers` option is incompatible
with the Transfer Service and triggers containerd to fall back to local
image pulls, logging a warning.

This change prevents unsupported configuration from being applied on newer
containerd versions, avoiding runtime warnings and ensuring default image
pull behavior.

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-01-08 19:39:40 +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
Max Gautier
d91c7d7576
Fix ansible-lint config error (#12842) 2026-01-06 20:15:11 +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
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
Goutham K
a0d7bef90e
Remove deprecated kubelet flag (#12639) 2026-01-05 18:56:42 +05:30
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
Kubernetes Prow Robot
c9ff62944e
Merge pull request #12355 from tico88612/feat/rocky-10-support
RockyLinux 10 support (experimental)
2026-01-05 14:32:37 +05:30
LawiK974
20ab9179af
Update kube-vip to v1.0.3 (#12815) 2026-01-04 22:52:37 +05:30
ChengHao Yang
5be35c811a
Docs: Rocky Linux 10 experimental description
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2026-01-03 15:40:01 +08:00
ChengHao Yang
ad522d4aab
Docs: add rockylinux-10-extra description
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2026-01-03 00:52:30 +08:00
ChengHao Yang
9c511069cc
CI: change rockylinux 10 image with kernel-module-extra
How to build RockyLinux 10 + `kernel-module-extra` with dib
https://github.com/kubernetes-sigs/kubespray/pull/12355#issuecomment-3705400093

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2026-01-02 23:10:41 +08:00
ChengHao Yang
ed270fcab4
Docs: update support system RHEL-based variants
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2026-01-02 23:10:41 +08:00
ChengHao Yang
0615929727
CI: add cilium test for rockylinux 10
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2026-01-02 23:10:41 +08:00
ChengHao Yang
48c25d9ebf
CI: add calico test for rockylinux 10
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2026-01-02 23:10:40 +08:00
LawiK974
0bffcacbe7
Add rbac for calico kube-controllers to access services (#12828) 2026-01-02 20:04:35 +05:30
R. P. Taylor
c857252225
terraform openstack: allow ICMPv6 by default (#12805) 2026-01-02 14:50:38 +05:30
Ali Afsharzadeh
a0f00761ac
Removed deprecated keys from containerd config (#12820)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2026-01-02 14:26:35 +05:30
r3m8
3a3e5d6954
fix(cilium): add dynamic api server endpoint configuration (#12624) 2026-01-01 17:26:34 +05:30
ChengHao Yang
2d6e508084
Fix: molecule 25.12.0 test (#12808)
* Bump molecule to 25.12.0

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

* Fixed ansible role not found in molecule after 25.2.0

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
Signed-off-by: ChengHao Yang
2025-12-31 15:12:34 +05:30
Ali Afsharzadeh
6d850a0dc5
Update pause image to 3.10.1 for Kubernetes 1.34 (#12827) 2025-12-31 13:48:35 +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
Qasim Mehmood
aaaf82f308
Fix cilium portmap (#12814) 2025-12-24 18:12: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
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 Gautier
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
Ali Afsharzadeh
1cbccf40a5
Upgrade cilium from 1.18.4 to 1.18.5 (#12796)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-12-19 07:24:32 -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
dependabot[bot]
1bbcfd8dd6
build(deps): bump peter-evans/create-pull-request from 7.0.11 to 8.0.0 (#12792)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.11 to 8.0.0.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](22a9089034...98357b18bf)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 07:12:12 -08:00
dependabot[bot]
8d948f918f
build(deps): bump actions/cache from 4 to 5 (#12791)
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 06:00:11 -08:00
dependabot[bot]
4d8d1b8aff
build(deps): bump octokit/graphql-action from 3.0.0 to 3.0.2 (#12790)
Bumps [octokit/graphql-action](https://github.com/octokit/graphql-action) from 3.0.0 to 3.0.2.
- [Release notes](https://github.com/octokit/graphql-action/releases)
- [Commits](abaeca7ba4...ddde8ebb24)

---
updated-dependencies:
- dependency-name: octokit/graphql-action
  dependency-version: 3.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 05:56:18 -08:00
r3m8
d80318301d
docs(cilium): update documentation for unprivileged agent configuration (#12628) 2025-12-13 19:39:44 -08:00
Ali Afsharzadeh
31cce09fbc
Check calico version in check mode (#12586)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-12-10 00:39:29 -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
dependabot[bot]
b9e1e8577f
build(deps): bump peter-evans/create-pull-request from 7.0.9 to 7.0.11 (#12774)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.9 to 7.0.11.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](84ae59a2cd...22a9089034)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: 7.0.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-08 04:29:33 -08:00
dependabot[bot]
5d1dd83b07
build(deps): bump stefanbuck/github-issue-parser from 3.2.1 to 3.2.2 (#12773)
Bumps [stefanbuck/github-issue-parser](https://github.com/stefanbuck/github-issue-parser) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/stefanbuck/github-issue-parser/releases)
- [Commits](2ea9b35a8c...25f1485edf)

---
updated-dependencies:
- dependency-name: stefanbuck/github-issue-parser
  dependency-version: 3.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 21:37:27 -08:00
dependabot[bot]
b203586d6b
build(deps): bump actions/checkout from 6.0.0 to 6.0.1 (#12772)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](1af3b93b68...8e8c483db8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 21:25:28 -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
AFz
2edf176294
docs: fixed rendering issue by using generic markdown format (#12652)
* docs: fix github markdown style

* docs: use generic markdown format for quotes
2025-12-07 12:38:57 -08:00
Ali Afsharzadeh
39744146b4
Remove legacy cilium_remove_old_resources task (#12771)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-12-07 07:36:55 -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
Ali Afsharzadeh
4c5eda9f1e
Remove legacy tasks that were scheduled for cleanup (#12765)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-12-04 23:50:58 -08:00
Max Gautier
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
Chris Ricker
2342d0cd57
Calico: populate kubernetes-services-endpoint for localhost LB (#12598)
When loadbalancer_apiserver_localhost is enabled, Calico falls back to the
Kubernetes service IP because the kubernetes-services-endpoint ConfigMap is
empty. CNI then fails to reach the API server even though an nginx proxy is
listening on localhost.

Update kube_apiserver_global_endpoint to always reference the localhost load
balancer (respecting the configured port) and populate the ConfigMap for both
eBPF and localhost LB modes.
2025-12-03 07:22:19 -08:00
Azhan Latif
e6a5266bad
feat: add noCompileLinks option to Docsify configuration (#12751) 2025-12-02 08:24:26 -08:00
dependabot[bot]
57f7c44718
build(deps): bump redhat-plumbers-in-action/advanced-issue-labeler (#12756)
Bumps [redhat-plumbers-in-action/advanced-issue-labeler](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/releases)
- [Commits](e38e6809c5...b80ae64e3e)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/advanced-issue-labeler
  dependency-version: 3.2.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-01 06:54:26 -08:00
Seena Fallah
5789dc839c
control-plane: fix first_kube_control_plane delegation with kube_override_hostname (#12636)
* control-plane: fix first_kube_control_plane delegation with kube_override_hostname

When kube_override_hostname is configured, the node names reported by
`kubectl get nodes` differ from the inventory_hostname known to Ansible.
This causes delegation failures in subsequent tasks since Ansible cannot
resolve the hostname from kubectl output to an inventory host.

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

* control-plane: remove fragile first_control_plane selection logic

Current implementation breaks with kube_override_hostname and has
multiple edge cases. Drop until proper kubectl-based node lookup
can be implemented.

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

---------

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2025-11-25 08:10:38 -08:00
Max Gautier
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
dependabot[bot]
9a9e8814e6
build(deps): bump peter-evans/create-pull-request from 7.0.8 to 7.0.9 (#12741)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.8 to 7.0.9.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](271a8d0340...84ae59a2cd)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: 7.0.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 02:58:38 -08:00
dependabot[bot]
87a4f61d76
build(deps): bump actions/checkout from 5.0.0 to 6.0.0 (#12740)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](08c6903cd8...1af3b93b68)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 02:46:36 -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
Ali Afsharzadeh
bce107ce3d
Upgrade cilium from 1.18.3 to 1.18.4 (#12717)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-11-18 19:51:59 -08:00
Kubernetes Prow Robot
7d7a42d931
Merge pull request #12723 from VannTen/molecule_var_in_inventory
Put molecule variables in molecule inventories
2025-11-18 19:47:58 -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
Ali Afsharzadeh
b3ee6d6b75
Adjust hubble export values for cilium 1.18 schema change (#12665)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-11-18 00:07:37 -08:00
ChengHao Yang
7436d63faa
Patch versions updates (#12678)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-17 05:01:39 -08: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
Kubernetes Prow Robot
1c008d79b1
Merge pull request #12714 from tico88612/feat/gateway-api-auto-bump
Feat: Gateway API auto bump
2025-11-16 06:27:37 -08:00
ChengHao Yang
b4bbec6772
Feat: Gateway API version always get latest
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-11-16 22:11:48 +08:00
ChengHao Yang
5c6ee4852a
Bump: Gateway API to 1.4.0 and set latest version
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-11-16 21:53:59 +08:00
ChengHao Yang
8190f952c1
Feat: add Gateway API component hash update
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-11-16 21:49:43 +08:00
ChengHao Yang
3edc3d7a36
Style: components.py argocd indent fix
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-11-16 21:48:32 +08:00
peterw
2f3f1d7e65
crio: add option pull_progress_timeout (#12555) 2025-11-15 19:53:37 -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
R. P. Taylor
dab0947150
change kubectl_node_schedulable var (#12661) 2025-11-15 07:01: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
Bas
65f33c3ef0
Install the clone as collection in SemaphoreUI if airgapped. (#12660)
Signed-off-by: Bas Meijer <bas.meijer@enexis.nl>
2025-11-14 06:45:40 -08:00
Anurag Ojha
5eccf9ea6c
fix(cilium):correct loadBalancer.mode rendering in values.yaml (#12701) 2025-11-14 06:39:38 -08:00
Max Gautier
db599b3475
Patch version updates (#12696) 2025-11-14 04:41:45 -08:00
Chris Ricker
47140083dc
Update Calico apiserver RBAC for Kubernetes 1.33+ (#12654)
Add missing RBAC permissions for Calico apiserver to function correctly
with Kubernetes 1.33+

Changes:

1. Add K8s 1.33 ValidatingAdmissionPolicy resources to calico-webhook-reader
   - validatingadmissionpolicies
   - validatingadmissionpolicybindings

Kubernetes 1.33 introduced ValidatingAdmissionPolicy resources (KEP-3488)
that require explicit RBAC permissions. Without these changes, Calico
apiserver on k8s 1.33+ will not work and needless errors are logged
2025-11-14 00:23:38 -08:00
ChengHao Yang
2d179879a0
Bump Sonobuoy to 0.57.3 (#12673)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-11-11 19:00:56 -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
dependabot[bot]
4059c699dc
build(deps): bump octokit/graphql-action from 2.3.2 to 3.0.0 (#12680)
Bumps [octokit/graphql-action](https://github.com/octokit/graphql-action) from 2.3.2 to 3.0.0.
- [Release notes](https://github.com/octokit/graphql-action/releases)
- [Commits](8ad880e4d4...abaeca7ba4)

---
updated-dependencies:
- dependency-name: octokit/graphql-action
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-10 00:50:56 -08:00
xin053
e22ce15429
Update cinder-csi image tag for offline install (#12627) 2025-11-08 21:38:52 -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
Kubernetes Prow Robot
d2a46b4ff8
Merge pull request #12671 from VannTen/prep/kubectl_apply_ssa
Make kubectl_apply_stdin available to other roles (+ SSA support)
2025-11-07 03:42:52 -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
Ali Afsharzadeh
f5a480fdc4
Upgrade cilium from 1.18.2 to 1.18.3 (#12649) 2025-11-06 21:42:52 -08:00
Albin Björk
5dce75d29b
upcloud: updated terraform provider version (#12642) 2025-10-24 00:53:34 -07: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
Meza
c6926eb2f9
fix(calico): Add missed rbac verb for hostendpoints (#12641)
Signed-off-by: Meza <meza-xyz@proton.me>
2025-10-23 09:29:34 -07:00
Meza
1930ab7ed6
[docs] Fix typos found in the docs (#12638)
Signed-off-by: Meza <meza-xyz@proton.me>
2025-10-22 20:22:38 -07:00
dependabot[bot]
3edc979384
build(deps): bump cryptography from 46.0.2 to 46.0.3 (#12635)
Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.2 to 46.0.3.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/46.0.2...46.0.3)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 46.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-19 23:52:12 -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
i-yasuda
0d88532f3d
[kubernetes] Support kubernetes 1.34 (#12549)
* [kubernetes] Support kubernetes 1.34.0

Update hashes for kubernetes 1.34.0 except for cri-o

* [kubernetes] Support kubernetes 1.34.1

Update hashes for kubernetes 1.34.1

* [cri-o] Update cri-o to 1.34.1

---------

Co-authored-by: Takuya Murakami <tmurakam@tmurakam.org>
2025-10-17 01:56:42 -07:00
Goutham K
1fb14b7463
docs: remove outdated mitogen documentation. (#12619) 2025-10-14 05:39:38 -07:00
ChengHao Yang
a66d00a535
Releng: bump galaxy version 2.30.0 (#12622)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-10-14 02:09:35 -07:00
117 changed files with 764 additions and 1005 deletions

View File

@ -1,5 +1,4 @@
---
parseable: true
skip_list:
# see https://docs.ansible.com/ansible-lint/rules/default_rules.html for a list of all default rules
@ -34,6 +33,8 @@ skip_list:
# Disable run-once check with free strategy
# (Disabled in June 2023 after ansible upgrade; FIXME)
- 'run-once[task]'
- 'jinja[spacing]'
exclude_paths:
# Generated files
- tests/files/custom_cni/cilium.yaml

View File

@ -13,16 +13,16 @@ jobs:
issues: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
- name: Parse issue form
uses: stefanbuck/github-issue-parser@2ea9b35a8c584529ed00891a8f7e41dc46d0441e
uses: stefanbuck/github-issue-parser@25f1485edffc1fee3ea68eb9f59a72e58720ffc4
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/bug-report.yaml
- name: Set labels based on OS field
uses: redhat-plumbers-in-action/advanced-issue-labeler@e38e6809c5420d038eed380d49ee9a6ca7c92dbf
uses: redhat-plumbers-in-action/advanced-issue-labeler@b80ae64e3e156e9c111b075bfa04b295d54e8e2e
with:
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
section: os

View File

@ -13,14 +13,14 @@ jobs:
outputs:
branches: ${{ steps.get-branches.outputs.data }}
steps:
- uses: octokit/graphql-action@8ad880e4d437783ea2ab17010324de1075228110
- uses: octokit/graphql-action@ddde8ebb2493e79f390e6449c725c21663a67505
id: get-branches
with:
query: |
query get_release_branches($owner:String!, $name:String!) {
repository(owner:$owner, name:$name) {
refs(refPrefix: "refs/heads/",
first: 1, # TODO increment once we have release branch with the new checksums format
first: 2, # TODO increment once we have release branch with the new checksums format
query: "release-",
orderBy: {
field: ALPHABETICAL,

View File

@ -11,7 +11,7 @@ jobs:
update-patch-versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
with:
ref: ${{ inputs.branch }}
- uses: actions/setup-python@v6
@ -22,14 +22,14 @@ jobs:
- run: update-hashes
env:
API_KEY: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v4
- uses: actions/cache@v5
with:
key: pre-commit-hook-propagate
path: |
~/.cache/pre-commit
- run: pre-commit run --all-files propagate-ansible-variables
continue-on-error: true
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
- uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
with:
commit-message: Patch versions updates
title: Patch versions updates - ${{ inputs.branch }}

View File

@ -24,7 +24,7 @@ variables:
ANSIBLE_REMOTE_USER: kubespray
ANSIBLE_PRIVATE_KEY_FILE: /tmp/id_rsa
ANSIBLE_INVENTORY: /tmp/inventory
ANSIBLE_STDOUT_CALLBACK: "debug"
ANSIBLE_STDOUT_CALLBACK: "default"
RESET_CHECK: "false"
REMOVE_NODE_CHECK: "false"
UPGRADE_TEST: "false"

View File

@ -4,7 +4,7 @@
interruptible: true
script:
- ansible-playbook tests/cloud_playbooks/create-kubevirt.yml
-c local -e @"tests/files/${TESTCASE}.yml"
-e @"tests/files/${TESTCASE}.yml"
- ./tests/scripts/testcases_run.sh
variables:
ANSIBLE_TIMEOUT: "120"
@ -43,6 +43,7 @@ pr:
- fedora39-kube-router
- openeuler24-calico
- rockylinux9-cilium
- rockylinux10-cilium
- ubuntu22-calico-all-in-one
- ubuntu22-calico-all-in-one-upgrade
- ubuntu24-calico-etcd-datastore
@ -127,6 +128,7 @@ pr_extended:
- debian12-docker
- debian13-calico
- rockylinux9-calico
- rockylinux10-calico
- ubuntu22-all-in-one-docker
- ubuntu24-all-in-one-docker
- ubuntu24-calico-all-in-one

View File

@ -89,11 +89,10 @@ tf-elastx_cleanup:
- ./scripts/openstack-cleanup/main.py
allow_failure: true
tf-elastx_ubuntu20-calico:
tf-elastx_ubuntu24-calico:
extends: .terraform_apply
stage: deploy-part1
when: on_success
allow_failure: true
variables:
<<: *elastx_variables
PROVIDER: openstack
@ -116,5 +115,5 @@ tf-elastx_ubuntu20-calico:
TF_VAR_az_list_node: '["sto1"]'
TF_VAR_flavor_k8s_master: 3f73fc93-ec61-4808-88df-2580d94c1a9b # v1-standard-2
TF_VAR_flavor_k8s_node: 3f73fc93-ec61-4808-88df-2580d94c1a9b # v1-standard-2
TF_VAR_image: ubuntu-20.04-server-latest
TF_VAR_image: ubuntu-24.04-server-latest
TF_VAR_k8s_allowed_remote_ips: '["0.0.0.0/0"]'

View File

@ -36,7 +36,7 @@ vagrant:
policy: pull-push # TODO: change to "pull" when not on main
stage: deploy-extended
rules:
- if: $PR_LABELS =~ /.*(ci-extended|ci-full).*/
- if: $PR_LABELS =~ /.*ci-full.*/
when: on_success
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PIPELINE_SCHEDULE_DESCRIPTION == "daily-ci"
when: on_success

View File

@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
@ -15,13 +15,13 @@ repos:
- id: trailing-whitespace
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
rev: v1.37.1
hooks:
- id: yamllint
args: [--strict]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
rev: v0.11.0.1
hooks:
- id: shellcheck
args: ["--severity=error"]
@ -29,7 +29,7 @@ repos:
files: "\\.sh$"
- repo: https://github.com/ansible/ansible-lint
rev: v25.1.1
rev: v25.11.0
hooks:
- id: ansible-lint
additional_dependencies:
@ -38,7 +38,7 @@ repos:
- distlib
- repo: https://github.com/golangci/misspell
rev: v0.6.0
rev: v0.7.0
hooks:
- id: misspell
exclude: "OWNERS_ALIASES$"

View File

@ -35,8 +35,8 @@ RUN --mount=type=bind,source=requirements.txt,target=requirements.txt \
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN OS_ARCHITECTURE=$(dpkg --print-architecture) \
&& curl -L "https://dl.k8s.io/release/v1.33.5/bin/linux/${OS_ARCHITECTURE}/kubectl" -o /usr/local/bin/kubectl \
&& echo "$(curl -L "https://dl.k8s.io/release/v1.33.5/bin/linux/${OS_ARCHITECTURE}/kubectl.sha256")" /usr/local/bin/kubectl | sha256sum --check \
&& curl -L "https://dl.k8s.io/release/v1.34.3/bin/linux/${OS_ARCHITECTURE}/kubectl" -o /usr/local/bin/kubectl \
&& echo "$(curl -L "https://dl.k8s.io/release/v1.34.3/bin/linux/${OS_ARCHITECTURE}/kubectl.sha256")" /usr/local/bin/kubectl | sha256sum --check \
&& chmod a+x /usr/local/bin/kubectl
COPY *.yml ./

View File

@ -89,13 +89,13 @@ vagrant up
- **Flatcar Container Linux by Kinvolk**
- **Debian** Bookworm, Bullseye, Trixie
- **Ubuntu** 22.04, 24.04
- **CentOS/RHEL** [8, 9](docs/operating_systems/rhel.md#rhel-8)
- **CentOS Stream / RHEL** [9, 10](docs/operating_systems/rhel.md#rhel-8)
- **Fedora** 39, 40
- **Fedora CoreOS** (see [fcos Note](docs/operating_systems/fcos.md))
- **openSUSE** Leap 15.x/Tumbleweed
- **Oracle Linux** [8, 9](docs/operating_systems/rhel.md#rhel-8)
- **Alma Linux** [8, 9](docs/operating_systems/rhel.md#rhel-8)
- **Rocky Linux** [8, 9](docs/operating_systems/rhel.md#rhel-8)
- **Oracle Linux** [9, 10](docs/operating_systems/rhel.md#rhel-8)
- **Alma Linux** [9, 10](docs/operating_systems/rhel.md#rhel-8)
- **Rocky Linux** [9, 10](docs/operating_systems/rhel.md#rhel-8) (experimental in 10: see [Rocky Linux 10 notes](docs/operating_systems/rhel.md#rocky-linux-10))
- **Kylin Linux Advanced Server V10** (experimental: see [kylin linux notes](docs/operating_systems/kylinlinux.md))
- **Amazon Linux 2** (experimental: see [amazon linux notes](docs/operating_systems/amazonlinux.md))
- **UOS Linux** (experimental: see [uos linux notes](docs/operating_systems/uoslinux.md))
@ -111,23 +111,23 @@ Note:
<!-- BEGIN ANSIBLE MANAGED BLOCK -->
- Core
- [kubernetes](https://github.com/kubernetes/kubernetes) 1.33.5
- [etcd](https://github.com/etcd-io/etcd) 3.5.23
- [kubernetes](https://github.com/kubernetes/kubernetes) 1.34.3
- [etcd](https://github.com/etcd-io/etcd) 3.5.26
- [docker](https://www.docker.com/) 28.3
- [containerd](https://containerd.io/) 2.1.4
- [cri-o](http://cri-o.io/) 1.33.5 (experimental: see [CRI-O Note](docs/CRI/cri-o.md). Only on fedora, ubuntu and centos based OS)
- [containerd](https://containerd.io/) 2.2.1
- [cri-o](http://cri-o.io/) 1.34.3 (experimental: see [CRI-O Note](docs/CRI/cri-o.md). Only on fedora, ubuntu and centos based OS)
- Network Plugin
- [cni-plugins](https://github.com/containernetworking/plugins) 1.8.0
- [calico](https://github.com/projectcalico/calico) 3.30.3
- [cilium](https://github.com/cilium/cilium) 1.18.2
- [calico](https://github.com/projectcalico/calico) 3.30.5
- [cilium](https://github.com/cilium/cilium) 1.18.5
- [flannel](https://github.com/flannel-io/flannel) 0.27.3
- [kube-ovn](https://github.com/alauda/kube-ovn) 1.12.21
- [kube-router](https://github.com/cloudnativelabs/kube-router) 2.1.1
- [multus](https://github.com/k8snetworkplumbingwg/multus-cni) 4.2.2
- [kube-vip](https://github.com/kube-vip/kube-vip) 0.8.0
- [kube-vip](https://github.com/kube-vip/kube-vip) 1.0.3
- Application
- [cert-manager](https://github.com/jetstack/cert-manager) 1.15.3
- [coredns](https://github.com/coredns/coredns) 1.12.0
- [coredns](https://github.com/coredns/coredns) 1.12.1
- [ingress-nginx](https://github.com/kubernetes/ingress-nginx) 1.13.3
- [argocd](https://argoproj.github.io/) 2.14.5
- [helm](https://helm.sh/) 3.18.4

9
contrib/collection.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash -eux
# Install collection from source assuming dependencies are present.
# Run in SemaphoreUI this bash script can install Kubespray from the repo
NAMESPACE=kubernetes_sigs
COLLECTION=kubespray
MY_VER=$(grep '^version:' galaxy.yml|cut -d: -f2|sed 's/ //')
ansible-galaxy collection build --force --output-path .
ansible-galaxy collection install --offline --force $NAMESPACE-$COLLECTION-$MY_VER.tar.gz

View File

@ -20,7 +20,6 @@ function create_container_image_tar() {
kubectl describe cronjobs,jobs,pods --all-namespaces | grep " Image:" | awk '{print $2}' | sort | uniq > "${IMAGES}"
# NOTE: etcd and pause cannot be seen as pods.
# The pause image is used for --pod-infra-container-image option of kubelet.
kubectl cluster-info dump | grep -E "quay.io/coreos/etcd:|registry.k8s.io/pause:" | sed s@\"@@g >> "${IMAGES}"
else
echo "Getting images from file \"${IMAGES_FROM_FILE}\""

View File

@ -281,9 +281,9 @@ For your cluster, edit `inventory/$CLUSTER/cluster.tfvars`.
|`k8s_allowed_remote_ips_ipv6` | List of IPv6 CIDR allowed to initiate a SSH connection, empty by default |
|`k8s_allowed_egress_ipv6_ips` | List of IPv6 CIDRs allowed for egress traffic, `["::/0"]` by default |
|`worker_allowed_ports` | List of ports to open on worker nodes, `[{ "protocol" = "tcp", "port_range_min" = 30000, "port_range_max" = 32767, "remote_ip_prefix" = "0.0.0.0/0"}]` by default |
|`worker_allowed_ports_ipv6` | List of ports to open on worker nodes for IPv6 CIDR blocks, `[{ "protocol" = "tcp", "port_range_min" = 30000, "port_range_max" = 32767, "remote_ip_prefix" = "::/0"}]` by default |
|`worker_allowed_ports_ipv6` | List of ports to open on worker nodes for IPv6 CIDR blocks, `[{ "protocol" = "tcp", "port_range_min" = 30000, "port_range_max" = 32767, "remote_ip_prefix" = "::/0"}, { "protocol" = "ipv6-icmp", "port_range_min" = 0, "port_range_max" = 0, "remote_ip_prefix" = "::/0"}]` by default |
|`master_allowed_ports` | List of ports to open on master nodes, expected format is `[{ "protocol" = "tcp", "port_range_min" = 443, "port_range_max" = 443, "remote_ip_prefix" = "0.0.0.0/0"}]`, empty by default |
|`master_allowed_ports_ipv6` | List of ports to open on master nodes for IPv6 CIDR blocks, expected format is `[{ "protocol" = "tcp", "port_range_min" = 443, "port_range_max" = 443, "remote_ip_prefix" = "::/0"}]`, empty by default |
|`master_allowed_ports_ipv6` | List of ports to open on master nodes for IPv6 CIDR blocks, `[{ "protocol" = "ipv6-icmp", "port_range_min" = 0, "port_range_max" = 0, "remote_ip_prefix" = "::/0"}]` by default |
|`node_root_volume_size_in_gb` | Size of the root volume for nodes, 0 to use ephemeral storage |
|`master_root_volume_size_in_gb` | Size of the root volume for masters, 0 to use ephemeral storage |
|`master_volume_type` | Volume type of the root volume for control_plane, 'Default' by default |

View File

@ -271,7 +271,14 @@ variable "master_allowed_ports" {
variable "master_allowed_ports_ipv6" {
type = list(any)
default = []
default = [
{
"protocol" = "ipv6-icmp"
"port_range_min" = 0
"port_range_max" = 0
"remote_ip_prefix" = "::/0"
},
]
}
variable "worker_allowed_ports" {
@ -297,6 +304,12 @@ variable "worker_allowed_ports_ipv6" {
"port_range_max" = 32767
"remote_ip_prefix" = "::/0"
},
{
"protocol" = "ipv6-icmp"
"port_range_min" = 0
"port_range_max" = 0
"remote_ip_prefix" = "::/0"
},
]
}

View File

@ -3,7 +3,7 @@ terraform {
required_providers {
upcloud = {
source = "UpCloudLtd/upcloud"
version = "~>5.9.0"
version = "~>5.29.1"
}
}
required_version = ">= 0.13"

View File

@ -3,7 +3,7 @@ terraform {
required_providers {
upcloud = {
source = "UpCloudLtd/upcloud"
version = "~>5.9.0"
version = "~>5.29.1"
}
}
required_version = ">= 0.13"

View File

@ -1,5 +1,13 @@
# Cilium
## Unprivileged agent configuration
By default, Cilium is installed with `securityContext.privileged: false`. You need to set the `kube_owner` variable to `root` in the inventory:
```yml
kube_owner: root
```
## IP Address Management (IPAM)
IP Address Management (IPAM) is responsible for the allocation and management of IP addresses used by network endpoints (container and others) managed by Cilium. The default mode is "Cluster Scope".
@ -237,7 +245,7 @@ cilium_operator_extra_volume_mounts:
## Choose Cilium version
```yml
cilium_version: "1.18.2"
cilium_version: "1.18.5"
```
## Add variable to config

View File

@ -32,7 +32,7 @@ add `kube_proxy_masquerade_all: true` in `group_vars/all/all.yml`
* Disable nodelocaldns
The nodelocal dns IP is not reacheable.
The nodelocal dns IP is not reachable.
Disable it in `sample/group_vars/k8s_cluster/k8s_cluster.yml`

View File

@ -65,9 +65,8 @@ In kubespray, the default runtime name is "runc", and it can be configured with
containerd_runc_runtime:
name: runc
type: "io.containerd.runc.v2"
engine: ""
root: ""
options:
Root: ""
SystemdCgroup: "false"
BinaryName: /usr/local/bin/my-runc
base_runtime_spec: cri-base.json

View File

@ -80,7 +80,7 @@ The `crio_remap_enable` configures the `/etc/subuid` and `/etc/subgid` files to
By default, 16M uids and gids are reserved for user namespaces (256 pods * 65536 uids/gids) at the end of the uid/gid space.
The `crio_default_capabilities` configure the default containers capabilities for the crio.
Defaults capabilties are:
Defaults capabilities are:
```yaml
crio_default_capabilities:

1
docs/_sidebar.md generated
View File

@ -6,7 +6,6 @@
* [Downloads](/docs/advanced/downloads.md)
* [Gcp-lb](/docs/advanced/gcp-lb.md)
* [Kubernetes-reliability](/docs/advanced/kubernetes-reliability.md)
* [Mitogen](/docs/advanced/mitogen.md)
* [Netcheck](/docs/advanced/netcheck.md)
* [Ntp](/docs/advanced/ntp.md)
* [Proxy](/docs/advanced/proxy.md)

View File

@ -6,7 +6,7 @@
- [Create New TLS Root CA Certificate and Key](#create-new-tls-root-ca-certificate-and-key)
- [Install Cloudflare PKI/TLS `cfssl` Toolkit.](#install-cloudflare-pkitls-cfssl-toolkit)
- [Create Root Certificate Authority (CA) Configuration File](#create-root-certificate-authority-ca-configuration-file)
- [Create Certficate Signing Request (CSR) Configuration File](#create-certficate-signing-request-csr-configuration-file)
- [Create Certificate Signing Request (CSR) Configuration File](#create-certificate-signing-request-csr-configuration-file)
- [Create TLS Root CA Certificate and Key](#create-tls-root-ca-certificate-and-key)
Cert-Manager is a native Kubernetes certificate management controller. It can help with issuing certificates from a variety of sources, such as Lets Encrypt, HashiCorp Vault, Venafi, a simple signing key pair, or self signed. It will ensure certificates are valid and up to date, and attempt to renew certificates at a configured time before expiry.
@ -134,7 +134,7 @@ $ cat > ca-config.json <<EOF
EOF
```
#### Create Certficate Signing Request (CSR) Configuration File
#### Create Certificate Signing Request (CSR) Configuration File
The TLS certificate `names` details can be updated to your own specific requirements.

View File

@ -1,4 +1,4 @@
# GCP Load Balancers for type=LoadBalacer of Kubernetes Services
# GCP Load Balancers for type=LoadBalancer of Kubernetes Services
> **Removed**: Since v1.31 (the Kubespray counterpart is v2.27), Kubernetes no longer supports `cloud_provider`. (except external cloud provider)

View File

@ -1,30 +0,0 @@
# Mitogen
*Warning:* Mitogen support is now deprecated in kubespray due to upstream not releasing an updated version to support ansible 4.x (ansible-base 2.11.x) and above. The CI support has been stripped for mitogen and we are no longer validating any support or regressions for it. The supporting mitogen install playbook and integration documentation will be removed in a later version.
[Mitogen for Ansible](https://mitogen.networkgenomics.com/ansible_detailed.html) allow a 1.25x - 7x speedup and a CPU usage reduction of at least 2x, depending on network conditions, modules executed, and time already spent by targets on useful work. Mitogen cannot improve a module once it is executing, it can only ensure the module executes as quickly as possible.
## Install
```ShellSession
ansible-playbook contrib/mitogen/mitogen.yml
```
The above playbook sets the ansible `strategy` and `strategy_plugins` in `ansible.cfg` but you can also enable them if you use your own `ansible.cfg` by setting the environment varialbles:
```ShellSession
export ANSIBLE_STRATEGY=mitogen_linear
export ANSIBLE_STRATEGY_PLUGINS=plugins/mitogen/ansible_mitogen/plugins/strategy
```
... or `ansible.cfg` setup:
```ini
[defaults]
strategy_plugins = plugins/mitogen/ansible_mitogen/plugins/strategy
strategy=mitogen_linear
```
## Limitation
If you are experiencing problems, please see the [documentation](https://mitogen.networkgenomics.com/ansible_detailed.html#noteworthy-differences).

View File

@ -42,13 +42,10 @@ Kubespray expects users to use one of the following variables sources for settin
|----------------------------------------|------------------------------------------------------------------------------|
| inventory vars | |
| - **inventory group_vars** | most used |
| - inventory host_vars | host specifc vars overrides, group_vars is usually more practical |
| - inventory host_vars | host specific vars overrides, group_vars is usually more practical |
| **extra vars** (always win precedence) | override with ``ansible-playbook -e @foo.yml`` |
[!IMPORTANT]
Extra vars are best used to override kubespray internal variables, for instances, roles/vars/.
Those vars are usually **not expected** (by Kubespray developers) to be modified by end users, and not part of Kubespray
interface. Thus they can change, disappear, or break stuff unexpectedly.
> Extra vars are best used to override kubespray internal variables, for instances, roles/vars/. Those vars are usually **not expected** (by Kubespray developers) to be modified by end users, and not part of Kubespray interface. Thus they can change, disappear, or break stuff unexpectedly.
## Ansible tags
@ -122,7 +119,7 @@ The following tags are defined in playbooks:
| metrics_server | Configuring metrics_server |
| netchecker | Installing netchecker K8s app |
| network | Configuring networking plugins for K8s |
| mounts | Umount kubelet dirs when reseting |
| mounts | Umount kubelet dirs when resetting |
| multus | Network plugin multus |
| nginx | Configuring LB for kube-apiserver instances |
| node | Configuring K8s minion (compute) node role |
@ -181,17 +178,13 @@ ansible-playbook -i inventory/sample/hosts.ini cluster.yml \
Note: use `--tags` and `--skip-tags` wisely and only if you're 100% sure what you're doing.
## Mitogen
Mitogen support is deprecated, please see [mitogen related docs](/docs/advanced/mitogen.md) for usage and reasons for deprecation.
## Troubleshooting Ansible issues
Having the wrong version of ansible, ansible collections or python dependencies can cause issue.
In particular, Kubespray ship custom modules which Ansible needs to find, for which you should specify [ANSIBLE_LIBRAY](https://docs.ansible.com/ansible/latest/dev_guide/developing_locally.html#adding-a-module-or-plugin-outside-of-a-collection)
In particular, Kubespray ship custom modules which Ansible needs to find, for which you should specify [ANSIBLE_LIBRARY](https://docs.ansible.com/ansible/latest/dev_guide/developing_locally.html#adding-a-module-or-plugin-outside-of-a-collection)
```ShellSession
export ANSIBLE_LIBRAY=<kubespray_dir>/library`
export ANSIBLE_LIBRARY=<kubespray_dir>/library`
```
A simple way to ensure you get all the correct version of Ansible is to use

View File

@ -6,7 +6,7 @@ See [.gitlab-ci.yml](/.gitlab-ci.yml) and the included files for an overview.
## Runners
Kubespray has 2 types of GitLab runners, both deployed on the Kubespray CI cluster (hosted on Oracle Cloud Infrastucture):
Kubespray has 2 types of GitLab runners, both deployed on the Kubespray CI cluster (hosted on Oracle Cloud Infrastructure):
- pods: use the [gitlab-ci kubernetes executor](https://docs.gitlab.com/runner/executors/kubernetes/)
- vagrant: custom executor running in pods with access to the libvirt socket on the nodes
@ -156,7 +156,7 @@ kube_feature_gates:
- "NodeSwap=True"
```
## Aditional files
## Additional files
This section documents additional files used to complete a deployment of the kubespray CI, these files sit on the control-plane node and assume a working kubernetes cluster.

View File

@ -15,8 +15,8 @@ fedora39 | :white_check_mark: | :x: | :x: | :x: | :x: | :white_check_mark: | :x
fedora40 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
flatcar4081 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
openeuler24 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
rockylinux10 | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
rockylinux9 | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
ubuntu20 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu22 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu24 | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :x: | :white_check_mark: | :x: |
@ -33,8 +33,8 @@ fedora39 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
fedora40 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
flatcar4081 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
openeuler24 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
rockylinux10 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
rockylinux9 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu20 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu22 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu24 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
@ -51,7 +51,7 @@ fedora39 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
fedora40 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
flatcar4081 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
openeuler24 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
rockylinux10 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
rockylinux9 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu20 | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu22 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu24 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |

View File

@ -35,7 +35,7 @@ metallb_config:
effect: "NoSchedule"
```
If you'd like to set additional nodeSelector and tolerations values, you can do so in the following fasion:
If you'd like to set additional nodeSelector and tolerations values, you can do so in the following fashion:
```yaml
metallb_config:

View File

@ -37,4 +37,12 @@ If you have containers that are using iptables in the host network namespace (`h
you need to ensure they are using iptables-nft.
An example how k8s do the autodetection can be found [in this PR](https://github.com/kubernetes/kubernetes/pull/82966)
The kernel version is lower than the kubenretes 1.32 system validation, please refer to the [kernel requirements](../operations/kernel-requirements.md).
The kernel version is lower than the kubernetes 1.32 system validation, please refer to the [kernel requirements](../operations/kernel-requirements.md).
## Rocky Linux 10
(Experimental in Kubespray CI)
The official Rocky Linux 10 cloud image does not include `kernel-module-extra`. Both Kube Proxy and CNI rely on this package, and since it relates to kernel version compatibility (which may require VM reboots, etc.), we haven't found an ideal solution.
However, some users report that it doesn't affect them (minimal version). Therefore, the Kubespray CI Rocky Linux 10 image is built by Kubespray maintainers using `diskimage-builder`. For detailed methods, please refer to [the comments](https://github.com/kubernetes-sigs/kubespray/pull/12355#issuecomment-3705400093).

View File

@ -11,7 +11,7 @@ kubeadm_ignore_preflight_errors:
The Kernel Version Matrixs:
| OS Verion | Kernel Verion | Kernel >=4.19 |
| OS Version | Kernel Version | Kernel >=4.19 |
|--- | --- | --- |
| RHEL 9 | 5.14 | :white_check_mark: |
| RHEL 8 | 4.18 | :x: |

View File

@ -31,6 +31,8 @@ That's it.
Append the new host to the inventory and run `cluster.yml`. You can NOT use `scale.yml` for that.
**Note:** When adding new control plane nodes, always append them to the end of the `kube_control_plane` group in your inventory. Adding control plane nodes in the first position is not supported and will cause the playbook to fail.
### 2) Restart kube-system/nginx-proxy
In all hosts, restart nginx-proxy pod. This pod is a local proxy for the apiserver. Kubespray will update its static config, but it needs to be restarted in order to reload.

View File

@ -2,7 +2,7 @@
namespace: kubernetes_sigs
description: Deploy a production ready Kubernetes cluster
name: kubespray
version: 2.29.0
version: 2.30.0
readme: README.md
authors:
- The Kubespray maintainers (https://kubernetes.slack.com/channels/kubespray)

View File

@ -38,6 +38,7 @@
loadSidebar: 'docs/_sidebar.md',
repo: 'https://github.com/kubernetes-sigs/kubespray',
auto2top: true,
noCompileLinks: ['.*\.ini'],
logo: '/logo/logo-clear.png'
}
</script>

View File

@ -11,15 +11,15 @@
# containerd_runc_runtime:
# name: runc
# type: "io.containerd.runc.v2"
# engine: ""
# root: ""
# options:
# Root: ""
# containerd_additional_runtimes:
# Example for Kata Containers as additional runtime:
# - name: kata
# type: "io.containerd.kata.v2"
# engine: ""
# root: ""
# options:
# Root: ""
# containerd_grpc_max_recv_message_size: 16777216
# containerd_grpc_max_send_message_size: 16777216

View File

@ -22,7 +22,8 @@ local_release_dir: "/tmp/releases"
# Random shifts for retrying failed ops like pushing/downloading
retry_stagger: 5
# This is the user that owns tha cluster installation.
# This is the user that owns the cluster installation.
# Note: cilium needs to set kube_owner to root https://kubespray.io/#/docs/CNI/cilium?id=unprivileged-agent-configuration
kube_owner: kube
# This is the group that the cert creation scripts chgrp the

View File

@ -47,8 +47,8 @@ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1 \
&& pip install --no-compile --no-cache-dir pip -U \
&& pip install --no-compile --no-cache-dir -r tests/requirements.txt \
&& pip install --no-compile --no-cache-dir -r requirements.txt \
&& curl -L https://dl.k8s.io/release/v1.33.5/bin/linux/$(dpkg --print-architecture)/kubectl -o /usr/local/bin/kubectl \
&& echo $(curl -L https://dl.k8s.io/release/v1.33.5/bin/linux/$(dpkg --print-architecture)/kubectl.sha256) /usr/local/bin/kubectl | sha256sum --check \
&& curl -L https://dl.k8s.io/release/v1.34.3/bin/linux/$(dpkg --print-architecture)/kubectl -o /usr/local/bin/kubectl \
&& echo $(curl -L https://dl.k8s.io/release/v1.34.3/bin/linux/$(dpkg --print-architecture)/kubectl.sha256) /usr/local/bin/kubectl | sha256sum --check \
&& chmod a+x /usr/local/bin/kubectl \
# Install Vagrant
&& curl -LO https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}-1_$(dpkg --print-architecture).deb \

View File

@ -55,7 +55,7 @@
- { role: kubernetes-apps/kubelet-csr-approver, tags: kubelet-csr-approver }
- { role: container-engine, tags: "container-engine", when: deploy_container_engine }
- { role: kubernetes/node, tags: node }
- { role: kubernetes/control-plane, tags: master, upgrade_cluster_setup: true }
- { role: kubernetes/control-plane, tags: control-plane, upgrade_cluster_setup: true }
- { role: kubernetes/client, tags: client }
- { role: kubernetes/node-label, tags: node-label }
- { role: kubernetes/node-taint, tags: node-taint }
@ -100,7 +100,7 @@
environment: "{{ proxy_disable_env }}"
roles:
- { role: kubespray_defaults }
- { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] }
- { role: win_nodes/kubernetes_patch, tags: ["control-plane", "win_nodes"] }
- name: Install Calico Route Reflector
hosts: calico_rr

3
remove_node.yml Normal file
View File

@ -0,0 +1,3 @@
---
- name: Remove node
ansible.builtin.import_playbook: playbooks/remove_node.yml

View File

@ -1,6 +1,6 @@
ansible==10.7.0
# Needed for community.crypto module
cryptography==46.0.2
cryptography==46.0.3
# Needed for jinja2 json_query templating
jmespath==1.0.1
# Needed for ansible.utils.ipaddr

View File

@ -9,6 +9,8 @@ platforms:
vm_memory: 512
provisioner:
name: ansible
env:
ANSIBLE_ROLES_PATH: ../../../
config_options:
defaults:
callbacks_enabled: profile_tasks

View File

@ -9,6 +9,8 @@ platforms:
vm_memory: 512
provisioner:
name: ansible
env:
ANSIBLE_ROLES_PATH: ../../../
config_options:
defaults:
callbacks_enabled: profile_tasks

View File

@ -37,8 +37,3 @@ override_system_hostname: true
is_fedora_coreos: false
skip_http_proxy_on_os_packages: false
# If this is true, debug information will be displayed but
# may contain some private data, so it is recommended to set it to false
# in the production environment.
unsafe_show_logs: false

View File

@ -21,6 +21,8 @@ platforms:
vm_memory: 512
provisioner:
name: ansible
env:
ANSIBLE_ROLES_PATH: ../../../
config_options:
defaults:
callbacks_enabled: profile_tasks

View File

@ -13,10 +13,9 @@ containerd_snapshotter: "overlayfs"
containerd_runc_runtime:
name: runc
type: "io.containerd.runc.v2"
engine: ""
root: ""
base_runtime_spec: cri-base.json
options:
Root: ""
SystemdCgroup: "{{ containerd_use_systemd_cgroup | ternary('true', 'false') }}"
BinaryName: "{{ bin_dir }}/runc"
@ -24,8 +23,8 @@ containerd_additional_runtimes: []
# Example for Kata Containers as additional runtime:
# - name: kata
# type: "io.containerd.kata.v2"
# engine: ""
# root: ""
# options:
# Root: ""
containerd_base_runtime_spec_rlimit_nofile: 65535
@ -36,8 +35,8 @@ containerd_default_base_runtime_spec_patch:
hard: "{{ containerd_base_runtime_spec_rlimit_nofile }}"
soft: "{{ containerd_base_runtime_spec_rlimit_nofile }}"
# Can help reduce disk usage
# https://github.com/containerd/containerd/discussions/6295
# Only for containerd < 2.1; discard unpacked layers to save disk space
# https://github.com/containerd/containerd/blob/release/2.1/docs/cri/config.md#image-pull-configuration-since-containerd-v21
containerd_discard_unpacked_layers: true
containerd_base_runtime_specs:

View File

@ -34,8 +34,6 @@
with_items:
- "{{ containerd_systemd_dir }}"
- "{{ containerd_cfg_dir }}"
- "{{ containerd_storage_dir }}"
- "{{ containerd_state_dir }}"
- name: Containerd | Write containerd proxy drop-in
template:

View File

@ -52,8 +52,6 @@ oom_score = {{ containerd_oom_score }}
{% for runtime in [containerd_runc_runtime] + containerd_additional_runtimes %}
[plugins."io.containerd.cri.v1.runtime".containerd.runtimes.{{ runtime.name }}]
runtime_type = "{{ runtime.type }}"
runtime_engine = "{{ runtime.engine }}"
runtime_root = "{{ runtime.root }}"
{% if runtime.base_runtime_spec is defined %}
base_runtime_spec = "{{ containerd_cfg_dir }}/{{ runtime.base_runtime_spec }}"
{% endif %}
@ -78,7 +76,9 @@ oom_score = {{ containerd_oom_score }}
[plugins."io.containerd.cri.v1.images"]
snapshotter = "{{ containerd_snapshotter }}"
{% if containerd_discard_unpacked_layers and containerd_version is version('2.1.0', '<') %}
discard_unpacked_layers = {{ containerd_discard_unpacked_layers | lower }}
{% endif %}
image_pull_progress_timeout = "{{ containerd_image_pull_progress_timeout }}"
[plugins."io.containerd.cri.v1.images".pinned_images]
sandbox = "{{ pod_infra_image_repo }}:{{ pod_infra_image_tag }}"

View File

@ -25,6 +25,8 @@ provisioner:
group_vars:
all:
become: true
k8s_cluster:
container_manager: docker
playbooks:
create: ../../../../../tests/cloud_playbooks/create-kubevirt.yml
prepare: ../../../molecule/prepare.yml

View File

@ -32,6 +32,8 @@ crio_registry_auth: []
crio_seccomp_profile: ""
crio_selinux: "{{ (preinstall_selinux_state == 'enforcing') | lower }}"
crio_signature_policy: "{% if ansible_os_family == 'ClearLinux' %}/usr/share/defaults/crio/policy.json{% endif %}"
# Set the pull progress timeout
crio_pull_progress_timeout: "10s"
# Override system default for storage driver
# crio_storage_driver: "overlay"

View File

@ -2,8 +2,6 @@
- name: Converge
hosts: all
become: true
vars:
container_manager: crio
roles:
- role: kubespray_defaults
- role: container-engine/cri-o

View File

@ -41,6 +41,10 @@ provisioner:
defaults:
callbacks_enabled: profile_tasks
timeout: 120
inventory:
group_vars:
k8s_cluster:
container_manager: crio
playbooks:
create: ../../../../../tests/cloud_playbooks/create-kubevirt.yml
prepare: ../../../molecule/prepare.yml

View File

@ -2,7 +2,6 @@
- name: Test CRI-O cri
import_playbook: ../../../molecule/test_cri.yml
vars:
container_manager: crio
cri_socket: unix:///var/run/crio/crio.sock
cri_name: cri-o
- name: Test running a container with crun

View File

@ -348,6 +348,12 @@ signature_policy = "{{ crio_signature_policy }}"
# ignore; the latter will ignore volumes entirely.
image_volumes = "mkdir"
# The timeout for an image pull to make progress until the pull operation gets
# canceled. This value will be also used for calculating the pull progress interval
# to pull_progress_timeout / 10. Can be set to 0 to disable the timeout as well as
# the progress output.
pull_progress_timeout = "{{ crio_pull_progress_timeout }}"
# The crio.network table containers settings pertaining to the management of
# CNI plugins.
[crio.network]

View File

@ -1,22 +0,0 @@
---
- name: Crictl | Download crictl
include_tasks: "../../../download/tasks/download_file.yml"
vars:
download: "{{ download_defaults | combine(downloads.crictl) }}"
- name: Install crictl config
template:
src: crictl.yaml.j2
dest: /etc/crictl.yaml
owner: root
mode: "0644"
- name: Copy crictl binary from download dir
copy:
src: "{{ local_release_dir }}/crictl"
dest: "{{ bin_dir }}/crictl"
mode: "0755"
remote_src: true
notify:
- Get crictl completion
- Install crictl completion

View File

@ -1,3 +1,22 @@
---
- name: Install crictl
include_tasks: crictl.yml
- name: Crictl | Download crictl
include_tasks: "../../../download/tasks/download_file.yml"
vars:
download: "{{ download_defaults | combine(downloads.crictl) }}"
- name: Install crictl config
template:
src: crictl.yaml.j2
dest: /etc/crictl.yaml
owner: root
mode: "0644"
- name: Copy crictl binary from download dir
copy:
src: "{{ local_release_dir }}/crictl"
dest: "{{ bin_dir }}/crictl"
mode: "0755"
remote_src: true
notify:
- Get crictl completion
- Install crictl completion

View File

@ -21,6 +21,11 @@ provisioner:
defaults:
callbacks_enabled: profile_tasks
timeout: 120
inventory:
group_vars:
k8s_cluster:
gvisor_enabled: true
container_manager: containerd
playbooks:
create: ../../../../../tests/cloud_playbooks/create-kubevirt.yml
prepare: ../../../molecule/prepare.yml

View File

@ -12,11 +12,20 @@
is_ostree: "{{ ostree.stat.exists }}"
- name: Runc | Uninstall runc package managed by package manager
package:
name: "{{ runc_package_name }}"
state: absent
when:
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
- not is_ostree
- ansible_distribution != "Flatcar Container Linux by Kinvolk"
- ansible_distribution != "Flatcar"
block:
- name: Runc | Remove package
package:
name: "{{ runc_package_name }}"
state: absent
- name: Runc | Remove orphaned binary
file:
path: /usr/bin/runc
state: absent
when: runc_bin_dir != "/usr/bin"
- name: Runc | Download runc binary
include_tasks: "../../../download/tasks/download_file.yml"
@ -29,10 +38,3 @@
dest: "{{ runc_bin_dir }}/runc"
mode: "0755"
remote_src: true
- name: Runc | Remove orphaned binary
file:
path: /usr/bin/runc
state: absent
when: runc_bin_dir != "/usr/bin"
ignore_errors: true # noqa ignore-errors

View File

@ -21,6 +21,11 @@ provisioner:
defaults:
callbacks_enabled: profile_tasks
timeout: 120
inventory:
group_vars:
k8s_cluster:
youki_enabled: true
container_manager: crio
playbooks:
create: ../../../../../tests/cloud_playbooks/create-kubevirt.yml
prepare: ../../../molecule/prepare.yml

View File

@ -39,16 +39,12 @@ DNS.{{ counter["dns"] }} = {{ apiserver_loadbalancer_domain_name }}{{ increment(
DNS.{{ counter["dns"] }} = {{ etcd_alt_name }}{{ increment(counter, 'dns') }}
{% endfor %}
{% for host in groups['etcd'] %}
{% if hostvars[host]['access_ip'] is defined %}
IP.{{ counter["ip"] }} = {{ hostvars[host]['access_ip'] }}{{ increment(counter, 'ip') }}
{% endif %}
{% if hostvars[host]['access_ip6'] is defined %}
IP.{{ counter["ip"] }} = {{ hostvars[host]['access_ip6'] }}{{ increment(counter, 'ip') }}
{% endif %}
{% if ipv6_stack %}
IP.{{ counter["ip"] }} = {{ hostvars[host]['ip6'] | default(hostvars[host]['fallback_ip6']) }}{{ increment(counter, 'ip') }}
{% endif %}
IP.{{ counter["ip"] }} = {{ hostvars[host]['main_ip'] }}{{ increment(counter, 'ip') }}
{% for address in hostvars[host]['main_access_ips'] %}
IP.{{ counter["ip"] }} = {{ address }}{{ increment(counter, 'ip') }}
{% endfor %}
{% for address in hostvars[host]['main_ips'] %}
IP.{{ counter["ip"] }} = {{ address }}{{ increment(counter, 'ip') }}
{% endfor %}
{% endfor %}
{% for cert_alt_ip in etcd_cert_alt_ips %}
IP.{{ counter["ip"] }} = {{ cert_alt_ip }}{{ increment(counter, 'ip') }}

View File

@ -117,11 +117,6 @@ etcd_retries: 4
# https://groups.google.com/a/kubernetes.io/g/dev/c/B7gJs88XtQc/m/rSgNOzV2BwAJ?utm_medium=email&utm_source=footer
etcd_experimental_initial_corrupt_check: true
# If this is true, debug information will be displayed but
# may contain some private data, so it is recommended to set it to false
# in the production environment.
unsafe_show_logs: false
# Enable distributed tracing
# https://etcd.io/docs/v3.5/op-guide/monitoring/#distributed-tracing
etcd_experimental_enable_distributed_tracing: false

View File

@ -1,6 +1,5 @@
---
gateway_api_enabled: false
gateway_api_version: 1.2.1
# `gateway_api_channel` default is "standard".
# "standard" release channel includes all resources that have graduated to GA or beta, including GatewayClass, Gateway, HTTPRoute, and ReferenceGrant.

View File

@ -27,11 +27,6 @@ vsphere_csi_aggressive_node_not_ready_timeout: 300
vsphere_csi_node_affinity: {}
# If this is true, debug information will be displayed but
# may contain some private data, so it is recommended to set it to false
# in the production environment.
unsafe_show_logs: false
# https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/docs/book/features/volume_snapshot.md#how-to-enable-volume-snapshot--restore-feature-in-vsphere-csi-
# according to the above link , we can controler the block-volume-snapshot parameter
vsphere_csi_block_volume_snapshot: false

View File

@ -1,5 +1,7 @@
---
dependencies:
- role: kubernetes-apps/utils
- role: kubernetes-apps/ansible
when:
- inventory_hostname == groups['kube_control_plane'][0]

View File

@ -26,6 +26,16 @@ rules:
verbs:
- watch
- list
# Services are monitored for service LoadBalancer IP allocation
- apiGroups: [""]
resources:
- services
- services/status
verbs:
- get
- list
- update
- watch
{% elif calico_datastore == "kdd" %}
# Nodes are watched to monitor for deletions.
- apiGroups: [""]
@ -79,6 +89,7 @@ rules:
- create
- update
- delete
- watch
# Needs access to update clusterinformations.
- apiGroups: ["crd.projectcalico.org"]
resources:

View File

@ -0,0 +1,12 @@
---
_kubectl_apply_stdin:
- "{{ kubectl }}"
- apply
- -f
- "-"
- -n
- "{{ k8s_namespace }}"
- --server-side="{{ server_side_apply | lower }}"
# TODO: switch to default SSA
server_side_apply: false
kubectl_apply_stdin: "{{ _kubectl_apply_stdin | join(' ') }}"

View File

@ -1,2 +0,0 @@
---
kubectl_apply_stdin: "{{ kubectl }} apply -f - -n {{ k8s_namespace }}"

View File

@ -240,6 +240,10 @@ auto_renew_certificates_systemd_calendar: "Mon *-*-1,2,3,4,5,6,7 03:00:00"
# we can opt out from the default behavior by setting kubeadm_upgrade_auto_cert_renewal to false
kubeadm_upgrade_auto_cert_renewal: true
# Add Subject Alternative Names to the Kubernetes apiserver certificates.
# Useful if you access the API from multiples load balancers, for instance.
supplementary_addresses_in_ssl_keys: []
# Bash alias of kubectl to interact with Kubernetes cluster much easier
# kubectl_alias: k

View File

@ -1,7 +1,7 @@
---
- name: Kubeadm | Check api is up
uri:
url: "https://{{ ip | default(fallback_ip) }}:{{ kube_apiserver_port }}/healthz"
url: "https://{{ main_ip | ansible.utils.ipwrap }}:{{ kube_apiserver_port }}/healthz"
validate_certs: false
when: ('kube_control_plane' in group_names)
register: _result

View File

@ -1,19 +0,0 @@
---
- name: Check which kube-control nodes are already members of the cluster
command: "{{ bin_dir }}/kubectl get nodes --selector=node-role.kubernetes.io/control-plane -o json"
register: kube_control_planes_raw
ignore_errors: true
changed_when: false
- name: Set fact joined_control_planes
set_fact:
joined_control_planes: "{{ ((kube_control_planes_raw.stdout | from_json)['items']) | default([]) | map(attribute='metadata') | map(attribute='name') | list }}"
delegate_to: "{{ item }}"
loop: "{{ groups['kube_control_plane'] }}"
when: kube_control_planes_raw is succeeded
run_once: true
- name: Set fact first_kube_control_plane
set_fact:
first_kube_control_plane: "{{ joined_control_planes | default([]) | first | default(groups['kube_control_plane'] | first) }}"

View File

@ -11,24 +11,23 @@
tags:
- facts
- name: Upload certificates so they are fresh and not expired
command: >-
{{ bin_dir }}/kubeadm init phase
--config {{ kube_config_dir }}/kubeadm-config.yaml
upload-certs
--upload-certs
register: kubeadm_upload_cert
- name: Obtain kubeadm certificate key for joining control planes nodes
when:
- inventory_hostname == first_kube_control_plane
- not kube_external_ca_mode
- name: Parse certificate key if not set
set_fact:
kubeadm_certificate_key: "{{ hostvars[first_kube_control_plane]['kubeadm_upload_cert'].stdout_lines[-1] | trim }}"
run_once: true
when:
- hostvars[first_kube_control_plane]['kubeadm_upload_cert'] is defined
- hostvars[first_kube_control_plane]['kubeadm_upload_cert'] is not skipped
block:
- name: Upload certificates so they are fresh and not expired
command: >-
{{ bin_dir }}/kubeadm init phase
--config {{ kube_config_dir }}/kubeadm-config.yaml
upload-certs
--upload-certs
register: kubeadm_upload_cert
delegate_to: "{{ first_kube_control_plane }}"
- name: Parse certificate key if not set
set_fact:
kubeadm_certificate_key: "{{ kubeadm_upload_cert.stdout_lines[-1] | trim }}"
- name: Wait for k8s apiserver
wait_for:

View File

@ -25,9 +25,9 @@
- name: Kubeadm | aggregate all SANs
set_fact:
apiserver_sans: "{{ (sans_base + groups['kube_control_plane'] + sans_lb + sans_lb_ip + sans_supp + sans_access_ip + sans_ip + sans_ipv4_address + sans_ipv6_address + sans_override + sans_hostname + sans_fqdn + sans_kube_vip_address) | unique }}"
apiserver_sans: "{{ _apiserver_sans | flatten | select | unique }}"
vars:
sans_base:
_apiserver_sans:
- "kubernetes"
- "kubernetes.default"
- "kubernetes.default.svc"
@ -36,17 +36,17 @@
- "localhost"
- "127.0.0.1"
- "::1"
sans_lb: "{{ [apiserver_loadbalancer_domain_name] if apiserver_loadbalancer_domain_name is defined else [] }}"
sans_lb_ip: "{{ [loadbalancer_apiserver.address] if loadbalancer_apiserver is defined and loadbalancer_apiserver.address is defined else [] }}"
sans_supp: "{{ supplementary_addresses_in_ssl_keys if supplementary_addresses_in_ssl_keys is defined else [] }}"
sans_access_ip: "{{ groups['kube_control_plane'] | map('extract', hostvars, 'main_access_ip') | list | select('defined') | list }}"
sans_ip: "{{ groups['kube_control_plane'] | map('extract', hostvars, 'main_ip') | list | select('defined') | list }}"
sans_ipv4_address: "{{ groups['kube_control_plane'] | map('extract', hostvars, ['ansible_default_ipv4', 'address']) | list | select('defined') | list }}"
sans_ipv6_address: "{{ groups['kube_control_plane'] | map('extract', hostvars, ['ansible_default_ipv6', 'address']) | list | select('defined') | list }}"
sans_override: "{{ [kube_override_hostname] if kube_override_hostname else [] }}"
sans_hostname: "{{ groups['kube_control_plane'] | map('extract', hostvars, ['ansible_hostname']) | list | select('defined') | list }}"
sans_fqdn: "{{ groups['kube_control_plane'] | map('extract', hostvars, ['ansible_fqdn']) | list | select('defined') | list }}"
sans_kube_vip_address: "{{ [kube_vip_address] if kube_vip_address is defined and kube_vip_address else [] }}"
- "{{ apiserver_loadbalancer_domain_name }}"
- "{{ loadbalancer_apiserver.address | d('') }}"
- "{{ supplementary_addresses_in_ssl_keys }}"
- "{{ groups['kube_control_plane'] | map('extract', hostvars, 'main_access_ip') }}"
- "{{ groups['kube_control_plane'] | map('extract', hostvars, 'main_ip') }}"
- "{{ groups['kube_control_plane'] | map('extract', hostvars, ['ansible_default_ipv4', 'address']) | select('defined') }}"
- "{{ groups['kube_control_plane'] | map('extract', hostvars, ['ansible_default_ipv6', 'address']) | select('defined') }}"
- "{{ groups['kube_control_plane'] | map('extract', hostvars, 'ansible_hostname') }}"
- "{{ groups['kube_control_plane'] | map('extract', hostvars, 'ansible_fqdn') }}"
- "{{ kube_override_hostname }}"
- "{{ kube_vip_address }}"
tags: facts
- name: Create audit-policy directory
@ -179,9 +179,10 @@
timeout -k {{ kubeadm_init_timeout }} {{ kubeadm_init_timeout }}
{{ bin_dir }}/kubeadm init
--config={{ kube_config_dir }}/kubeadm-config.yaml
--ignore-preflight-errors={{ kubeadm_ignore_preflight_errors | join(',') }}
--ignore-preflight-errors={{ _ignore_errors | flatten | join(',') }}
--skip-phases={{ kubeadm_init_phases_skip | join(',') }}
{{ kube_external_ca_mode | ternary('', '--upload-certs') }}
_ignore_errors: "{{ kubeadm_ignore_preflight_errors }}"
environment:
PATH: "{{ bin_dir }}:{{ ansible_env.PATH }}"
notify: Control plane | restart kubelet
@ -195,6 +196,15 @@
# This retry task is separated from 1st task to show log of failure of 1st task.
- name: Kubeadm | Initialize first control plane node (retry)
command: "{{ kubeadm_init_first_control_plane_cmd }}"
vars:
_errors_from_first_try:
- 'FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml'
- 'FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml'
- 'FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml'
- 'Port-10250'
_ignore_errors:
- "{{ kubeadm_ignore_preflight_errors }}"
- "{{ _errors_from_first_try if 'all' not in kubeadm_ignore_preflight_errors else [] }}"
register: kubeadm_init
retries: 2
until: kubeadm_init is succeeded or "field is immutable" in kubeadm_init.stderr

View File

@ -92,9 +92,6 @@
- upgrade
ignore_errors: true # noqa ignore-errors
- name: Define nodes already joined to existing cluster and first_kube_control_plane
import_tasks: define-first-kube-control.yml
- name: Include kubeadm setup
import_tasks: kubeadm-setup.yml

View File

@ -61,8 +61,6 @@ eviction_hard_control_plane: {}
kubelet_status_update_frequency: 10s
# kube-vip
kube_vip_version: 0.8.0
kube_vip_arp_enabled: false
kube_vip_interface:
kube_vip_services_interface:
@ -80,7 +78,6 @@ kube_vip_bgp_peeraddress:
kube_vip_bgp_peerpass:
kube_vip_bgp_peeras: 65000
kube_vip_bgppeers:
kube_vip_address:
kube_vip_enableServicesElection: false
kube_vip_lb_enable: false
kube_vip_leasename: plndr-cp-lock

View File

@ -18,14 +18,7 @@
owner: root
mode: "0755"
backup: true
- name: Haproxy | Get checksum from config
stat:
path: "{{ haproxy_config_dir }}/haproxy.cfg"
get_attributes: false
get_checksum: true
get_mime: false
register: haproxy_stat
register: haproxy_conf
- name: Haproxy | Write static pod
template:

View File

@ -18,14 +18,7 @@
owner: root
mode: "0755"
backup: true
- name: Nginx-proxy | Get checksum from config
stat:
path: "{{ nginx_config_dir }}/nginx.conf"
get_attributes: false
get_checksum: true
get_mime: false
register: nginx_stat
register: nginx_conf
- name: Nginx-proxy | Write static pod
template:

View File

@ -7,7 +7,7 @@ metadata:
addonmanager.kubernetes.io/mode: Reconcile
k8s-app: kube-haproxy
annotations:
haproxy-cfg-checksum: "{{ haproxy_stat.stat.checksum }}"
haproxy-cfg-checksum: "{{ haproxy_conf.checksum }}"
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet

View File

@ -1,4 +1,4 @@
# Inspired by https://github.com/kube-vip/kube-vip/blob/v0.8.0/pkg/kubevip/config_generator.go#L103
# Inspired by https://github.com/kube-vip/kube-vip/blob/v1.0.3/pkg/kubevip/config_generator.go#L103
apiVersion: v1
kind: Pod
metadata:
@ -27,7 +27,7 @@ spec:
value: {{ kube_vip_services_interface | string | to_json }}
{% endif %}
{% if kube_vip_cidr %}
- name: vip_cidr
- name: vip_{{ "subnet" if kube_vip_version is version('0.9.0', '>=') else "cidr" }}
value: {{ kube_vip_cidr | string | to_json }}
{% endif %}
{% if kube_vip_dns_mode %}
@ -113,6 +113,8 @@ spec:
add:
- NET_ADMIN
- NET_RAW
drop:
- ALL
{% endif %}
volumeMounts:
- mountPath: /etc/kubernetes/admin.conf

View File

@ -7,7 +7,7 @@ metadata:
addonmanager.kubernetes.io/mode: Reconcile
k8s-app: kube-nginx
annotations:
nginx-cfg-checksum: "{{ nginx_stat.stat.checksum }}"
nginx-cfg-checksum: "{{ nginx_conf.checksum }}"
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet

View File

@ -74,8 +74,33 @@
- not is_fedora_coreos
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
- name: Set timezone
- name: Gather selinux facts
ansible.builtin.setup:
gather_subset: selinux
when:
- ntp_timezone
- ansible_os_family == "RedHat"
- name: Put SELinux in permissive mode, logging actions that would be blocked.
ansible.posix.selinux:
policy: targeted
state: permissive
when:
- ntp_timezone
- ansible_os_family == "RedHat"
- ansible_facts.selinux.mode == 'enforcing'
- name: Set ntp_timezone
community.general.timezone:
name: "{{ ntp_timezone }}"
when:
- ntp_timezone
- name: Re-enable SELinux
ansible.posix.selinux:
policy: targeted
state: "{{ preinstall_selinux_state }}"
when:
- ntp_timezone
- ansible_os_family == "RedHat"
- ansible_facts.selinux.status == 'enabled'

View File

@ -5,7 +5,9 @@ download_cache_dir: /tmp/kubespray_cache
# If this is true, debug information will be displayed but
# may contain some private data, so it is recommended to set it to false
# in the production environment.
unsafe_show_logs: false
# false by default, unless we're running in CI. (CI_PROJECT_URL should be globally unique even if kubespray happens to run
# in gitlab-ci in other contexts
unsafe_show_logs: "{{ lookup('env', 'CI_PROJECT_URL') == 'https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray' }}"
# do not delete remote cache files after using them
# NOTE: Setting this parameter to TRUE is only really useful when developing kubespray
@ -114,7 +116,7 @@ flannel_version: 0.27.3
flannel_cni_version: 1.7.1-flannel1
cni_version: "{{ (cni_binary_checksums['amd64'] | dict2items)[0].key }}"
cilium_version: "1.18.2"
cilium_version: "1.18.5"
cilium_cli_version: "{{ (ciliumcli_binary_checksums['amd64'] | dict2items)[0].key }}"
cilium_enable_hubble: false
@ -140,7 +142,7 @@ scheduler_plugins_version: "{{ scheduler_plugins_supported_versions[kube_major_v
yq_version: "{{ (yq_checksums['amd64'] | dict2items)[0].key }}"
gateway_api_version: "1.2.1"
gateway_api_version: "{{ (gateway_api_standard_crds_checksums.no_arch | dict2items)[0].key }}"
gateway_api_channel: "standard"
prometheus_operator_crds_version: "{{ (prometheus_operator_crds_checksums.no_arch | dict2items)[0].key }}"
@ -249,7 +251,7 @@ cilium_hubble_ui_image_tag: "v0.13.3"
cilium_hubble_ui_backend_image_repo: "{{ quay_image_repo }}/cilium/hubble-ui-backend"
cilium_hubble_ui_backend_image_tag: "v0.13.3"
cilium_hubble_envoy_image_repo: "{{ quay_image_repo }}/cilium/cilium-envoy"
cilium_hubble_envoy_image_tag: "v1.34.7-1757592137-1a52bb680a956879722f48c591a2ca90f7791324"
cilium_hubble_envoy_image_tag: "v1.34.10-1762597008-ff7ae7d623be00078865cff1b0672cc5d9bfc6d5"
kube_ovn_container_image_repo: "{{ docker_image_repo }}/kubeovn/kube-ovn"
kube_ovn_container_image_tag: "v{{ kube_ovn_version }}"
kube_ovn_vpc_container_image_repo: "{{ docker_image_repo }}/kubeovn/vpc-nat-gateway"
@ -263,8 +265,9 @@ multus_image_tag: "v{{ multus_version }}"
external_openstack_cloud_controller_image_repo: "{{ kube_image_repo }}/provider-os/openstack-cloud-controller-manager"
external_openstack_cloud_controller_image_tag: "v1.32.0"
kube_vip_version: 1.0.3
kube_vip_image_repo: "{{ github_image_repo }}/kube-vip/kube-vip{{ '-iptables' if kube_vip_lb_fwdmethod == 'masquerade' else '' }}"
kube_vip_image_tag: v0.8.9
kube_vip_image_tag: "v{{ kube_vip_version }}"
nginx_image_repo: "{{ docker_image_repo }}/library/nginx"
nginx_image_tag: 1.28.0-alpine
haproxy_image_repo: "{{ docker_image_repo }}/library/haproxy"
@ -274,9 +277,9 @@ haproxy_image_tag: 3.2.4-alpine
# bundle with kubeadm; if not 'basic' upgrade can sometimes fail
coredns_supported_versions:
'1.34': 1.12.1
'1.33': 1.12.0
'1.32': 1.11.3
'1.31': 1.11.3
coredns_version: "{{ coredns_supported_versions[kube_major_version] }}"
coredns_image_repo: "{{ kube_image_repo }}{{ '/coredns' if coredns_version is version('1.7.1', '>=') else '' }}/coredns"
coredns_image_tag: "{{ 'v' if coredns_version is version('1.7.1', '>=') else '' }}{{ coredns_version }}"
@ -324,22 +327,22 @@ cert_manager_webhook_image_repo: "{{ quay_image_repo }}/jetstack/cert-manager-we
cert_manager_webhook_image_tag: "v{{ cert_manager_version }}"
csi_attacher_image_repo: "{{ kube_image_repo }}/sig-storage/csi-attacher"
csi_attacher_image_tag: "v3.3.0"
csi_attacher_image_tag: "v4.4.2"
csi_provisioner_image_repo: "{{ kube_image_repo }}/sig-storage/csi-provisioner"
csi_provisioner_image_tag: "v3.0.0"
csi_provisioner_image_tag: "v3.6.2"
csi_snapshotter_image_repo: "{{ kube_image_repo }}/sig-storage/csi-snapshotter"
csi_snapshotter_image_tag: "v5.0.0"
csi_snapshotter_image_tag: "v6.3.2"
csi_resizer_image_repo: "{{ kube_image_repo }}/sig-storage/csi-resizer"
csi_resizer_image_tag: "v1.3.0"
csi_resizer_image_tag: "v1.9.2"
csi_node_driver_registrar_image_repo: "{{ kube_image_repo }}/sig-storage/csi-node-driver-registrar"
csi_node_driver_registrar_image_tag: "v2.4.0"
csi_livenessprobe_image_repo: "{{ kube_image_repo }}/sig-storage/livenessprobe"
csi_livenessprobe_image_tag: "v2.5.0"
csi_livenessprobe_image_tag: "v2.11.0"
snapshot_controller_supported_versions:
'1.34': "v7.0.2"
'1.33': "v7.0.2"
'1.32': "v7.0.2"
'1.31': "v7.0.2"
snapshot_controller_image_repo: "{{ kube_image_repo }}/sig-storage/snapshot-controller"
snapshot_controller_image_tag: "{{ snapshot_controller_supported_versions[kube_major_version] }}"
@ -784,9 +787,9 @@ downloads:
url: "{{ calico_crds_download_url }}"
unarchive: true
unarchive_extra_opts:
- "{{ '--strip=6' if (calico_version is version('3.22.3', '<')) else '--strip=3' }}"
- "--strip=3"
- "--wildcards"
- "{{ '*/_includes/charts/calico/crds/kdd/' if (calico_version is version('3.22.3', '<')) else '*/libcalico-go/config/crd/' }}"
- "*/libcalico-go/config/crd/"
owner: "root"
mode: "0755"
groups:
@ -1035,6 +1038,15 @@ downloads:
groups:
- kube_node
csi_livenessprobe:
enabled: "{{ cinder_csi_enabled or aws_ebs_csi_enabled }}"
container: true
repo: "{{ csi_livenessprobe_image_repo }}"
tag: "{{ csi_livenessprobe_image_tag }}"
checksum: "{{ csi_livenessprobe_digest_checksum | default(None) }}"
groups:
- kube_node
csi_node_driver_registrar:
enabled: "{{ cinder_csi_enabled or aws_ebs_csi_enabled }}"
container: true

View File

@ -96,6 +96,7 @@ ignore_assert_errors: false
# kube-vip
kube_vip_enabled: false
kube_vip_lb_fwdmethod: local
kube_vip_address:
# nginx-proxy configure
nginx_config_dir: "/etc/nginx"
@ -632,6 +633,8 @@ ssl_ca_dirs: |-
{% endif -%}
]
# used for delegating tasks on a working control plane node
first_kube_control_plane: "{{ groups['kube_control_plane'] | first }}"
# Vars for pointing to kubernetes api endpoints
kube_apiserver_count: "{{ groups['kube_control_plane'] | length }}"
kube_apiserver_address: "{{ hostvars[inventory_hostname]['main_ip'] }}"
@ -644,8 +647,8 @@ apiserver_loadbalancer_domain_name: "lb-apiserver.kubernetes.local"
kube_apiserver_global_endpoint: |-
{% if loadbalancer_apiserver is defined -%}
https://{{ apiserver_loadbalancer_domain_name }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}
{%- elif loadbalancer_apiserver_localhost and (loadbalancer_apiserver_port is not defined or loadbalancer_apiserver_port == kube_apiserver_port) -%}
https://localhost:{{ kube_apiserver_port }}
{%- elif loadbalancer_apiserver_localhost -%}
https://localhost:{{ loadbalancer_apiserver_port | default(kube_apiserver_port) }}
{%- else -%}
https://{{ first_kube_control_plane_address | ansible.utils.ipwrap }}:{{ kube_apiserver_port }}
{%- endif %}

File diff suppressed because it is too large Load Diff

View File

@ -7,14 +7,14 @@ kube_next: "{{ ((kube_version | split('.'))[1] | int) + 1 }}"
kube_major_next_version: "1.{{ kube_next }}"
pod_infra_supported_versions:
'1.34': '3.10.1'
'1.33': '3.10'
'1.32': '3.10'
'1.31': '3.10'
etcd_supported_versions:
'1.34': "{{ (etcd_binary_checksums['amd64'].keys() | select('version', '3.6', '<'))[0] }}"
'1.33': "{{ (etcd_binary_checksums['amd64'].keys() | select('version', '3.6', '<'))[0] }}"
'1.32': "{{ (etcd_binary_checksums['amd64'].keys() | select('version', '3.6', '<'))[0] }}"
'1.31': "{{ (etcd_binary_checksums['amd64'].keys() | select('version', '3.6', '<'))[0] }}"
# Kubespray constants
kube_proxy_deployed: "{{ 'addon/kube-proxy' not in kubeadm_init_phases_skip }}"

View File

@ -3,54 +3,36 @@
tags:
- always
block:
- name: Gather ansible_default_ipv4
- name: Gather node IPs
setup:
gather_subset: '!all,network'
filter: "ansible_default_ipv4"
when: ansible_default_ipv4 is not defined
gather_subset: '!all,!min,network'
filter: "ansible_default_ip*"
when: ansible_default_ipv4 is not defined or ansible_default_ipv6 is not defined
ignore_unreachable: true
# Set 127.0.0.1 as fallback IP if we do not have host facts for host
# ansible_default_ipv4 isn't what you think.
# https://medium.com/opsops/ansible-default-ipv4-is-not-what-you-think-edb8ab154b10
# TODO: discard this and update all the location relying on it in "looping on hostvars" templates
- name: Set fallback_ip
set_fact:
- name: Set computed IPs varables
vars:
fallback_ip: "{{ ansible_default_ipv4.address | d('127.0.0.1') }}"
when: fallback_ip is not defined
- name: Gather ansible_default_ipv6
setup:
gather_subset: '!all,network'
filter: "ansible_default_ipv6"
when: ansible_default_ipv6 is not defined
ignore_unreachable: true
- name: Set fallback_ip6
set_fact:
fallback_ip6: "{{ ansible_default_ipv6.address | d('::1') }}"
when: fallback_ip6 is not defined
- name: Set main access ip(access_ip based on ipv4_stack/ipv6_stack options).
# Set 127.0.0.1 as fallback IP if we do not have host facts for host
# ansible_default_ipv4 isn't what you think.
_ipv4: "{{ ip | default(fallback_ip) }}"
_access_ipv4: "{{ access_ip | default(_ipv4) }}"
_ipv6: "{{ ip6 | default(fallback_ip6) }}"
_access_ipv6: "{{ access_ip6 | default(_ipv6) }}"
_access_ips:
- "{{ _access_ipv4 if ipv4_stack }}"
- "{{ _access_ipv6 if ipv6_stack }}"
_ips:
- "{{ _ipv4 if ipv4_stack }}"
- "{{ _ipv6 if ipv6_stack }}"
set_fact:
cacheable: true
main_access_ip: >-
{%- if ipv4_stack -%}
{{ access_ip | default(ip | default(fallback_ip)) }}
{%- else -%}
{{ access_ip6 | default(ip6 | default(fallback_ip6)) }}
{%- endif -%}
- name: Set main ip(ip based on ipv4_stack/ipv6_stack options).
set_fact:
cacheable: true
main_ip: "{{ (ip | default(fallback_ip)) if ipv4_stack else (ip6 | default(fallback_ip6)) }}"
- name: Set main access ips(mixed ips for dualstack).
set_fact:
main_access_ips: ["{{ (main_access_ip + ',' + (access_ip6 | default(ip6 | default(fallback_ip6)))) if (ipv4_stack and ipv6_stack) else main_access_ip }}"]
- name: Set main ips(mixed ips for dualstack).
set_fact:
main_ips: ["{{ (main_ip + ',' + (ip6 | default(fallback_ip6))) if (ipv4_stack and ipv6_stack) else main_ip }}"]
main_access_ip: "{{ _access_ipv4 if ipv4_stack else _access_ipv6 }}"
main_ip: "{{ _ipv4 if ipv4_stack else _ipv6 }}"
# Mixed IPs - for dualstack
main_access_ips: "{{ _access_ips | select }}"
main_ips: "{{ _ips | select }}"
- name: Set no_proxy
import_tasks: no_proxy.yml

View File

@ -61,6 +61,7 @@
executable: /bin/bash
register: calico_version_on_server
changed_when: false
check_mode: false
- name: Assert that current calico version is enough for upgrade
assert:

View File

@ -126,23 +126,9 @@
- ('kube_control_plane' in group_names)
- calico_datastore == "kdd"
block:
- name: Calico | Check if extra directory is needed
stat:
path: "{{ local_release_dir }}/calico-{{ calico_version }}-kdd-crds/{{ 'kdd' if (calico_version is version('3.22.3', '<')) else 'crd' }}"
register: kdd_path
- name: Calico | Set kdd path when calico < v3.22.3
set_fact:
calico_kdd_path: "{{ local_release_dir }}/calico-{{ calico_version }}-kdd-crds{{ '/kdd' if kdd_path.stat.exists is defined and kdd_path.stat.exists }}"
when:
- calico_version is version('3.22.3', '<')
- name: Calico | Set kdd path when calico > 3.22.2
set_fact:
calico_kdd_path: "{{ local_release_dir }}/calico-{{ calico_version }}-kdd-crds{{ '/crd' if kdd_path.stat.exists is defined and kdd_path.stat.exists }}"
when:
- calico_version is version('3.22.2', '>')
- name: Calico | Create calico manifests for kdd
assemble:
src: "{{ calico_kdd_path }}"
src: "{{ local_release_dir }}/calico-{{ calico_version }}-kdd-crds/crd/"
dest: "{{ kube_config_dir }}/kdd-crds.yml"
mode: "0644"
delimiter: "---\n"

View File

@ -235,6 +235,8 @@ rules:
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
- validatingadmissionpolicies # Required for Kubernetes 1.33+
- validatingadmissionpolicybindings # Required for Kubernetes 1.33+
verbs:
- get
- list

View File

@ -5,7 +5,7 @@ metadata:
namespace: kube-system
name: kubernetes-services-endpoint
data:
{% if calico_bpf_enabled %}
{% if calico_bpf_enabled or loadbalancer_apiserver_localhost %}
KUBERNETES_SERVICE_HOST: "{{ kube_apiserver_global_endpoint | urlsplit('hostname') }}"
KUBERNETES_SERVICE_PORT: "{{ kube_apiserver_global_endpoint | urlsplit('port') }}"
{% endif %}

View File

@ -1,8 +1,6 @@
---
cilium_min_version_required: "1.15"
# remove migrate after 2.29 released
cilium_remove_old_resources: false
# Log-level
cilium_debug: false

View File

@ -30,13 +30,6 @@
when:
- cilium_identity_allocation_mode == "kvstore"
- name: Cilium | Enable portmap addon
template:
src: 000-cilium-portmap.conflist.j2
dest: /etc/cni/net.d/000-cilium-portmap.conflist
mode: "0644"
when: cilium_enable_portmap
- name: Cilium | Render values
template:
src: values.yaml.j2

View File

@ -5,10 +5,5 @@
- name: Cilium install
include_tasks: install.yml
# Remove after 2.29 released
- name: Cilium remove old resources
when: cilium_remove_old_resources
include_tasks: remove_old_resources.yml
- name: Cilium apply
include_tasks: apply.yml

View File

@ -1,45 +0,0 @@
---
# Remove after 2.29 released
- name: Cilium | Delete Old Resource
command: |
{{ kubectl }} delete {{ item.kind | lower }} {{ item.name }} \
{{ '-n kube-system' if item.kind not in ['ClusterRole', 'ClusterRoleBinding'] else '' }} \
loop:
- { kind: ServiceAccount, name: cilium }
- { kind: ServiceAccount, name: cilium-operator }
- { kind: ServiceAccount, name: hubble-generate-certs }
- { kind: ServiceAccount, name: hubble-relay }
- { kind: ServiceAccount, name: hubble-ui }
- { kind: Service, name: hubble-metrics }
- { kind: Service, name: hubble-relay-metrics }
- { kind: Service, name: hubble-relay }
- { kind: Service, name: hubble-ui }
- { kind: Service, name: hubble-peer }
- { kind: Deployment, name: cilium-operator }
- { kind: Deployment, name: hubble-relay }
- { kind: Deployment, name: hubble-ui }
- { kind: DaemonSet, name: cilium }
- { kind: CronJob, name: hubble-generate-certs }
- { kind: Job, name: hubble-generate-certs }
- { kind: ConfigMap, name: cilium-config }
- { kind: ConfigMap, name: ip-masq-agent }
- { kind: ConfigMap, name: hubble-relay-config }
- { kind: ConfigMap, name: hubble-ui-nginx }
- { kind: ClusterRole, name: cilium }
- { kind: ClusterRole, name: cilium-operator }
- { kind: ClusterRole, name: hubble-generate-certs }
- { kind: ClusterRole, name: hubble-relay }
- { kind: ClusterRole, name: hubble-ui }
- { kind: ClusterRoleBinding, name: cilium }
- { kind: ClusterRoleBinding, name: cilium-operator }
- { kind: ClusterRoleBinding, name: hubble-generate-certs }
- { kind: ClusterRoleBinding, name: hubble-relay }
- { kind: ClusterRoleBinding, name: hubble-ui }
- { kind: Secret, name: hubble-ca-secret }
- { kind: Secret, name: hubble-relay-client-certs }
- { kind: Secret, name: hubble-server-certs }
register: patch_result
when: inventory_hostname == groups['kube_control_plane'][0]
failed_when:
- patch_result.rc != 0
- "'not found' not in patch_result.stderr"

View File

@ -1,13 +0,0 @@
{
"cniVersion": "0.3.1",
"name": "cilium-portmap",
"plugins": [
{
"type": "cilium-cni"
},
{
"type": "portmap",
"capabilities": { "portMappings": true }
}
]
}

View File

@ -7,8 +7,8 @@ image:
repository: {{ cilium_image_repo }}
tag: {{ cilium_image_tag }}
k8sServiceHost: "auto"
k8sServicePort: "auto"
k8sServiceHost: "{{ kube_apiserver_global_endpoint | urlsplit('hostname') }}"
k8sServicePort: "{{ kube_apiserver_global_endpoint | urlsplit('port') }}"
ipv4:
enabled: {{ cilium_enable_ipv4 | to_json }}
@ -27,7 +27,7 @@ identityAllocationMode: {{ cilium_identity_allocation_mode }}
tunnelProtocol: {{ cilium_tunnel_mode }}
loadbalancer:
loadBalancer:
mode: {{ cilium_loadbalancer_mode }}
kubeProxyReplacement: {{ cilium_kube_proxy_replacement | to_json }}
@ -56,6 +56,9 @@ bpf:
cni:
exclusive: {{ cilium_cni_exclusive | to_json }}
logFile: {{ cilium_cni_log_file }}
{% if cilium_enable_portmap %}
chainingMode: portmap
{% endif %}
autoDirectNodeRoutes: {{ cilium_auto_direct_node_routes | to_json }}
@ -107,8 +110,14 @@ hubble:
metrics:
enabled: {{ cilium_hubble_metrics | to_json }}
export:
{% if cilium_version is version('1.18.0', '>=') %}
static:
fileMaxBackups: {{ cilium_hubble_export_file_max_backups }}
fileMaxSizeMb: {{ cilium_hubble_export_file_max_size_mb }}
{% else %}
fileMaxBackups: {{ cilium_hubble_export_file_max_backups }}
fileMaxSizeMb: {{ cilium_hubble_export_file_max_size_mb }}
{% endif %}
dynamic:
enabled: {{ cilium_hubble_export_dynamic_enabled | to_json }}
config:

View File

@ -1,14 +1,4 @@
---
- name: Lookup node IP in kubernetes
command: >
{{ kubectl }} get nodes {{ node }}
-o jsonpath-as-json='{.status.addresses[?(@.type=="InternalIP")].address}'
register: k8s_node_ips
changed_when: false
when:
- groups['kube_control_plane'] | length > 0
delegate_to: "{{ groups['kube_control_plane'] | first }}"
- name: Remove etcd member from cluster
environment:
ETCDCTL_API: "3"
@ -19,25 +9,18 @@
delegate_to: "{{ groups['etcd'] | first }}"
block:
- name: Lookup members infos
command: "{{ bin_dir }}/etcdctl member list"
command: "{{ bin_dir }}/etcdctl member list -w json"
register: etcd_members
changed_when: false
check_mode: false
tags:
- facts
- name: Remove member from cluster
vars:
node_ip: >-
{%- if not ipv4_stack -%}
{{ ip6 if ip6 is defined else (access_ip6 if access_ip6 is defined else (k8s_node_ips.stdout | from_json)[0]) | ansible.utils.ipwrap }}
{%- else -%}
{{ ip if ip is defined else (access_ip if access_ip is defined else (k8s_node_ips.stdout | from_json)[0]) | ansible.utils.ipwrap }}
{%- endif -%}
command:
argv:
- "{{ bin_dir }}/etcdctl"
- member
- remove
- "{{ ((etcd_members.stdout_lines | select('contains', '//' + node_ip + ':'))[0] | split(','))[0] }}"
- "{{ '%x' | format(((etcd_members.stdout | from_json).members | selectattr('peerURLs.0', '==', etcd_peer_url))[0].ID) }}"
register: etcd_removal_output
changed_when: "'Removed member' in etcd_removal_output.stdout"

View File

@ -432,16 +432,6 @@
- files
- dns
# TODO: remove after release 2.29
- name: Reset | remove host entries from /etc/hosts
blockinfile:
path: "/etc/hosts"
state: absent
marker: "# Ansible inventory hosts {mark}"
tags:
- files
- dns
- name: Reset | include file with reset tasks specific to the network_plugin if exists
include_role:
name: "network_plugin/{{ kube_network_plugin }}"

View File

@ -31,14 +31,14 @@
command: >
{{ kubectl }} get node {{ kube_override_hostname | default(inventory_hostname) }}
-o jsonpath='{ .spec.unschedulable }'
register: kubectl_node_schedulable
register: kubectl_node_unschedulable
delegate_to: "{{ groups['kube_control_plane'][0] }}"
failed_when: false
changed_when: false
- name: Set if node needs cordoning
set_fact:
needs_cordoning: "{{ (kubectl_node_ready.stdout == 'True' and not kubectl_node_schedulable.stdout) or upgrade_node_always_cordon }}"
needs_cordoning: "{{ (kubectl_node_ready.stdout == 'True' and not kubectl_node_unschedulable.stdout) or upgrade_node_always_cordon }}"
- name: Node draining
delegate_to: "{{ groups['kube_control_plane'][0] }}"

View File

@ -6,14 +6,6 @@
# -> nothing depending on facts or similar cluster state
# Checks depending on current state (of the nodes or the cluster)
# should be in roles/kubernetes/preinstall/tasks/0040-verify-settings.yml
- name: Stop if removed tags are used
assert:
msg: The tag 'master' is removed. Use 'control-plane' instead
that:
- ('master' not in ansible_run_tags)
- ('master' not in ansible_skip_tags)
# TODO: Remove checks after next release
- name: Stop if kube_control_plane group is empty
assert:
that: groups.get( 'kube_control_plane' )

View File

@ -101,9 +101,19 @@ infos = {
"graphql_id": "R_kgDOApOQGQ",
},
"argocd_install": {
"url": "https://raw.githubusercontent.com/argoproj/argo-cd/v{version}/manifests/install.yaml",
"graphql_id": "R_kgDOBzS60g",
"binary": True,
"hashtype": "sha256",
"url": "https://raw.githubusercontent.com/argoproj/argo-cd/v{version}/manifests/install.yaml",
"graphql_id": "R_kgDOBzS60g",
"binary": True,
"hashtype": "sha256",
},
"gateway_api_standard_crds": {
"url": "https://github.com/kubernetes-sigs/gateway-api/releases/download/v{version}/standard-install.yaml",
"graphql_id": "R_kgDODQ6RZw",
"binary": True,
},
"gateway_api_experimental_crds": {
"url": "https://github.com/kubernetes-sigs/gateway-api/releases/download/v{version}/experimental-install.yaml",
"graphql_id": "R_kgDODQ6RZw",
"binary": True,
},
}

Some files were not shown because too many files have changed in this diff Show More