Compare commits

...

1452 Commits

Author SHA1 Message Date
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
ChengHao Yang
9991412b45 Docs: bump version to 2.29.0 (#12621)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-10-14 01:29:36 -07:00
Mahendra Reddy
ee6a792ec0 feat: add support crio additional mounts (#12561)
removed default since it's already set in variables

fix pre commit issue in the pipeline
2025-10-13 18:15:32 -07:00
Max Gautier
fbf957ab5d Fix breakage when ignoring all kubeadm preflight errors (#12606)
kubeadm errors out if 'all' is specified with specific checks, so check
that case when we add hardcoded checks.

Add a test to catch regression.
2025-10-13 05:54:58 -07:00
dependabot[bot]
202a0f3461 build(deps): bump redhat-plumbers-in-action/advanced-issue-labeler (#12600)
Bumps [redhat-plumbers-in-action/advanced-issue-labeler](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/releases)
- [Commits](0db433d412...e38e6809c5)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/advanced-issue-labeler
  dependency-version: 3.2.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-09 11:53:00 -07:00
Arthur Outhenin-Chalandre
8c16c0f2b9 owner: remove myself from reviewers (#12594)
Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
2025-10-09 02:47:03 -07:00
Jan Breitkopf
deaabb694d fix missing directory when run with download_run_once (#12275) 2025-10-09 02:01:02 -07:00
Mahendra Reddy
e39e005306 bugfix: skip etcd cert extraction if cilium identity uses crd (#12565)
* bugfix: skip etcd cert extraction if cilium identity uses crd

* remove new line end of the file
2025-10-09 00:31:00 -07:00
Matthias Lohr
6d6633a905 show node name to be more clear which node is going to be upgraded (#12399)
* show node name to be more clear which node is going to be upgraded

* also show nodename when uncordoning
2025-10-09 00:19:07 -07:00
Mohamed Omar Zaian
fd7f39043b [ingress-nginx] upgrade to 1.13.3 (#12604) 2025-10-08 19:04:59 -07:00
Ali Afsharzadeh
f8e74aafb9 Fix cilium_policy_audit_mode variable (#12569)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-10-07 09:15:02 -07:00
ChengHao Yang
aa255f8831 Patch versions updates (#12602)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-07 07:25:02 -07:00
Bas
9ded45f703 Documentation - hardening.md - etcd_deployment_type: host (#12520)
* Fix for #12447

Signed-off-by: Bas Meijer <bas.meijer@enexis.nl>

* Update hardening.md

Co-authored-by: spatterlight <81454789+spatterIight@users.noreply.github.com>

---------

Signed-off-by: Bas Meijer <bas.meijer@enexis.nl>
Co-authored-by: spatterlight <81454789+spatterIight@users.noreply.github.com>
2025-10-06 02:07:00 -07:00
Mahendra Reddy
270ff65992 fix crio restart while switching runtime (#12008)
fixed kubelet condition

CRI-O: fix for handling of container runtime switching

refactored kubelet start condition

stop/start kubelet and crio only when default runtime is changed

fixed condition for runtime_matches fact variable

fixed set facts for existing container runtime

added crio runtime switch variable

changed condition to use runtime switch variable

added comment for not-found for readers
2025-10-06 01:58:59 -07:00
dependabot[bot]
324e7f50c9 build(deps): bump cryptography from 46.0.1 to 46.0.2 (#12599)
Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.1 to 46.0.2.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/46.0.1...46.0.2)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 46.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-10-06 01:47:00 -07:00
R. P. Taylor
055274937b Fix variable typos (#12595) 2025-10-06 01:28:58 -07:00
philipp-check24
b98ed6ddf8 Remove update flag from pip install in ansible docs (#12590) 2025-10-03 06:56:58 -07:00
Meza
05c3e2c87c Fix typo in CONTRIBUTING.md (#12592)
Signed-off-by: Meza <meza-xyz@proton.me>
2025-10-03 04:30:57 -07:00
Alessio Greggi
b0571ccbf9 docs(hardening): fix broken link (#12577)
Signed-off-by: Alessio Greggi <ale_grey_91@hotmail.it>
2025-09-29 21:10:16 -07:00
Ali Afsharzadeh
8b62a71f31 Upgrade cilium related images (#12568)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-09-29 10:04:19 -07:00
JaeyungLee
411fdddaae fix(docs): update calico.md wrong image path (#12582) 2025-09-28 00:24:15 -07:00
Sassan torabkheslat
51a1f08624 reset: set v4/v6 default policies to ACCEPT and drop user chains (#12552) 2025-09-24 20:14:15 -07:00
dependabot[bot]
67632844cd build(deps): bump cryptography from 45.0.7 to 46.0.1 (#12567)
Bumps [cryptography](https://github.com/pyca/cryptography) from 45.0.7 to 46.0.1.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/45.0.7...46.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 46.0.1
  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-09-22 03:02:19 -07:00
Seena Fallah
13c70d3a58 coredns: set deploy replicas when dns autoscaler is disabled (#12387)
Allow setting deployment replicas through `coredns_replicas` when
`enable_dns_autoscaler` is set to false.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2025-09-20 03:50:14 -07:00
Ali Afsharzadeh
fae4e08f35 Upgrade cilium from 1.18.1 to 1.18.2 (#12559) 2025-09-18 23:56:12 -07:00
Takuya Murakami
1d91e47878 Fix: Fix calico_crds_archive checksum (#12564)
It looks like the checksum was changed due to Github's compress algorithm change.
See #12523 for details.
2025-09-18 23:14:11 -07:00
Ali Afsharzadeh
6b973d072c Upgrade haproxy load balancer from 3.1.7 to 3.2.4 (#12557)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-09-17 01:18:12 -07:00
ChengHao Yang
a36912e2c4 Patch versions updates (#12553)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-15 12:58:09 -07:00
Max Gautier
8d7d9907a1 Rough rework of the CI setup documentation (#12094) 2025-09-15 03:24:11 -07:00
Takuya Murakami
643087fea5 Bump cni-plugin 1.4.1 -> 1.8.0 (#12551)
- Add 1.5, 1.6, 1.7 and 1.8 hashes
- Drop <1.3.0

Signed-off-by: Takuya Murakami <murakami_da@nec.com>
2025-09-14 05:32:08 -07:00
Ali Afsharzadeh
2955dfe69f Upgrade flannel from 0.26.7 to 0.27.3 (#12543) 2025-09-11 00:22:07 -07:00
Ali Afsharzadeh
0a35c624ad Upgrade local-path-provisioner from 0.0.24 to 0.0.32 (#12545)
* Upgrade local-path-provisioner from 0.0.24 to 0.0.32

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

* Remove local_path_provisioner_image_tag variable

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

---------

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
Co-authored-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-09-10 04:25:57 -07:00
Ali Afsharzadeh
456a3dda09 Upgrade cilium from 1.17.7 to 1.18.1 (#12542)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-09-09 19:47:59 -07:00
dependabot[bot]
efd30981f8 build(deps): bump actions/setup-python from 5 to 6 (#12539)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  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-09-07 22:13:26 -07:00
dependabot[bot]
aabe063490 build(deps): bump cryptography from 45.0.6 to 45.0.7 (#12538)
Bumps [cryptography](https://github.com/pyca/cryptography) from 45.0.6 to 45.0.7.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/45.0.6...45.0.7)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 45.0.7
  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-09-07 21:21:27 -07:00
jaehanbyun
50c5f39a9d chore: add 'nftables' to kube_proxy_mode comment (#12522)
Signed-off-by: jaehanbyun <awbrg789@naver.com>
2025-09-02 00:57:15 -07:00
Takuya Murakami
8e401f94ea [calico] Add version 3.30.3 and make it default (#12523)
Signed-off-by: Takuya Murakami <murakami_da@nec.com>
2025-09-02 00:41:16 -07:00
Max Gautier
0b082ac2f4 Patch versions updates (#12518)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-01 20:05:12 -07:00
David Bidorff
fe7592dd0c fix: provide an option to ignore sysctl errors about unknown keys (#12514)
* fix: provide an option to ignore sysctl errors about unknown keys

* fix: rename sysctl_ignoreerrors and remove useless var definitions
2025-09-01 07:07:14 -07:00
Kim Hyunyoung, Abel
eb26449e80 fix: typo (#12517) 2025-09-01 03:07:12 -07:00
ujstor
4ab213bc44 feat: add containerd_extra_runtime_args for CRI runtime configuration (#12247)
Add support for injecting additional configuration options into the
  containerd CRI runtime plugin section via containerd_extra_runtime_args.
2025-09-01 02:57:12 -07:00
Kim Hyunyoung, Abel
66cab15498 fix: redeploy coredns and nodelocaldns when its config changed (#12401) 2025-09-01 00:23:11 -07:00
Max Gautier
c03c68e8c7 Do not suppress output during cert generation (#12479)
Makes debugging easier.
2025-08-28 19:43:09 -07:00
ERIK
72c983c41e Fix(system_packages): Avoid version comparison error on non-numeric versions (#12512)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2025-08-28 00:19:10 -07:00
vdveldet
a01e96e21a Introduced internal_facts.yml and adapt playbooks to use this (#12492) 2025-08-28 00:11:10 -07:00
vdveldet
e52e262e78 Making 28.3 the new docker default (#12509) 2025-08-27 19:53:09 -07:00
Max Gautier
84504d156f Fold kubernetes-apps/network_plugin into network_plugin (#12506)
For what I can see, there is no reason for the split, and it makes
things confusing.
2025-08-27 18:43:10 -07:00
Hyeonki Hong
56c830713e Fix SAN address collection from ansible_default_ipv{4,6} (#12413)
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
2025-08-26 02:40:11 -07:00
Max Gautier
acdc338fa4 Patch versions updates (#12503)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-26 02:36:11 -07:00
Mahdad Ghasemian
72877d68ec Fix: render tcp and udp service ports as integers in Ingress NGINX templates (#12442) 2025-08-26 02:32:11 -07:00
Qasim Mehmood
0f158e4e28 feat: Upgrade multus cni from 4.1.0 to 4.2.2 (#12495) 2025-08-26 02:28:10 -07:00
Ali Afsharzadeh
7d79f17b12 Fix duplicate dict key warning in bootstrap_os task includes (#12488)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-08-26 01:32:11 -07:00
wangsifei99
f973deb95f fix netcheck_etcd_image_tag (#12402)
Signed-off-by: wangsifei99 <wangsifei@kylinos.cn>
2025-08-25 22:49:06 -07:00
Ali Afsharzadeh
4a4201c84d Remove ara_default from callbacks_enabled (#12490)
The option ara_default was still present in ansible.cfg under callbacks_enabled.
This is a leftover from commit b9e9364 ("Remove ara support in CI") and should
have been removed together with the rest of the ara integration.

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-08-24 22:49:06 -07:00
Mohamed Omar Zaian
80e0ad0fac [feat] Update metrics server to v0.8.0 (#12493) 2025-08-22 21:07:05 -07:00
Ali Afsharzadeh
303dd1cbc1 Enable reserved variable name checks and fix violations (#12463)
* Enable reserved variable name checks and fix violations

Updated .ansible-lint configuration to skip only var-naming[pattern]
and var-naming[no-role-prefix] instead of skipping the entire var-naming rule.
This enables the check for reserved variable names.

Renamed variables that used reserved names to avoid conflicts.
Updated all references in tasks, variables, and templates.

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

* Rename namespace variable inside tasks instead of deleting it

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

* Change hosts variable to vm_hosts

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

* Use k8s_namespace instead of dashboard_namespace in dashboard.yml.j2 template

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

---------

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-08-21 00:47:07 -07:00
Kubernetes Prow Robot
eb4f6d73fb Merge pull request #12441 from tico88612/feat/crds-installation
Feat: add common_crds role and Prometheus Operator CRDs installation
2025-08-19 05:25:37 -07:00
ChengHao Yang
44f511814b Test: add prometheus operator crds install
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-08-19 18:45:33 +08:00
Alejandro Macedo
e2046749ac Fix: Change "empty" definition for PodSecurity Admission configuration (#12439)
Fixes a bug where `kube-apiserver` fails to start if the PodSecurity
configuration file doesn't have the `apiVersion` and `kind` keys.

Signed-off-by: Alejandro Macedo <alex.macedopereira@gmail.com>
2025-08-19 02:57:36 -07:00
Max Gautier
f832271f5c Directly list conntrack modules instead of using a variable (#12475)
The conntrack kernel modules have no reason to be something else than
those two options, so there is no reason to have a variable.
2025-08-18 09:05:13 -07:00
Elias Probst
dc9d3bf39d Fix when expr of conntrack module loading (#12458)
Retrying to load conntrack modules was bound to fail due to the way, the current `when` conditions were utilized.
It was based on the assumption, that in case of success, the registered variable would have an `rc` attribute with the value `0`.
Unfortunately, the `rc` attribute is only present in case of a failure, where it's value is >1.

The result of `community.general.modprobe` in case of success looks like this:
```
{
    "changed": false,
    "msg": "All items completed",
    "results": [
        {
            "ansible_loop_var": "item",
            "changed": false,
            "failed": false,
            "invocation": {
                "module_args": {
                    "name": "nf_conntrack",
                    "params": "",
                    "persistent": "present",
                    "state": "present"
                }
            },
            "item": "nf_conntrack",
            "name": "nf_conntrack",
            "params": "",
            "state": "present"
        }
    ],
    "skipped": false
}
```

While it looks like this in case of a failure:
```
{
    "changed": false,
    "failed": true,
    "msg": "One or more items failed",
    "results": [
        {
            "ansible_loop_var": "item",
            "attempts": 3,
            "changed": false,
            "failed": true,
            "invocation": {
                "module_args": {
                    "name": "nf_conntrack_doesnotexist",
                    "params": "",
                    "persistent": "present",
                    "state": "present"
                }
            },
            "item": "nf_conntrack_doesnotexist",
            "msg": "modprobe: FATAL: Module nf_conntrack_doesnotexist not found in directory /lib/modules/5.14.0-570.32.1.el9_6.x86_64\n",
            "name": "nf_conntrack_doesnotexist",
            "params": "",
            "rc": 1,
            "state": "present",
            "stderr": "modprobe: FATAL: Module nf_conntrack_doesnotexist not found in directory /lib/modules/5.14.0-570.32.1.el9_6.x86_64\n",
            "stderr_lines": [
                "modprobe: FATAL: Module nf_conntrack_doesnotexist not found in directory /lib/modules/5.14.0-570.32.1.el9_6.x86_64"
            ],
            "stdout": "",
            "stdout_lines": []
        }
    ],
    "skipped": false
}
```

By evaluating `failed` instead, this issue can be prevented.
See also:
- https://github.com/kubernetes-sigs/kubespray/issues/11340

Co-authored-by: Max Gautier <mg@max.gautier.name>
2025-08-18 08:17:10 -07:00
Ali Afsharzadeh
7d3e0d4fe5 Simplify group_by logic by moving conditional to when clause (#12469)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-08-18 07:39:11 -07:00
ChengHao Yang
9dca520b33 Feat: add prometheus_operator_crds in common_crds
The Prometheus Operator CRDs are commonly used for monitoring and are
used by some CNIs (such as Cilium). Kubespray can be installed first,
and the subsequent installation of the operator can be handled by the
user (or later extensions).

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-08-18 22:13:15 +08:00
Ali Afsharzadeh
fa22f9e5ab Ensure apt cache is updated before dist-upgrade (#12465)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-08-18 07:13:12 -07:00
Shaleen Bathla
082507cff2 kubelet: conditionalize staticPodPath location (#12433)
Add variable to set kubelet staticPodPath location.
It can be set to empty so that we can choose to disable it for some nodes.
STIG recommendation is to disable it.

Signed-off-by: Shaleen Bathla <shaleenbathla@gmail.com>
Co-authored-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-08-18 06:51:11 -07:00
ChengHao Yang
1e327b4747 Feat: add prometheus_operator_crds download item
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-08-18 21:14:06 +08:00
ChengHao Yang
3ece592b51 Refactor: add common_crds role & migrate gateway_api
Adding commonly used CRDs can be expanded

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-08-18 19:27:25 +08:00
dependabot[bot]
bae7278fa8 build(deps): bump actions/checkout from 4.2.2 to 5.0.0 (#12472)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](11bd71901b...08c6903cd8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.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-08-18 01:41:10 -07:00
ChengHao Yang
cf2332c38f Patch versions updates (#12461)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-17 20:21:08 -07:00
Ali Afsharzadeh
51764b208b Upgrade cilium from 1.17.3 to 1.17.7 (#12470)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
2025-08-16 10:53:07 -07:00
Andrew Peabody
936f9faeaf docs: update OS and firewall (#12464)
* docs: update OS and firewall

* Update setting-up-your-first-cluster.md
2025-08-15 17:17:06 -07:00
Ho Kim
707616178e feat: add support for custom kubeadm pull image repository (#12128)
Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>
2025-08-13 18:03:06 -07:00
Kubernetes Prow Robot
155c1c1531 Merge pull request #12456 from tico88612/feat/debian13
Feat: Debian 13 Trixie support
2025-08-13 00:05:14 -07:00
ChengHao Yang
7f64758592 Fix: Debian 13 system_package not found software-properties-common
Debian Trixie recently removed the package `software-properties-common`,
add the condition not on Debian Trixie.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-08-12 20:29:35 +08:00
ChengHao Yang
4e1205958f Docs: add Debian 13 in README.md
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-08-12 20:29:35 +08:00
ChengHao Yang
2081df24ec CI: add Debian 13 tests
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-08-12 20:29:35 +08:00
ChengHao Yang
7a72031d1e Add Debian 13 kubevirt image
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-08-12 20:29:35 +08:00
ChengHao Yang
622ed15532 Fix the typo in debian12-calico test
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-08-12 20:28:33 +08:00
Aman Shrivastava
b4d3be482f Make control plane health check retries configurable (#12452) 2025-08-11 02:23:07 -07:00
dependabot[bot]
92f57e0811 build(deps): bump cryptography from 45.0.5 to 45.0.6 (#12453)
Bumps [cryptography](https://github.com/pyca/cryptography) from 45.0.5 to 45.0.6.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/45.0.5...45.0.6)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 45.0.6
  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-08-10 22:57:04 -07:00
Clement Phu
6c147dfe3c Add cilium_extra_values to make use of any cilium values (#12375)
fix noqa
2025-08-08 20:29:43 -07:00
ChengHao Yang
502ba663c5 Fix: Convert -backports sources to archive.debian.org for bullseye and older (#12434)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-08-06 20:26:45 -07:00
Aman Shrivastava
5e54fd4da3 add proxy_env to cilium install task for proxy support (#12417) 2025-07-30 00:34:27 -07:00
Ho Kim
f347c12145 feat: add support for coredns_affinity (#11994)
Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>
Co-authored-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-07-27 20:18:27 -07:00
Xuhui Sun
95640819f5 🐛 fix missing cilium_enable_bgp_control_plane config (#12430) 2025-07-26 21:38:26 -07:00
Psycho Mantys
5b1334102b Remove --auth-anonymous if kube_api_anonymous_auth is undefined. (#12353)
Remove --auth-anonymous if kube_api_anonymous_auth in undefined, to avoid
compatibility errors with other arguments of the kube-apiserver, such as
--authentication-config when anonymous field is configured.
2025-07-26 20:20:27 -07:00
ak1ra
96c39ae7fd doc: modify section order, remove redundant section (#12423) 2025-07-25 01:52:38 -07:00
Romain Lalaut
d198b2ca53 playbooks/remove_node.yml: fixes localhost validation task (#12420)
- Add gather_facts: false (no system facts needed for validation)
- Add become: false (no privilege escalation needed on localhost)
2025-07-25 01:52:31 -07:00
dependabot[bot]
9e8bf18aa1 build(deps): bump distlib from 0.3.9 to 0.4.0 (#12415)
Bumps [distlib](https://github.com/pypa/distlib) from 0.3.9 to 0.4.0.
- [Release notes](https://github.com/pypa/distlib/releases)
- [Changelog](https://github.com/pypa/distlib/blob/master/CHANGES.rst)
- [Commits](https://github.com/pypa/distlib/compare/0.3.9...0.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-23 04:48:26 -07:00
Kubernetes Prow Robot
fcaaee537e Merge pull request #12377 from yankay/bump-containerd
feature: support containerd static binary
2025-07-19 05:56:25 -07:00
Kay Yan
97946cfdb7 support containerd static binary
Co-authored-by: Max Gautier <mg@max.gautier.name>
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2025-07-18 04:20:58 +00:00
Kay Yan
72518b4497 bump containerd to 2.1.3, runc to 1.3.0,nerdctl to 2.1.2
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2025-07-18 04:19:35 +00:00
Chad Swenson
18d7a02280 Patch versions updates (#12410)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-17 20:28:24 -07:00
ChengHao Yang
8d275dcb4f Fix: nodelocaldns capabilities usage (#12398)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-07-15 18:54:22 -07:00
vdveldet
ff2179985c Added new checksums for helm_archive_checksums (#12389)
* Added new checksums for helm_archive_checksums

* Changed default helm version
2025-07-15 01:00:23 -07:00
Romain Lalaut
b1cc016cc0 dd external_openstack_lbaas_member_subnet_id variable to external-openstack-cloud-config.j2 (#12267) 2025-07-13 23:58:24 -07:00
wangsifei99
263e8b24cf Fix#12385 cilium typo (#12393)
Signed-off-by: wangsifei99 <wangsifei@kylinos.cn>
2025-07-10 19:19:27 -07:00
mathgaming
ce2ba28dec Fixed syntax error in _bgp_config dict (#12258) 2025-07-10 18:43:27 -07:00
Takuya Murakami
784bf36c66 fix: Use crun in the cri-o distribution and don't use crun role from cri-o role anymore (#12289)
Signed-off-by: Takuya Murakami <murakami_da@nec.com>
2025-07-08 06:37:27 -07:00
Max Gautier
cbdfad8e80 CI: fix broken debugging (#12381) 2025-07-08 04:33:27 -07:00
pando85
d02910c675 Add header configuration in containerd hosts.toml (#12368)
* Add header configuration in containerd hosts.toml

Signed-off-by: Alexander Gil <pando855@gmail.com>

* Disable log output on containerd mirrors settings if required

Signed-off-by: Alexander Gil <pando855@gmail.com>

---------

Signed-off-by: Alexander Gil <pando855@gmail.com>
2025-07-07 23:41:27 -07:00
Chad Swenson
1e523a267c Fix kubeadm upgrade node skipPhases with multiple CP nodes (#12367)
Add 1.32 conditional defaults

Restore support for kubeadm upgrade node --skip-phases < 1.32, apply still needs to be restricted
2025-07-07 11:29:26 -07:00
Max Gautier
15c8a4768d Do not alter etc/hosts (#12382)
This is no longer needed, likely for a long time.
2025-07-07 04:53:26 -07:00
Elias Probst
6ca9f1f731 docs: Ansible Collection 404s (#12376)
* docs: remove obsolete reference to `gen_tags.sh`

`scripts/gen_tags.sh` was removed in 373b952a0c

* docs: fix 404 links

Merge the `Requirements` section with the `Usage` section and just
reference the inventory documentation, which then points to all further
information related to group vars etc.
2025-07-07 03:01:25 -07:00
wangsifei99
3311ceaa7b Fix kubespray reset shouldn't remove /etc/dnsmasq files (#12380)
Signed-off-by: wangsifei99 <2209856191@qq.com>
2025-07-07 00:25:25 -07:00
Max Gautier
6354aa686e Allow vagrant jobs to be triggered manually in Gitlab UI (#12349) 2025-07-06 23:57:25 -07:00
dependabot[bot]
90d5b34eca build(deps): bump cryptography from 45.0.4 to 45.0.5 (#12378)
Bumps [cryptography](https://github.com/pyca/cryptography) from 45.0.4 to 45.0.5.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/45.0.4...45.0.5)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 45.0.5
  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-07-06 23:49:26 -07:00
Kay Yan
7f6db0cbfa add rocky linux 10 image (#12379)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2025-07-06 23:45:26 -07:00
vdveldet
8d7cbe732e Adding proper quotation (#12371)
* Adding proper quotation

* Update file with correct quotes
2025-07-06 02:33:24 -07:00
Dexter
1e5a203ddc Vagrant: Ensure IP Subnet not in use by localhost (#12332)
* feat(subnet): Ensure Vagrant subnet not in use by localhost

This commit ensures that Vagrantfile supplied $subnet is not in use by
the localhost. Previously, if the subnet is in use by localhost (i.e.
bridge network), Vagrant VM boxes can not communicate.

* refactor(socket): Use ruby Socket library to find addrs

This commit reverts the usage of Ruby .scan() which may result in
failure if program is not provided. Instead, this commit refactors to
use Socket library to determine interfaces in use, then proceeds to
compare with Vagrantfile supplied subnets. Additionally, the commit
supports IPv6 comparisons.
2025-07-04 01:15:25 -07:00
Mustafa Mertcan Çam
cde6e815dd Cilium: Pass cluster DNS to hubble.peerService in values.yaml.j2 (#12346)
* cilium: pass cluster DNS to hubble.peerService in values.yaml.j2

* Add dedicated Hubble variable defaulting to inventory cluster domain
2025-07-03 09:37:25 -07:00
ERIK
c1c52002cf Remove unused Calico CNI pool variables (#12369)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2025-07-02 18:43:24 -07:00
Zied Kharrat
5cd3f40cbc Replace deprecated MAINTAINER with OCI-compliant LABEL (#12360) 2025-06-30 17:06:31 -07:00
Aman Shrivastava
f9385ec918 Add argocd_install component to hash update script with checksum entries (#12358) 2025-06-30 07:00:35 -07:00
ERIK
7ead3e2f11 fix(kubeadm): Conditionally add --skip-phases flag for v1.32.0+ (#12351)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2025-06-28 05:12:28 -07:00
Max Gautier
e0018268d6 CI: Add a test for scale.yml (#12285) 2025-06-28 01:16:29 -07:00
Kubernetes Prow Robot
d4cb5da017 Merge pull request #12295 from VannTen/ci/collection
CI: Simplify running playbooks as collection + various CI Fixes
2025-06-27 10:00:33 -07:00
刘旭
62f49822dd fix ETCD_INITIAL_CLUSTER config in etcd.env and etcd-events.env (#12342) 2025-06-27 07:44:29 -07:00
Romain Lalaut
878da9fb16 Argo CD : checksum support for the install url (#12266)
Fixes https://github.com/kubernetes-sigs/kubespray/issues/12223
2025-06-27 07:24:30 -07:00
Max Gautier
f55de03fa6 CI: update sonobuoy url (heptio is now part of VMware)
Suggested-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-27 14:32:21 +02:00
Max Gautier
7b6ff769f0 CI: 020_check_pods -> more readable output
Filter pod to describe / logs only the broken ones.
2025-06-27 14:32:20 +02:00
Max Gautier
e369ac2f24 CI: more readable loop
Avoids putting whole pod spec in loop label
2025-06-27 14:32:19 +02:00
Max Gautier
4a0a73b307 CI: fix check for kube_version 2025-06-27 14:15:11 +02:00
Max Gautier
253fc5ee59 CI: factorize tests into a single playbook
This allows to use kubespray_defaults (once) instead of redefining
defaults in the tests.
Test test files becomes imported tasks rather thand standalone
playbooks.
2025-06-27 14:15:11 +02:00
Max Gautier
bf41d3bfea CI: Simplify running playbooks as collection 2025-06-27 14:15:09 +02:00
Chad Swenson
ede92b0654 Fix calico etcd mode networkpolicy RBAC (#12344) 2025-06-27 04:50:29 -07:00
Takuya Murakami
048967e3b0 feat: Add cilium_install_extra_flags (#12262)
Enable to use --chart-directory options etc for offline installation

Signed-off-by: Takuya Murakami <murakami_da@nec.com>
2025-06-25 05:58:29 -07:00
Kim Hyunyoung, Abel
8cc5897d5c fix: add cilium extraConfig values (#12335) 2025-06-23 23:36:29 -07:00
ChengHao Yang
479e239016 CI: replace kaniko with buildkit (#12305)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-23 00:08:53 -07:00
Chad Swenson
39e0fc64ba Patch versions updates (#12322)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-19 23:10:51 -07:00
Kubernetes Prow Robot
5ed7042808 Merge pull request #11924 from tico88612/bump/ansible-10.7.0
Bump Ansible to 10.7.0 & Deprecate Pre-installed Python 3.7-OS tests
2025-06-19 23:06:51 -07:00
ChengHao Yang
48cc0e1cde CI: add pip install in upgrade job
This will avoid check ansible version failed in upgrade job.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-20 12:18:10 +08:00
ChengHao Yang
854dbef25e Docs: remove unused CI tests information
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-20 12:18:10 +08:00
ChengHao Yang
95998e437b CI: remove OpenSUSE 15.6 tests
Because pre-installed python version is 3.6, which is deprecated by
Ansible 10.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-20 12:18:09 +08:00
ChengHao Yang
fc0206e313 CI: remove RHEL8-related OS tests
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-20 12:18:09 +08:00
ChengHao Yang
26acce9cec Docs: update ansible-core version to 2.17.3
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-20 12:18:09 +08:00
ChengHao Yang
d3c3ccd168 Update ansible_version minimal and maximal version
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-20 12:18:09 +08:00
ChengHao Yang
58e302ec31 Bump ansible to 10.7.0
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-20 12:18:09 +08:00
ChengHao Yang
3cda93405a Cleanup: Ubuntu 20.04 tests (#12301)
* Test: molecule replace ubuntu2004 with ubuntu2204 ubuntu2404

cri-dockerd, adduser and bastion-ssh-config can't run ubuntu2404, maybe needs to check login.

"System is booting up. Unprivileged users are not permitted to log in yet. Please come back later. For technical details, see pam_nologin(8)."

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

* Test: replace ubuntu-2004 with ubuntu-2404

All ubuntu-2004 tests are removed.

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

* Docs: update ci.md

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

* Docs: update README.md

Remove Ubuntu 20.04 support

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

---------

Signed-off-by: ChengHao Yang
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-19 18:54:51 -07:00
Chad Swenson
540cfd1087 Add version pinning for AWS tf provider to fix CI (#12323) 2025-06-19 18:38:51 -07:00
Kubernetes Prow Robot
f58315f69e Merge pull request #12254 from tico88612/fix/cilium-migration
Fix: the cluster is upgraded from 2.27 to 2.28 cilium will break
2025-06-19 18:34:51 -07:00
_xat_
dca2a5ecb3 Skip kube-proxy addon phase during kubeadm upgrade if disabled (#12306) 2025-06-18 03:48:52 -07:00
Max Gautier
85cf0014cd CI: Run vagrant validate on master as well (#12311)
Not really a reason not to, and this actually breaks daily-ci because
some jobs depends on this one so the whole pipeline is invalid if it's
not created.
2025-06-18 02:12:53 -07:00
Kubernetes Prow Robot
170b3dc55d Merge pull request #12302 from VannTen/ci/factorize_molecule_scenario
CI: cleanup and factorization of molecule tests
2025-06-17 10:23:00 -07:00
Max Gautier
50a32acf51 CI: use debug stdout callback everywhere (except pre-commit) 2025-06-17 14:56:16 +02:00
Max Gautier
b372a6f0f3 Fix alternatives runtimes CI
- youki and gvisor molecule tests are now passing
- kata-containers still broken
2025-06-17 14:56:15 +02:00
Max Gautier
5671037b0e Convert alternatives runtimes molecule to ansible verifier 2025-06-17 14:56:14 +02:00
Max Gautier
1ccb3a38a2 Convert cri-dockerd molecule to ansible verifier 2025-06-17 14:56:06 +02:00
Max Gautier
68c4ee23cb Convert CRI-O molecule to ansible verifier 2025-06-17 14:56:04 +02:00
Max Gautier
3f26203ed0 Convert containerd molecule to ansible verifier 2025-06-17 14:56:02 +02:00
Max Gautier
a5ede2a5c7 container-engine: factorize molecule testing infra 2025-06-17 14:56:00 +02:00
Max Gautier
69c4c90634 Factorize dynamic groups into a role 2025-06-17 14:55:59 +02:00
Max Gautier
06d8d48488 Add previous release to the auto update script. (#12312) 2025-06-16 22:53:00 -07:00
dependabot[bot]
9c621970ff build(deps): bump cryptography from 45.0.3 to 45.0.4 (#12317)
Bumps [cryptography](https://github.com/pyca/cryptography) from 45.0.3 to 45.0.4.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/45.0.3...45.0.4)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 45.0.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-06-16 18:39:02 -07:00
dependabot[bot]
7bb9d57dc9 build(deps): bump redhat-plumbers-in-action/advanced-issue-labeler (#12318)
Bumps [redhat-plumbers-in-action/advanced-issue-labeler](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/releases)
- [Commits](39087a4b30...0db433d412)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/advanced-issue-labeler
  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-06-15 20:38:58 -07:00
Max Gautier
f866fd76f8 Patch versions updates (#12313)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-15 20:20:57 -07:00
ChengHao Yang
fa880b6bcc Feat: add nftable mode in calico (#12255)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-15 18:54:58 -07:00
Jay.H
6fc1abba2e fix offline prepare scripts (#11962)
fix offline prepare scripts
2025-06-15 07:28:58 -07:00
Jay.H
1abadd8caa fix manage-offline-container-images.sh get image_id (#11961) 2025-06-15 07:10:57 -07:00
Kubernetes Prow Robot
ad31de4220 Merge pull request #12132 from tico88612/fix/remove-anonymous-kubeadm-validation
Fix: kubeadm secondary use file discovery validation
2025-06-15 05:48:56 -07:00
Max Gautier
144742cbce Use last patch versions by default for etcd/crio/crictl (#12233)
This uses the same logic than the other versions, with simplications for
crictl and crio whose versionning scheme is tied to upstream kubernetes.

Also move some version variables in vars/ rather than defaults/, because
they are not used elsewhere and don't really make sense as modifiable by
the user.
2025-06-14 18:56:55 -07:00
ChengHao Yang
f77aea13e9 Cleanup: kubeadm-config v1beta4 extra args defined conditions (#12307)
* Cleanup: kubeadm-config v1beta4 extra args defined conditions

Some variables have already been defined, so there is no need to
useconditional statements to check whether they have been defined.

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

* Cleanup: cloud-provider extra args

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-14 13:38:56 -07:00
ChengHao Yang
f810e80b6c Bump: external snapshot CRD to v0.15.0 (#12308)
Currently, there is no reliable way to obtain individual CRD files, so
the only solution is to update first.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-14 13:34:56 -07:00
Chad Swenson
b04ceba89b Fix calico CNI timeouts in reset role (#12300)
* Fix an issue with CNI timeouts in reset role

* Consolidate secondary service removal tasks
2025-06-13 02:54:56 -07:00
Max Gautier
f6d29a27fc Remove stale TODOs (#12298)
Upstream consider it working as expected, won't fix
https://github.com/ansible-collections/community.general/issues/7717#issuecomment-2061880929
2025-06-12 20:14:57 -07:00
Kubernetes Prow Robot
28d23ffc3b Merge pull request #12236 from VannTen/cleanup/bootstap+packages
Cleanup of bootstrap and package installation
2025-06-12 07:24:56 -07:00
ChengHao Yang
ac0b0e7d6e Fix: upgrade cluster discovery kubeconfig not found
When installing or upgrading in the past, there was no validation
config. Check if the file exists first to prevent subsequent validation
errors.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-12 10:05:59 +08:00
ChengHao Yang
e618d71f2a Fix: kubeadm secondary use file discovery validation
The validation step is moved to the end to avoid the loss of files that
may lead to verification failure.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-12 10:05:58 +08:00
Kay Yan
cd82ac552b Add CI images for Fedora 41 and Fedora 42 (#12286)
* add CI image fedora-41 and fedora-42

Signed-off-by: Kay Yan <kay.yan@daocloud.io>

* Apply suggestions from code review

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

---------

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
Co-authored-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-10 21:14:54 -07:00
ChengHao Yang
b981e2f740 Replace terraform with opentf (#12291)
Terraform is no longer open source software and has been removed and
replaced with OpenTofu.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-10 06:44:25 -07:00
Kubernetes Prow Robot
739e5e1c6b Merge pull request #12199 from tmurakam/feature/kubernetes-1.33
[kubernetes] Support kubernetes 1.33
2025-06-05 20:20:38 -07:00
ChengHao Yang
1f9020f0b4 Fix: if cilium release exist, the action will set upgrade
`cilium install` is equivalent to `helm install`, it will failed if
cilium relase exist. `cilium version` can know the release exist without
helm binary

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-05 21:14:49 +08:00
ChengHao Yang
7bb9552e94 Fix: add cilium remove old resources option
Give users two options: besides skip Cilium, add
`cilium_remove_old_resources`, default is `false`, when set to `true`,
it will remove the content of the old version, but it will cause the
downtime, need to be careful to use.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-05 21:14:49 +08:00
Slavi Pantaleev
d1bd610049 Fix indentation issue in Cilium values file and ensure booleans are lowercase (#12280)
This patch fixes the indentation in the `encryption` section.
Previously configuration like this:

```yml
cilium_encryption_enabled: true
cilium_encryption_type: wireguard
```

Would template to a `values.yaml` file with indentation that looks like this:

```yml
encryption:
  enabled: True
    type: wireguard
    nodeEncryption: False
```

instead of this:

```yml
encryption:
  enabled: true
  type: wireguard
  nodeEncryption: false
```

This syntax issue causes an error during Cilium installation.

This patch also makes all boolean values in this template file go through the `to_json` filter.
Since values like `True` and `False` are not compliant with the YAML v1.2 spec,
avoiding them is preferable.

`to_json` may be used for all other values in this template to ensure we end up with
a valid YAML document in all cases (even when various strings include special characters),
but this was left for another (future) patch.
2025-06-05 05:48:39 -07:00
Max Gautier
5243b33bd7 Cleanup support for removed OS in bootstrap
- centos < 8
- debian 10
2025-06-05 11:16:25 +02:00
Max Gautier
d5b2a9b5ba opensuse: move package installation to system_packages
No reason to special case
2025-06-05 11:16:24 +02:00
Max Gautier
2152022926 debian-based distro: handle apt update cache when installing packages
The package module pass options to the underlying packages manager
module if they support it. No need to handle it in bootstrap.
2025-06-05 11:16:24 +02:00
Max Gautier
f13b80cac0 ClearLinux: remove special casing
- put package install in system_packages
- docker should be handled by the approriate roles if used as container
  engine
2025-06-05 11:16:23 +02:00
Shuu
a87b86c6d3 Make main_ip cacheable in facts (#12243) 2025-06-05 01:58:38 -07:00
Kubernetes Prow Robot
d287420e8e Merge pull request #11868 from tico88612/test/flatcar-4081
Add Flatcar 4081 CI test
2025-06-05 01:08:43 -07:00
Peter Pan
85b0be144a Fix: check expiry before do breaking renew and container restart actions (#12194)
* Fix: check expiraty before renew

Since certificate renewal and container restarts involve higher risks,
they should be executed with extra caution.

* squash to Fix: check expiraty before renew

* squash to Fix: address more comments from VannTen

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>

---------

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
2025-06-05 01:04:41 -07:00
ChengHao Yang
6f7822d25c [flannel] upgrade to 0.26.7 (#12260)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-05 00:42:53 -07:00
ChengHao Yang
b1fc870750 Add tico88612 as approver (#12281)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-06-04 22:56:42 -07:00
dependabot[bot]
d0e9088976 build(deps): bump cryptography from 45.0.2 to 45.0.3 (#12259)
Bumps [cryptography](https://github.com/pyca/cryptography) from 45.0.2 to 45.0.3.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/45.0.2...45.0.3)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 45.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-06-02 22:50:45 -07:00
Imran Ahmed
ce26f17e9e fix unquoted san cert causing issues with ips (#12256) 2025-06-02 22:50:38 -07:00
Christos Papageorgiou
a9f600ffa2 Import centos bootstrap os task for Alma/Rocky Linux (#12264) 2025-06-02 22:42:38 -07:00
ERIK
3454cd2c69 feat: Support certificate validity period config in kubeadm v1beta4 (#12272)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2025-06-02 20:44:37 -07:00
ChengHao Yang
0d5e18053e Test: remove bin_dir from other tasks move to common_vars.yml
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-29 12:43:38 +08:00
Max Gautier
2fbbf2e1e4 CI/kubevirt: Configure ignition provisioning
Flatcar does not support cloud-init
2025-05-27 23:29:56 +08:00
ant31
3597b8d7fe Kubevirt: use Ignition cloud config 2025-05-27 23:29:55 +08:00
ChengHao Yang
68d8f14f0d Update CI.md document
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-27 23:29:55 +08:00
ChengHao Yang
32675695d7 Add flatcar 4081 CI packet test
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-27 23:29:55 +08:00
Kubernetes Prow Robot
c7c3d2ba95 Merge pull request #12163 from VannTen/cleanup/etcd_inv_sample
Move etcd inventory sample doc to role defaults
2025-05-26 03:16:16 -07:00
Ali Afsharzadeh
c89c34f4d6 Update load balancers versions to Nginx 1.28.0, Haproxy 3.1.7 (#12178) 2025-05-23 20:50:34 -07:00
Max Gautier
92e8ac9de2 Remove tag 'master' (#12228)
* Remove tag master

Following it's deprecation in 4b324cb0f (Rename master to control plane
- non-breaking changes only (#11394), 2024-09-06)

* Add fail fast path when using removed tags

- Used for the master tag, but this could be used for other things in
  the future
2025-05-22 01:20:36 -07:00
Anshuman Agarwala
73b3e9b557 Removed weave support (#12230) 2025-05-22 01:10:36 -07:00
Max Gautier
b79f7d79f0 docs: remove obsolete cgroups variables (#12239)
Those variables are removed since 1bc61c9f3 (Simplify kubelet-config
template, 2023-11-23), removing them from docs as well.
2025-05-21 22:40:35 -07:00
Max Gautier
490dece3bf Cleanup assert after 2.28 (#12245)
Users should have used 2.28 and adapted their inventories now.
2025-05-21 20:28:35 -07:00
Takuya Murakami
c1e3f3120c CI: Use ubuntu-2204 for crio test 2025-05-22 08:59:52 +09:00
Takuya Murakami
16c05338d9 Update cri-o to 1.33.0 for kubernetes 1.33
Use ubuntu 22.04 for molecule test of cri-o,
because crun included in the cri-o does not work on
ubuntu 20.04.
2025-05-22 08:43:03 +09:00
Takuya Murakami
8ad1253b4f [kubernetes] Support kubernetes 1.33.1
- Add checksum entries.
- Set min required version to Kubernetes 1.31.x
- Update supported versions
- Refactor coredns_version
2025-05-21 23:56:47 +09:00
Takuya Murakami
cee065920f fix: The 'AppArmor' feature gate is removed from kubernetes 1.33
Signed-off-by: Takuya Murakami <murakami_da@nec.com>
2025-05-21 23:56:47 +09:00
ChengHao Yang
871941f663 Chore: upgrade galaxy.yml version (#12241)
* Chore: upgrade galaxy.yml version

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

* Docs: upgrade version to v2.28.0

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-21 07:46:35 -07:00
Anshuman Agarwala
63cdf87915 Removed equinix provider (#12229) 2025-05-20 03:53:15 -07:00
Max Gautier
175babc4df Move some approvers to emeritus (#12156)
Thanks for you work !
2025-05-20 03:11:17 -07:00
Ekko
6c5c45b328 Allow stopping ubuntu unattended-upgrades (#12174)
Signed-off-by: Ekko Tu <lihai.tu@daocloud.io>
2025-05-20 01:07:16 -07:00
Kubernetes Prow Robot
019cf2ab42 Merge pull request #12101 from tico88612/refactor/cilium-install
Refactor Cilium CNI installation
2025-05-20 01:01:15 -07:00
dependabot[bot]
571e747689 build(deps): bump cryptography from 44.0.3 to 45.0.2 (#12235)
Bumps [cryptography](https://github.com/pyca/cryptography) from 44.0.3 to 45.0.2.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/44.0.3...45.0.2)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 45.0.2
  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-05-19 07:21:15 -07:00
ChengHao Yang
1266527014 Add cilium cli binary hash before 0.18.3
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:15 +08:00
ChengHao Yang
5e2e63ebe3 Make cilium dnsProxy transparent mode configure
When Cilium is configured to replace kube-proxy, it automatically
enables dnsProxy, which can conflict with nodelocaldns.
2025-05-19 08:48:15 +08:00
ChengHao Yang
db290ca686 Add cilium gateway api support
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:15 +08:00
ChengHao Yang
6619d98682 Add cilium hubble export dynamic content
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:15 +08:00
ChengHao Yang
b771d73fe0 Add cilium hubble export file max backups & size mb
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:15 +08:00
ChengHao Yang
65751e8193 Add cilium operator tolerations default values
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:15 +08:00
ChengHao Yang
4c16fc155f Cilium values k8sServiceHost and k8sServicePort use auto
Signed-off-by: ChengHao Yang
<17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:14 +08:00
ChengHao Yang
dcd3461bce Cilium values use image variables
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:14 +08:00
ChengHao Yang
48f75c2c2b Upgrade Cilium related images
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:14 +08:00
ChengHao Yang
a4b73c09a7 Upgrade cilium version to 1.17.3
Signed-off-by: ChengHao Yang
<17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:14 +08:00
ChengHao Yang
af62570110 Change cilium_kube_proxy_replacement to true for CI tests
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:14 +08:00
ChengHao Yang
bebba47eb4 Change kube_owner to root for cilium CI test
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:14 +08:00
ChengHao Yang
86437730de Use cilium-cli install Cilium
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:14 +08:00
ChengHao Yang
6fe64323db Remove old cilium templates install
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:13 +08:00
ChengHao Yang
1e471d5eeb Upgrade outdated cilium_min_version_required
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-19 08:48:11 +08:00
Max Gautier
3a2862ea19 Move checksums to kubespray_defaults/vars (#12234)
The checksums are not a defaults and are not meant to be changed from
the inventories.

Furthermore, role defaults have a lower priority that hosts facts, which
technically means a rogue hosts could hijack the hashes for its
variables.
2025-05-18 16:13:14 -07:00
Jay.H
8a4f4d13f7 fix manage-offline-container-images.sh create_registry (#11964) 2025-05-17 07:25:13 -07:00
ErmolenkoMaxim
46a0dc9a51 Add support for hubble-export-file-max-backups and max-size-mb variables (#12072)
* feat(cilium): add configurable Hubble export log rotation parameters

- Adds support for `cilium_hubble_export_file_max_backups` and `cilium_hubble_export_file_max_size_mb`
- Applies values only if `cilium_hubble_export_file_path` is defined
- Default values are set in role defaults
- Cleans up template logic by removing unnecessary conditionals

* Fix indentation for hubble export settings

* Fix undefined variable issue with ipwrap in kubeconfig override that caused pre-commit errors

* Update main.yml

rollback
2025-05-17 00:35:13 -07:00
Max Gautier
faae36086c Patch versions updates (#12226)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-16 14:13:14 -07:00
Max Gautier
9c2bdeec63 Decouple etcd defaults in a separate role
This allows us to reuse the defaults in other places without putting
everything in kubespray-defaults.

In that, for kubernetes/control-plane.
2025-05-16 14:51:29 +02:00
ERIK
e4c0c427a3 improve NTP package conflict handling (#12212)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2025-05-16 03:55:14 -07:00
Max Gautier
bca5a4ce3b CI: remove ci-not-authorized job (#12225)
This is now handled directly at the failfast-ci level (== integration
Github <-> Gitlab).
The whole pipeline will not be triggered unless:
- The author is a maintainer
- The PR has the /ok-to-test label
2025-05-16 03:27:13 -07:00
Antoine Legrand
5c07c6e6d3 Add option to [not] install coredns via Kubespray (#12218) 2025-05-16 03:23:13 -07:00
Takuya Murakami
c6dfe22a41 Improve logging of kubeadm init failure of first control plane node (#12216)
Split retry task of 'kubeadm init' to show the failure log of
the first execution.
2025-05-16 03:01:13 -07:00
Seena Fallah
ec85b7e2c9 download: respect enable_dns_autoscaler when enabling dnsautoscaler (#12217)
dnsautoscaler should only be enabled when enable_dns_autoscaler is
set to true. without this, it could be enabled without any manifest
actually using it, which makes it a false signal.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2025-05-15 12:45:13 -07:00
Kubernetes Prow Robot
acd6872c80 Merge pull request #12219 from VannTen/test/ha_etcd_separate
Fix broken workaround for separate etcd setup
2025-05-15 12:39:14 -07:00
Max Gautier
22d3cf9c2b Move 'pretend certificates' **after** cert distribution
The link target will only exist after we distribute the certs on each node.
2025-05-15 18:35:34 +02:00
Max Gautier
2d3bd8686f Add testcase separate ha-etcd
Also use a distinct node to test certificate distribution.
2025-05-15 18:20:13 +02:00
Hyeonki Hong
2c3b6c9199 feat: add trigger to restart kube-apiserver when config files change (#12172)
* feat: add trigger to restart kube-apiserver when config files change

* fix: remove not upgrade_cluster_setup condition

* refactor: streamline kube-apiserver restart notifications
2025-05-15 06:51:14 -07:00
Max Gautier
a55932e1de Patch versions updates (#12204)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-14 18:55:20 -07:00
Max Gautier
973bd2e520 Stop cleaning up containerd packages (#12213)
The switch to not use system packages for containerd packages happened
multiples releases ago ; there should not be any up-to-date installation
of kubespray needing that cleanup.

Remove those steps and variables only used by them.
2025-05-13 21:07:16 -07:00
Kubernetes Prow Robot
ea7331f5fc Merge pull request #12211 from VannTen/cleanup/rename_remove_node
rename-without-hypens: remove-node/pre-remove
2025-05-13 17:13:16 -07:00
Kubernetes Prow Robot
df241800ce Merge pull request #12203 from VannTen/cleanup/rename_bootstrap_os
Rename bootstrap-os to bootstrap_os
2025-05-13 05:03:16 -07:00
Cyclinder
8cc5694580 calico: update calico-kube-controller manifest (#12169) 2025-05-13 01:43:17 -07:00
Max Gautier
1d15baf405 Add compat and deprecation warning for boostrap-os 2025-05-13 09:39:59 +02:00
Max Gautier
47508d5c6e Rename bootstrap-os to bootstrap_os
Role names in ansible collections should not have hyphens.
2025-05-13 09:39:54 +02:00
Max Gautier
2a1ae14275 Compat layer remove-node/pre-remove 2025-05-12 22:22:20 +02:00
Max Gautier
e361def9cd Rename remove-node/pre-remove (no hypens for role in collection) 2025-05-12 22:19:50 +02:00
Max Gautier
fa6888df4c kubernetes_audit: Remove redundant defaults filter (#12208) 2025-05-12 07:23:14 -07:00
Max Gautier
373b952a0c Cleanup CI scripts (#12205)
* Delete unused scripts

- gen_tags.sh: not the right file, produce garbage even if path is fixed
- premoderator.sh: not used since ef6d24a49 (CI require a 'lgtm' or
  'ok-to-test' labels to pass (#11251), 2024-05-31)
- gitlab-branch-cleanup: unused AFAICT

* CI: inline molecule logs

Single use site -> less indirection makes it easier to read.
2025-05-12 05:53:15 -07:00
felipe88alves
9bbd597e20 create cilium_operator_tolerations variable in group_var (#12200)
- This enables ithe override of the tolerations for the cilium-operator deployment
 - default behaviour is to leave the toleration as is unless the var is set
2025-05-12 03:25:15 -07:00
Cheolhui Kim
fceb1516b8 Update: add Cilium LB IP Pool configuration to support ranges (#12140) 2025-05-12 01:39:18 -07:00
Kubernetes Prow Robot
43e19ab281 Merge pull request #12202 from VannTen/cleanup/rename_kubespray_defaults
Rename kubespray-defaults to kubespray_defaults
2025-05-12 01:21:14 -07:00
Max Gautier
4052cd5237 Add compat and deprecation warning for kubespray-defaults 2025-05-12 09:46:07 +02:00
Kim Hyunyoung, Abel
e1be469995 fix: do not mount hubble-ui tls volume when cilium_hubble_tls_generate is false (#12143) 2025-05-11 20:27:14 -07:00
Max Gautier
23d8c9a820 CI: enabled all jobs on daily CI (#12207) 2025-05-11 19:51:14 -07:00
Max Gautier
e618421697 Don't run upgrade-patch jobs on forks (#12206)
With the current github-workflow setup, workflows are triggered on every
forked repository (which is quite wasteful).

Add a condition to only run on the main repository.
2025-05-10 06:15:14 -07:00
Max Gautier
7db2aa1cba Rename kubespray-defaults to kubespray_defaults
Role names in ansible collection should not contains hyphens.
2025-05-10 10:04:37 +02:00
Kubernetes Prow Robot
0c8dfb8e43 Merge pull request #12185 from VannTen/cleanup/iproute_with_the_rest
Move package installation to bootstrap-os
2025-05-09 20:49:14 -07:00
Max Gautier
25e4fa17a8 Split kubespray-defaults (-> network_facts)
kubespray-defaults currently does two things:
- records a number of default variable values (in particular values used
  in several places)
- gather and compose some complex network facts (in particular,
  `fallback_ip` and `no_proxy`

There is no actual reason to couple those two things, and it makes using
defaults more difficult (because computing the network facts is somewhat
expensive, we don't want to do it willy-nilly)

Split the two and adjust import paths as needed.
2025-05-09 21:14:26 +02:00
Max Gautier
bb4b2af02e Drop install of python-libselinux for RHEL family below 8
RHEL 7 and derivates support has been removed from some time, clean up
of leftovers.
2025-05-09 21:14:25 +02:00
ChengHao Yang
27e93ee9f6 Feat: Gateway API early installation (#12189)
The Gateway API needs to be installed first if you want to use Cilium's
Gateway API functionality. The Gateway API is just CRD without any Pod,
Deployment, etc., so I think it can be brought forward to before the CNI
installation.

Signed-off-by: ChengHao Yang
2025-05-09 09:47:14 -07:00
dependabot[bot]
65bcddb9fd build(deps): bump cryptography from 44.0.2 to 44.0.3 (#12190)
Bumps [cryptography](https://github.com/pyca/cryptography) from 44.0.2 to 44.0.3.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/44.0.2...44.0.3)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 44.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-05-09 01:53:14 -07:00
Chad Swenson
76707073c4 Fix indentation on AuthorizationConfiguration task (#12197) 2025-05-09 00:05:19 -07:00
Bas
a104fb6a00 kubedns_version no longer used (#12201)
This variable is documented, but not found in the rest of the sources.
2025-05-09 00:01:14 -07:00
ERIK
1c4b18b089 fix: arm64 checksums for youki and kata-containers (#12173)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2025-05-08 19:05:14 -07:00
Max Gautier
d6d87e9a83 Move cilium_deploy_additionnaly to kubespray-default (#12191)
Instead of using default(false) all over the place, use
kubespray-defaults
2025-05-07 05:05:17 -07:00
Max Gautier
985e4ebb23 Remove versions from inventory sample (#12164)
The recommended usage of kubespray is to use the default versions.
So putting them in inventory/sample is not really very helpful, and
causes:
- churn (keeping the inventory/sample up to date)
- support issues (mismatch between defaults and sample inventory)

Remove all concrete versions from the inventory sample.
2025-05-06 08:43:14 -07:00
Max Gautier
fcc294600c Workaround missing etcd certds on control plane node (#12181) 2025-05-05 01:05:57 -07:00
Max Gautier
9631b5fd44 Move etcd inventory sample doc to role defaults 2025-05-04 21:24:26 +02:00
Max Gautier
a7d681abff Install iputils with other packages 2025-05-04 21:22:49 +02:00
Max Gautier
5867fa1b9f Move back iproute install to system_packages
Packages are now installed before network facts collection, so we can
install iproute with the rest.
2025-05-04 21:22:49 +02:00
Max Gautier
1e79c7b3cb Move package install to bootstrap-os 2025-05-04 21:22:48 +02:00
Max Gautier
34d64d4d04 Remove outdated comment
bootstrap-os does not do anything in sudoers since e2ad6aad5 (bootstrap:
rework role (#4045), 2019-02-11).

So SSH pipelining working is effectively a pre-requisite anyway.
2025-05-04 21:22:48 +02:00
Max Gautier
87726faab4 Move check 'sorted pkgs list to pre-commit'
This is a lint check, which should not live in the playbook itself.
2025-05-04 21:22:47 +02:00
Max Gautier
1b9919547a Split 'offline' assert into their own role
The preinstall assert cover a number of things, many of which depends
only on the inventory, and can be run without any ansible_facts
collected.

Split them off to simplify re-ordering.
2025-05-04 21:22:46 +02:00
Kubernetes Prow Robot
84d96d5195 Merge pull request #12165 from tico88612/fix/failing-test-coredns-autoscaler
Feat: add `dns_autoscaler_affinity` and remove in-place values
2025-05-03 13:17:55 -07:00
ChengHao Yang
1374a97787 Test: ubuntu22-calico-all-in-one-upgrade disable dns autoscaler
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-05-04 00:23:05 +08:00
bin.pan
6f0fc020e8 update containerd.options key name (#12170) 2025-05-02 23:27:55 -07:00
Takuya Murakami
f58a6e2057 docs: Fix offline-environment.md to add 'v' prefix of some versions (#12166)
* docs: Fix offline-environment.md to add 'v' prefix of some versions

Now some version variables (kube_version, etcd_version, etc) don't have 'v' prefix,
so you need to add 'v' prefix to download URLs.

* fix: Fix offline.yml to add 'v' prefix of some versions
2025-05-02 01:57:55 -07:00
Ali Afsharzadeh
09fad4886a Fix path to facts.yml in node facts refresh section (#12177) 2025-05-02 00:39:56 -07:00
Ho Kim
c47711c2f2 fix: correct indent of cpuManagerPolicyOptions (#12123) 2025-05-02 00:27:56 -07:00
Karthik S
a3e6e66204 Etcd Certificates are not generated when adding nodes to an existing cluster with scale.yml (#12120)
* [Issue-12117]-Certificates for the new hosts are not generated during scale.yml

* [Issue-12117]-Certificates for the new hosts are not generated during scale.yml

* [Issue-12117]-Certificates for the new hosts are not generated during scale.yml
2025-05-02 00:03:56 -07:00
ChengHao Yang
2907936c85 Feat: add dns_autoscaler_affinity remove in-place values
Upstream has removed affinity, and fix upgrade failing test.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-04-28 19:18:19 +08:00
ChengHao Yang
71a323039f Fix: kubelet-csr-approver moves to regular application installation (#12141)
This commit fixed the process to ensure that CCM is installed first to
avoid the chicken-and-egg problem.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-04-28 01:27:26 -07:00
ChengHao Yang
5e5e509698 Revert "Update cluster-proportional-autoscaler to v1.9.0 (#11982)" (#12168)
This reverts commit 16841a1fb0.
2025-04-28 01:23:32 -07:00
Takuya Murakami
4a598c1ef3 Make kubernetes 1.32.4 default (#12161) 2025-04-25 01:22:30 -07:00
Aviral Agarwal
1da9f0dec4 Fixed kube-vip to use kube-vip/kube-vip-iptables image instead of kube-vip/kube-vip when lb_fwdmethod or kube_vip_lb_fwdmethod is set to masquerade (#12145) 2025-04-24 15:54:30 -07:00
ShinyaIshitobi
629a690886 fix: Enable NRI for containerd and disable plugin when nri_enabled is false (#12152)
* fix(containerd): always render NRI plugin block with conditional disable flag

* feat: enable Node Resource Interface plugin when using containerd

* fix: remove the

* fix: fix for linter
2025-04-24 01:40:33 -07:00
Mathieu Parent
16841a1fb0 Update cluster-proportional-autoscaler to v1.9.0 (#11982) 2025-04-24 01:32:37 -07:00
ERIK
22c19a40fa feat: Update containerd and nerdctl checksums to latest versions (#12154)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2025-04-24 01:02:31 -07:00
ERIK
8f41a2886d Update version comparison syntax and optimize whitespace (#12146)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2025-04-24 00:56:31 -07:00
Max Gautier
38cea5b866 Patch versions updates (#12119)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-23 21:48:30 -07:00
Ekko
4177289ef6 Fix typo in .gitlab-ci/kubevirt.yml (#12134)
Signed-off-by: Ekko Tu <lihai.tu@daocloud.io>
2025-04-18 03:59:06 -07:00
Kubernetes Prow Robot
4ad9f9b535 Merge pull request #11763 from tico88612/feat/gateway-api-v1.2.1
Refactor Gateway API installation process and bump Gateway API v1.2.1
2025-04-11 08:38:42 -07:00
ChengHao Yang
6f58b33de0 Deprecate gateway_api_experimental_channel
Please use `gateway_api_channel` and set `experimental`.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-04-11 23:04:01 +08:00
ChengHao Yang
9456e792f1 Remove unused Gateway API template
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-04-11 22:57:00 +08:00
ChengHao Yang
7f60dda565 Refactor Gateway API manifests installation process
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-04-11 22:57:00 +08:00
ChengHao Yang
582fe2cbde Add Gateway API download information in kubespray-default
Remove old variables in kubernetes-apps/gateway_api

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-04-11 22:57:00 +08:00
Max Gautier
79fbfdf271 component_hash_update: support calico_crds (#12122)
- add support for "no_arch" downloads: arch-indendendant files such as
  YAML manifests, helm charts, etc.
- wire calico_crds with it.
2025-04-10 02:18:47 -07:00
ChengHao Yang
cfaf397d4a Bump: OpenStack Cloud Controller Manager upgrade to v1.32.0 (#12121)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-04-10 01:44:41 -07:00
Kubernetes Prow Robot
2f404de77c Merge pull request #12037 from VannTen/ci/convert_vagrant_to_kubevirt_2
CI: convert remaining vagrant jobs (except IPv6) to kubevirt + cleanups
2025-04-09 01:16:42 -07:00
Mohammd Reza Mollasalehi
d304966d75 doc: fix a broken link in the Calico documentation (#12108) (#12109) 2025-04-08 06:32:46 -07:00
ChengHao Yang
4ce5510c1a [rbd-provisioner] deprecate outdated application and documentation (#12114)
* Cleanup: deprecate rbd-provisioner application

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

* Docs: remove rbd-provisioner application

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-04-08 06:22:44 -07:00
ChengHao Yang
8032b8281d [cephfs-provisioner] deprecate outdated application and documentation (#12113)
* Cleanup: deprecated CephFS application

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

* Docs: Remove CephFS Application

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-04-08 03:08:39 -07:00
Farshad Asadpour
45ecceb3e1 docs(terraform): update command for destroying infrastructure in README (#12111) 2025-04-08 02:16:39 -07:00
Max Gautier
5a6ef1dafa Timeout on RHEL subscription check (#12115)
subscription-manager status can in some circumstances just never
terminates, with nothing indicating the problem from the Ansible
playbook log.
This makes it difficult to find the hosts misbehaving.

Add a timeout to the subscription checks (defaulting to 3 minutes). This
should be more than enough for normal circumstances while allowing
easier troubleshooting, as the hosts will be FAILED instead of the
playbook just waiting indefinitely.
2025-04-08 01:24:44 -07:00
Max Gautier
0ae9ab36ce CI: Pin github actions for security (#12105)
Dependabot can still upgrade the action version.
2025-04-03 06:22:38 -07:00
Bas
cf48915657 Documenting offline installation with secure files repo and registry. (#11993)
* Add config for addon helm and local_path_provisioner

* Documenting offline installation with secure files_repo

* Documenting offline installation with secure registry
2025-04-03 02:06:37 -07:00
Fredrik Liv
6f74ef17f7 Upcloud: Add possibility to setup cluster using nodes with no public IPs (#11696)
* terraform upcloud: Added possibility to set up nodes with only private IPs

* terraform upcloud: add support for gateway in private zone

* terraform upcloud: split LB proxy protocol config per backend

* terraform upcloud: fix flexible plans

* terraform upcloud: Removed overview of cluster setup

---------

Co-authored-by: davidumea <david.andersson@elastisys.com>
2025-04-01 07:58:42 -07:00
Max Gautier
fe2ab898b8 component_hash_update: remove obsolete todos (#12098) 2025-03-31 15:18:35 -07:00
dependabot[bot]
c8b8567781 build(deps): bump actions/checkout from 3 to 4 (#12089)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-03-31 01:40:34 -07:00
dependabot[bot]
bf86c14d35 build(deps): bump redhat-plumbers-in-action/advanced-issue-labeler (#12090)
Bumps [redhat-plumbers-in-action/advanced-issue-labeler](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler) from 2 to 3.
- [Release notes](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/releases)
- [Commits](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/compare/v2...v3)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/advanced-issue-labeler
  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-03-31 01:14:35 -07:00
dependabot[bot]
e47eb4bc7f build(deps): bump pytest-testinfra from 10.1.1 to 10.2.2 (#12096)
Bumps [pytest-testinfra](https://github.com/pytest-dev/pytest-testinfra) from 10.1.1 to 10.2.2.
- [Release notes](https://github.com/pytest-dev/pytest-testinfra/releases)
- [Changelog](https://github.com/pytest-dev/pytest-testinfra/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-testinfra/compare/10.1.1...10.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-31 01:10:35 -07:00
Max Gautier
5222f48978 auto-update: use a branch prefix rather than suffix (#12097)
This is more in-line with dependabot and similar auto-updaters.

Reduce ci coverage on github action updating (it does not change
kubespray code, no need for testing).
2025-03-31 01:04:36 -07:00
Max Gautier
7b6b7318b2 Remove unused manifest (docs) (#12092)
This file is no longer referenced since e0d67367e (Update installation
doc with vagrant (#8406), 2022-01-11).
2025-03-29 11:26:34 -07:00
Kubernetes Prow Robot
f02d313fee Merge pull request #12093 from VannTen/cleanup/contrib
Cleanup old things in contrib/
2025-03-29 10:16:34 -07:00
Max Gautier
7c9870d15b Remove contrib/mitogen
- the playbook does not work
- the mitogen version is not up to date

This strongly suggests this is not used ; let's drop it.
2025-03-28 09:49:28 +01:00
Max Gautier
c8ea1468d1 Remove unmaintained contrib: kvm-setup 2025-03-28 09:39:30 +01:00
Max Gautier
ad26fe77f5 [contrib] Remove heketi and glusterfs (#12091)
* Remove heketi

Heketi is no longer developed or supported and should not be used
anymore.
Remove the contrib playbook.

* Remove contrib glusterfs

Glusterfs integration with glusterfs is now either deprecated or
unsupported.

Other storage solutions should be preferred.
2025-03-27 15:32:38 -07:00
Max Gautier
aae53a9df5 Add github workflow to auto update hashes daily (#12053) 2025-03-27 14:10:34 -07:00
Farshad Asadpour
1513254622 fix(remove-node): Ensure safety and validation for node removal process (#12085)
This commit enhances the node removal playbook's reliability and safety by implementing the following changes:

1. **Node Validation**: Added a validation step using assert to ensure the `node` variable is defined and contains nodes. If the list is empty or undefined, the playbook fails early, preventing accidental operations on the entire cluster.

2. **Removed Defaulting for Hosts**: Updated tasks to enforce explicit `node` variable input without defaulting to critical groups (e.g., `etcd:k8s_cluster:calico_rr`). By validating `node` beforehand, tasks now solely rely on user-provided input and safely avoid unintended targeting.

3. **Explicit User Confirmation**: Enhanced the confirmation prompt to clarify the scope of the operation. The admin is now required to explicitly confirm node state deletion, ensuring a deliberate decision before proceeding.

These improvements strengthen the reliability and safety of the `remove-node.yml` playbook by eliminating ambiguous behavior, preventing misconfigurations, and ensuring clear interaction during node removal tasks.
2025-03-27 06:10:34 -07:00
Ricky Kwan
4a5b524b98 Ensure metrics port exists for nodelocaldns/nodelocaldns-second daemonsets (#11998)
- update metrics port to use port variable
- unconditionally define ports
2025-03-27 04:14:34 -07:00
Max Gautier
aa0c0851f8 Upgrade kube-router (#12066)
- This happens to fix the fact that kube-router is broken when using the
  service proxy: https://github.com/cloudnativelabs/kube-router/issues/1558
2025-03-26 17:04:38 -07:00
Max Gautier
0fc56ed344 CI: fix terraform
- add default testcase
- fix ansible ssh connection
2025-03-26 20:05:26 +01:00
Max Gautier
5c4e597987 CI: workaround build: disable rebase 2025-03-26 20:05:25 +01:00
Max Gautier
ef133fd93d CI: cleanups leftovers things
include_vars is redundant as the file is already included by extra_vars
2025-03-26 20:05:25 +01:00
Max Gautier
f6ca3bf477 CI: simplify image build job 2025-03-26 20:05:24 +01:00
Max Gautier
b9e251ac7a CI: cleanup terraform + deduplicate and simplify 2025-03-26 20:05:23 +01:00
Max Gautier
43fceebdd3 CI: convert vagrant jobs to kubevirt
Vagrant jobs needs a big cache which makes them slow / sometimes stuck
completely. Using the kubevirt provisionning playbook is now
significantly faster, so do just that.

Having only one provisionner in CI will also allows us to remove some of
the custom runners executors we use for vagrant, and more generally
reduce the CI maintenance.

Our kubevirt CI platform does not support ivp6 yet, so we keep the
relevant jobs in vagrant, but we'll migrate them as well as soon as
possible.
2025-03-26 20:05:21 +01:00
Max Gautier
862aec4dc6 CI: remove 'packet' from jobs name + rename to kubevirt
This is more accurate, the name 'packet' being an aterfact of history
(the Kubevirt jobs used to run on Packet, the previous name of Equinix)
2025-03-26 14:32:26 +01:00
Max Gautier
4f3b214ef5 CI: streamline packet jobs definition
- Take advantage of `parallel:matrix` to make the jobs definition shorter
  and more readable.
- Remove helper scripts which are no longer needed
- Remove redundant indirection in the gitlab-ci pipelines definitions
  (only one user)
2025-03-26 14:32:24 +01:00
ERIK
a4843eaf5e fix: missing 'v' prefix in offline image tags (#12086)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2025-03-26 06:26:34 -07:00
Kay Yan
0f9f9fb569 support kube-proxy nftables (#12060)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2025-03-26 01:32:33 -07:00
Farshad Asadpour
e7c70d6169 fix(ingress-nginx): Upgrade ingress-nginx to v1.12.1 and webhook certgen image to v1.5.2 (#12075)
This commit upgrades ingress-nginx to version v1.12.1, addressing multiple critical vulnerabilities including CVE-2025-1974, CVE-2025-1097, CVE-2025-1098, CVE-2025-24513, and CVE-2025-24514 as detailed in the ingress-nginx release notes: https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.12.1

Important Notes:
- Fixing CVE-2025-1974 required disabling validation of the generated NGINX configuration during validation of Ingress resources. Invalid Ingress resources may stop the NGINX configuration from being updated.
- Recommended mitigations include enabling annotation validation and disabling snippet annotations.

Alongside this upgrade, the `ingress_nginx_kube_webhook_certgen_image_tag` has been updated to v1.5.2 for compatibility, based on: https://github.com/kubernetes/ingress-nginx/pull/13066

Changelog:
- Updated ingress-nginx version to v1.12.1 in Kubespray.
- Updated `ingress_nginx_kube_webhook_certgen_image_tag` in `roles/kubespray-defaults/defaults/main/download.yml` to v1.5.2.

Fixes: https://github.com/kubernetes-sigs/kubespray/issues/12073
2025-03-25 09:10:38 -07:00
Max Gautier
cd9c21b7d6 CI: fix wrong git config env variables (#12079) 2025-03-25 05:48:39 -07:00
ChengHao Yang
36cd894d58 Bump Docker default version to 28.0 (#12070)
* Cleanup: unsupport docker version

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

* Cleanup: unsupport OS rhel7

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

* Feat: upgrade docker package

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

* Docs: update rhel docker link

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

* Feat: upgrade docker version

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

* Docs: update docker version

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-03-25 04:38:32 -07:00
Kay Yan
b38312d007 Upgrade CI for openSuse 15.6 (#12074)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2025-03-25 03:52:33 -07:00
Ekko
f3682d85d3 Update calico crd archive checksum (#12077)
Signed-off-by: Ekko <lihai.tu@daocloud.io>
2025-03-25 03:10:32 -07:00
Takuya Ono
3ace8963b1 docs: fix path in vagrant.md example (#12067) 2025-03-24 08:18:34 -07:00
Chad Swenson
b551fe083d Refactor control plane upgrades with reconfiguration support (#12015)
* Refactor control plane upgrades with reconfiguration support

Adds revised support for:
- The previously removed `--config` argument for `kubeadm upgrade apply`
- Changes to `ClusterConfiguration` as part of the `upgrade-cluster.yml` playbook lifecycle
- kubeadm-config `v1beta4` `UpgradeConfiguration` for the `kubeadm upgrade apply` command: [UpgradeConfiguration v1beta4](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/#kubeadm-k8s-io-v1beta4-UpgradeConfiguration).

* Add kubeadm upgrade node support

Per discussion:
- Use `kubeadm upgrade node` on secondary control plane upgrades
- Add support for UpgradeConfiguration.node in kubeadm-config.v1beta4
- Remove redundant `allowRCUpgrades` config
- Revert from `block` for first and secondary control plane back to unblocked tasks since they no longer share much code and it's more readable this way

* Add kubelet and kube-proxy reconfiguration to upgrades

* Fix task to use `kubeadm init phase etcd local`

* Rebase with changes from "Adapt checksums and versions to new hashes updater" PR

* Add `imagePullPolicy` and `imagePullSerial` to kubeadm-config v1beta4 `InitConfiguration.nodeRegistration`
2025-03-21 10:28:31 -07:00
diguage
ae583e2a28 registry support Mac (#11960) 2025-03-21 09:04:39 -07:00
lucianvlad
247b45bca6 fix issue with floating-ip (#11950) 2025-03-21 09:04:32 -07:00
Mathieu Parent
c20388dbbb fix: ensure CoreDNS is kept disabled on kubeadm upgrade (#12028)
See https://github.com/kubernetes/kubernetes/pull/129429
in kubernetes 1.32.1
2025-03-21 09:00:31 -07:00
Chad Swenson
d5a5e6a93c Ensure correct AuthorizationConfiguration API version during upgrades (#12058)
* Ensure correct `AuthorizationConfiguration` API version during upgrades

Fixes an issue where the wrong AuthorizationConfiguration API version could be used by kube-apiserver prematurely during upgrades.

The `kubernets/control-plane` role writes configuration for the target version before control plane pods are upgraded.

However, since the `AuthorizationConfiguration` file is reconciled continuously, this leads to a race condition where a new configuration version can be reconciled before kube-apiserver is upgraded to the compatible version.

This solution ensures the correct configuration is available throughout the process by writing each api version to a different file path. Unused file versions are cleaned up post-upgrade for better hygiene.

* Avoid from_json in cleanup task
2025-03-21 08:48:31 -07:00
Farshad Asadpour
bab6a9bf64 [argocd] Bump ArgoCD version to 2.14.5 (#12041)
According to the official ArgoCD documentation, version 2.14.5 is required
for compatibility with Kubernetes version 1.31

Reference: https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/\#tested-versions

docs(argocd): update version references in documentation and configuration
2025-03-21 05:44:31 -07:00
dependabot[bot]
f70ace5300 build(deps): bump cryptography from 44.0.1 to 44.0.2 (#12004)
Bumps [cryptography](https://github.com/pyca/cryptography) from 44.0.1 to 44.0.2.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/44.0.1...44.0.2)

---
updated-dependencies:
- dependency-name: cryptography
  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-03-21 01:30:33 -07:00
Max Gautier
c00fc9f221 Check separately for 'v'-prefixed versions for ones which are derived (#12057)
The versions which are by default derived from `kube_version` can break
the assert if kube_version start with `v`, because they use the start of
`kube_version` as dict key.
By putting them in their own assert, the first assert should trigger on
`kube_version`, with a more explicit error.
2025-03-20 02:36:31 -07:00
Aman Shrivastava
5abaf8cdf4 added dropdown in OS field of the bug-report issue form and github workflow to auto lable (#11880) 2025-03-19 01:36:30 -07:00
Kubernetes Prow Robot
02438442b9 Merge pull request #12050 from VannTen/cleanup/next_version_auto
Auto compute previous tag in CI
2025-03-18 03:09:50 -07:00
Max Gautier
03b40e71a3 Cleanup unneeded vagrant python packages from test deps (#12051) 2025-03-18 02:19:50 -07:00
Max Gautier
e0920b33d7 vagrant: allow to config vagrant with separate etcd (#12045)
This should help test separate etcd configuration locally more easily.
2025-03-18 02:15:49 -07:00
Ekko
56d37da105 Bump kube patch versions (#12052)
Signed-off-by: ekko <lihai.tu@daocloud.io>
2025-03-18 02:05:49 -07:00
Max Gautier
fffc1b4ac0 CI: remove KUBESPRAY_VERSION 2025-03-17 18:13:11 +01:00
Max Gautier
c79b3ce46b CI: convert galaxy version check to pre-commit + autodetect 2025-03-17 18:13:10 +01:00
Max Gautier
0c59cc84dd CI: simplify rebase.sh
With the base ref (aka: target branch) available, we don't need to guess
stuff from the branch name
2025-03-17 18:13:09 +01:00
Max Gautier
16b090c5ff CI: cleanup leftover files (#12040) 2025-03-16 20:05:47 -07:00
Not Darko
9e861cf816 [calico] fix: kubecontrollersconfigurations list permission (#12035)
[WARNING][1] kube-controllers/runconfig.go 193: unable to list KubeControllersConfiguration(default) error=connection is unauthorized: kubecontrollersconfigurations.crd.projectcalico.org "default" is forbidden: User "system:serviceaccount:kube-system:calico-kube-controllers" cannot list resource "kubecontrollersconfigurations" in API group "crd.projectcalico.org" at the cluster scope
2025-03-15 05:39:48 -07:00
Fredrik Liv
04a8adb17a Upcloud: Added support for routers and gateways (#11386)
* Upcloud: Added support for routers and gateways

* Upcloud: Added ipsec properties for UpCloud gateway VPN

* Upcloud: Added support for deprecated network field for loadbalancers
2025-03-15 02:05:46 -07:00
Kubernetes Prow Robot
986f461ef1 Merge pull request #12026 from VannTen/ci/convert_vagrant_to_kubevirt
CI: use kubevirt for molecule provisionning instead of vagrant
2025-03-13 08:57:48 -07:00
Max Gautier
96aadc3614 CI: only define mode in tests if needeed (#12030)
All tests have a mode actually, so changing the default is no big deal
(and makes more sense to have `default` as the default
2025-03-13 03:47:46 -07:00
Max Gautier
0efb415ec6 CI: molecule fixes
- use become: true when running bootstrap-os in molecule
- match host name in bastion-ssh-config to not confuse the provisionner
2025-03-13 10:14:49 +01:00
Max Gautier
71ae3c78e2 CI: ensure kubevirt VMs are available as part of provisionning
Allow to use the provisionning playbook from multiples users without
duplicating the ssh check.
2025-03-13 10:14:49 +01:00
Max Gautier
315313dd10 CI: convert molecule jobs to parallel:matrix
With the new provisionning using kubevirt this should be faster.
2025-03-13 10:14:48 +01:00
Max Gautier
f70c33d71a CI: convert molecule provisioning to kubevirt
Includes some change of OS version when the vagrant boxes were old ones
(Debian 10)
2025-03-13 10:14:48 +01:00
Max Gautier
ac4c41e4e6 CI: use OS name in VMs
Allows an easier log reading on multi-OS test runs (such as molecule
tests)
2025-03-13 10:14:47 +01:00
Max Gautier
611f645907 CI: Generate ssh key pair on the fly
There is litte reason to share an ssh key common to all CI jobs, so
generate one for each on the fly.

Also use plain-text cloud-init config instead of base64 for readability
2025-03-13 10:14:46 +01:00
Max Gautier
e4905f1d1d CI: convert molecule jobs to kubevirt 2025-03-13 10:14:46 +01:00
Max Gautier
acc843a5fa CI: convert containerd molecule to use kubevirt provisionning 2025-03-13 10:14:45 +01:00
Max Gautier
e62bbe0c76 CI: adapt packet-ci role to act as a molecule provisioner
To work with molecule, we need to use the name provided by molecule_yml
in inventory.

Inject the name in the VirtualMachineInstance (with a default to handle
non-molecule scenario) and get it back as part of inventory).

Account for no ansible groups
2025-03-13 10:14:45 +01:00
Max Gautier
d0f91adde4 CI: allow cluster layout to be fully defined by individual test 2025-03-13 10:14:44 +01:00
Max Gautier
a8d494fb95 CI/kubevirt: allow every vars in kubevirt template to be overriden
The current templating of kubevirt VirtualMachine relies on global
ansible variables, except for the group the nodes are meant to be in.

In order to have more flexibility (in particular, mixed OS cluster for
instances), expect now an abitrary  dict to be passed to the template ;
this allows to embed directly in the nodes definition any variable used
by the template.
2025-03-13 10:14:44 +01:00
Max Gautier
119fa5b0c0 CI: Remove cruft
Remove unused variables, and intermediary ones.
2025-03-13 10:14:43 +01:00
peterw
c8d75effcb cilium 1.17: fix etcd trusted-ca-file config var (#11986) 2025-03-10 21:19:46 -07:00
fullstackjam
aa6aa1522b Fix syntax error in k8s-net-cilium.yml (#12023) 2025-03-10 20:25:46 -07:00
Max Gautier
e2d86c3413 Update patch versions: cri-o, cri-dockerd, gvisor, etcd, cilium-cli, cni (#12024) 2025-03-10 20:05:45 -07:00
Max Gautier
7de9350c07 Remove download_hash.sh (#12025)
The script is obsoleted by 5d7236ea5 (Merge pull request #11890 from
VannTen/download_graphql_checksums_2, 2025-03-09), since the format of
checksums is no longer compatible.
2025-03-10 03:25:46 -07:00
Kubernetes Prow Robot
5d7236ea5f Merge pull request #11890 from VannTen/download_graphql_checksums_2
Adapt checksums and versions to new hashes updater
2025-03-09 20:19:45 -07:00
ChengHao Yang
7c611890c3 Fix: CRI-O default capabilities follow with the upstream (#12018)
* Fix: CRI-O default capabilities follow with the upstream

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

* Docs: CRI-O default capabilities follow with upstream

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-03-05 23:55:50 -08:00
Ekko
6d4714b66e Make main_access_ip cacheable in facts (#12020)
Signed-off-by: ekko <lihai.tu@daocloud.io>
2025-03-05 23:51:46 -08:00
Max Gautier
299178e587 Update README.md with v-less versions
Also small spacing fix.
2025-03-05 16:19:52 +01:00
Max Gautier
fec663a27a Assert that versions have been stripped of leading 'v'
Only check version that we previously prefixed with 'v'.
This commit should be reverted as soon as 2.28 is released.
2025-03-05 16:18:39 +01:00
Max Gautier
f9a263090a Propagate v-less version everywhere 2025-03-05 16:18:39 +01:00
Max Gautier
800c84dcc9 download: use full hash form (including hash alg)
Allow the use of different hashes, as support by the get_url
Ansible module.
Change the variable name accordingly to 'checksum' since it's not
exclusively sha256 anymore.
2025-03-05 16:18:38 +01:00
Max Gautier
f6ae46c9d8 download: remove 'v' version prefix from defaults
also remove the version key in all dict in downloads since it's not used
anywhere.
2025-03-05 16:18:37 +01:00
Max Gautier
8467724aab checksums: use full gvisor version
The versions are nearly all .0 because of the gvisor release scheme.
This means they need to be quoted in yaml to be considered strings.
Special casing by removing the .0 make tooling more complicated, and it
does not gain us anything apart from a nicer looking file (I guess).

So just use the version of upstream gvisor and quote it.
2025-03-05 16:18:37 +01:00
Max Gautier
12270243f5 checksums: Use full hash form (including hash algo as prefix) 2025-03-05 16:18:33 +01:00
Max Gautier
977e41ac5e checksums: remove v from versions 2025-03-05 16:17:29 +01:00
Max Gautier
359467b525 checksums: remove checksums with value == 0
With the refactored script, this would try to download those releases
each time.
2025-03-05 16:16:07 +01:00
Mohamed Omar Zaian
8f4b7f9f5d [containerd] Make containerd v2.0.3, update hashes for other releases (#12011) 2025-03-04 11:59:44 -08:00
Mohamed Omar Zaian
95f059d2c1 [calico] Make calico v3.29.2, update hashes for other releases (#12012) 2025-03-04 11:55:44 -08:00
Jean-Vincent kassi
358bacf7ea Add crio_default_capabilities variables and documentation (#11989) 2025-03-04 04:09:42 -08:00
Mohamed Omar Zaian
0632f23a63 Make kubernetes 1.32.2 default (#12003) 2025-03-03 04:53:15 -08:00
Max Gautier
a665b43854 CI: Put pre-commit cache under CI_PROJECT_DIR (#11929)
* CI: Put pre-commit cache under CI_PROJECT_DIR

Apparently gitlab-runner can't cache stuff outside of the project
directory.

Put the cache under CI_PROJECT_DIR to make it work (which also means we
need to ignore it from ansible-lint).

Also update the pre-commit image while we're at it.

Link: https://gitlab.com/gitlab-org/gitlab/-/issues/14151

* update ansible-lint pre-commit
2025-03-03 01:30:58 -08:00
Mathieu Parent
7590d95976 Bump node-local-dns (k8s-dns-node-cache) image (#11981) 2025-03-02 19:34:56 -08:00
Chad Swenson
87f7363e46 kubeadm config validate flag for debugging and development (#12001)
This adds a new flag with default `kubeadm_config_validate_enabled: true` to use when debugging features and enhancements affected by the `kubeadm config validate command`.

This new flag should be set to `false` only for development and testing scenarios where validation is expected to fail (pre-release Kubernetes versions, etc).

While working with development and test versions of Kubernetes and Kubespray, I found this option very useful.
2025-03-02 18:50:57 -08:00
Mathieu Parent
1b2e66cd30 Update kube-vip to v0.8.9 (#11983) 2025-02-27 22:00:27 -08:00
ERIK
768fbeff0b update etcd snapshot count (#11997)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2025-02-27 01:30:32 -08:00
Antoine Legrand
7d21a54dc7 Remove amazon-linux2 from CI: issue with vm creation (#11995) 2025-02-26 05:42:30 -08:00
Loong Dai
e0a141ab12 README: add docker run (#11967)
* README: add docker run

Signed-off-by: Loong <long0dai@foxmail.com>

* Update README.md

Co-authored-by: Robert Neumann <r0b2g1t@users.noreply.github.com>

* Update README.md

Co-authored-by: Robert Neumann <r0b2g1t@users.noreply.github.com>

---------

Signed-off-by: Loong <long0dai@foxmail.com>
Co-authored-by: Robert Neumann <r0b2g1t@users.noreply.github.com>
2025-02-23 04:14:27 -08:00
A_tian
e332375293 Fix uncached_hosts syntax error (#11985)
* Fix uncached_hosts syntax error

Signed-off-by: panyintian.fu <1416297674@qq.com>

* Update roles/kubernetes/preinstall/tasks/0040-verify-settings.yml

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

---------

Signed-off-by: panyintian.fu <1416297674@qq.com>
Co-authored-by: Antoine Legrand <2t.antoine@gmail.com>
Co-authored-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-02-21 12:38:27 -08:00
Ekko
a60ec1dbde Fix architecture identifier of kata containers download url (#11975)
Signed-off-by: ekko <lihai.tu@daocloud.io>
2025-02-19 00:04:26 -08:00
Ekko
31c470137f Fix containerd 2.x configuration (#11963)
Signed-off-by: ekko <lihai.tu@daocloud.io>
2025-02-17 21:42:11 -08:00
dependabot[bot]
011e839f52 build(deps): bump cryptography from 44.0.0 to 44.0.1 (#11971)
Bumps [cryptography](https://github.com/pyca/cryptography) from 44.0.0 to 44.0.1.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/44.0.0...44.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  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-02-17 18:38:12 -08:00
Jan Breitkopf
d7962fb46e fix quotations in dhclient hooks (#11946) 2025-02-15 04:16:20 -08:00
Moritz Graf
dbb9900085 Update main.yml (#11943)
Adding single quotees around parameters in crictl.
2025-02-14 07:56:24 -08:00
Max Gautier
e24216bedc Automatically derive defaults versions from checksums (#11906)
* Automatically derive defaults versions from checksums

Currently, when updating checksums, we manually update the default
versions.
However, AFAICT, for all components where we have checksums, we're using
the newest version out of those checksums.

Codify this in the `_version` defaults variables definition to make the
process automatic and reduce manual steps (as well as  the diff size
during reviews).

We assume the versions are sorted, with newest first. This should be
guaranteed by the pre-commit hooks.

* Validate checksums are ordered by versions, newest first

* Generalize render-readme-versions hook for other static files

The pre-commit hook introduced a142f40e2 (Update versions in README.md
with pre-commit, 2025-01-21) allow to update our README with new
versions.
It turns out other "static" files (== which don't interpret Ansible
variables) also use the default version (in that case, our Dockefiles,
but there might be others)
The Dockerfile breaks if the variable they use (`kube_version`) is a
Jinja template.

For helping with automatic version upgrade, generalize the hook to deal
with other static files, and make a template out of the Dockerfile.

* Dockerfile: template kube_version with pre-commit instead of runtime

* Validate all versions/checksums are strings in pre-commit

All the ansible/python tooling for version is for version strings. YAML
unhelpfully consider some stuff as number, so enforce this.

* Stringify checksums versions
2025-02-14 00:28:21 -08:00
Boris
a51e7dd07d refact ip stack (#11953) 2025-02-11 03:37:58 -08:00
Bas
c557adf911 bugfix (#11959) 2025-02-08 03:01:55 -08:00
Ali Afsharzadeh
d10a2cd4c6 Update load balancers versions to Nginx 1.27, Haproxy 3.1 (#11928) 2025-02-07 19:11:57 -08:00
Raul Butuc
cfad1bd420 Fix incorrect syntax for secondary nodelocaldns manifest (#11952)
* Fix incorrect syntax

* Fix incorrect syntax
2025-02-07 07:09:55 -08:00
Kay Yan
08b77b5350 Fix CI by exclude the .ansible in .ansible-lint & remove ctr image pull workaround (#11948)
* exclude .ansible in ansible-lint

* remote ctr i pull workdaround

Signed-off-by: Kay Yan <kay.yan@daocloud.io>

---------

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2025-02-06 03:53:56 -08:00
Mohamed Omar Zaian
fe0a1f4e42 Bump nerdctl to v2.0.3 (#11913) 2025-02-05 00:50:16 -08:00
Mohamed Omar Zaian
624937d137 [containerd] Support containerd v2.0.x (#11845) 2025-02-04 23:32:15 -08:00
Antoine Legrand
4373c1be1d Revert "Add support for ipv6 only cluster via "enable_ipv6only_stack_networks…" (#11941)
This reverts commit 76c0a3aa75.
2025-02-03 07:06:58 -08:00
Bas
59e1638ae1 Bugfix/11936 - backup: "{{ leave_etc_backup_files }}" (#11937)
* Adding the var: leave_etc_backup_files

* Fix for #11936 - backup: "{{ leave_etc_backup_files }}"
2025-01-30 06:19:23 -08:00
dependabot[bot]
6af849089e build(deps): bump the molecule group with 2 updates (#11933)
Bumps the molecule group with 2 updates: [molecule](https://github.com/ansible-community/molecule) and [molecule-plugins[vagrant]](https://github.com/ansible-community/molecule-plugins).


Updates `molecule` from 24.12.0 to 25.1.0
- [Release notes](https://github.com/ansible-community/molecule/releases)
- [Commits](https://github.com/ansible-community/molecule/compare/v24.12.0...v25.1.0)

Updates `molecule-plugins[vagrant]` from 23.6.0 to 23.7.0
- [Release notes](https://github.com/ansible-community/molecule-plugins/releases)
- [Commits](https://github.com/ansible-community/molecule-plugins/compare/v23.6.0...v23.7.0)

---
updated-dependencies:
- dependency-name: molecule
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: molecule
- dependency-name: molecule-plugins[vagrant]
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: molecule
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 07:05:26 -08:00
Arthur Outhenin-Chalandre
46e1fbcdd9 dependabot: add group for molecule (#11927)
Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
2025-01-28 00:59:23 -08:00
Max Gautier
1567e8ee6c Add timestamp to kaniko builds (#11923)
The build steps at the start of CI takes about 2 minutes; now that we
have greatly reduced the overall duration, this is not an insignificant
impact.

Add timestamps to the build process to see measure which steps of the
image build take the most time.
2025-01-27 06:17:23 -08:00
Boris
76c0a3aa75 Add support for ipv6 only cluster via "enable_ipv6only_stack_networks" (#11831) 2025-01-27 04:15:22 -08:00
Qasim Mehmood
e107022b4b Publish the ingress-nginx service address if manual address not defined and not using host network (#11879) 2025-01-24 00:47:21 -08:00
Anshuman Agarwala
ebcf9c3fff Updated sample in inventory (#11895)
* Updated sample in inventory

* Review changes
2025-01-23 21:39:21 -08:00
Max Gautier
d23c1464c9 Remove krew support (#11824)
* Remove krew installation support

Krew is fundamentally to install kubectl plugins, which are eminently a
client side things.
It's also not difficult to install on a client machine.

* Remove krew cleanup
2025-01-23 20:45:21 -08:00
Kubernetes Prow Robot
cbd0b7bbc3 Merge pull request #11901 from VannTen/cleanup/verify_settings
Cleanup of preinstall assertions
2025-01-23 08:40:58 -08:00
Max Gautier
67a73764e4 Remove deprecation checks admission plugins list
This assertion is present since 2022, users inventories' should be clean
from it now.
2025-01-23 14:32:43 +01:00
Max Gautier
fba31beb07 Remove containerd_config assert
This assert is present since 2021, we can assume now users have removed
it from their inventories.
2025-01-23 14:32:43 +01:00
Max Gautier
775361206c Drop compatibility for etcd_kubeadm_enabled
This has been deprecated for a long time, time to pull the plug.
We leave an assert for one release to have a straightforward failure if
some users were still using the variable.
2025-01-23 14:32:42 +01:00
Max Gautier
12a2c5eaa8 verify_settings: consolidate choices validation 2025-01-23 14:32:42 +01:00
Max Gautier
ed789c9b97 etcd_kubeadm simplify assert 2025-01-23 14:32:41 +01:00
Max Gautier
85d9e3e2ae Don't check address space when using 'none' network plugin
Since 'none' can be, for instance, a manual calico deployment, don't
check whether there is enough ip for pods on a node, because the plugin
can use another mechanism than the podCIDR to allocate IPs.
2025-01-23 14:32:40 +01:00
Max Gautier
98cdb5348c verify settings: fix etcd assertion when implicity etcd group
When the etcd group is not specified we assume it's kube_control_plane.
In that case, etcd still can't be even, so instead of only checking the
etcd group we need to default to kube_control_plane
2025-01-23 14:30:28 +01:00
Max Gautier
f53552e56b verify_settings: Consolidate assert loop in one task 2025-01-23 14:30:26 +01:00
Max Gautier
277ab7339a verify_settings: fix bad task name + remove redundant conditions 2025-01-23 14:29:48 +01:00
Max Gautier
191f71afea Drop explicit k8s_cluster group in CI inventory (#11858)
This removes compatibility with releases below 2.27.0, now that it has
been released and that we're testing upgrades against it.
2025-01-23 02:34:58 -08:00
Max Gautier
bfe858ba06 CI: cleanup dependencies, pre-commit autoupdate (#11904)
ansible-lint and yamllint are run as pre-commit hooks, which are
installed by pre-commit directly. So there is no need to put them in
tests/requirements.txt.

So remove them and make it leaner.
2025-01-23 01:56:59 -08:00
Max Gautier
f8c4d5a899 Fix: hide 'ansible managed' balises in README.md (#11919)
[//]: -> apparently does not work for hiding on Github markdown
2025-01-23 01:34:58 -08:00
c-romeo
9008c40d0e fix Calico typha deployment issue: #11916 (#11917) 2025-01-23 01:05:01 -08:00
Kubernetes Prow Robot
5a7e1be070 Merge pull request #11905 from VannTen/feat/readme_template_version
Update README.md versions automatically in pre-commit
2025-01-22 19:42:37 -08:00
Max Gautier
2a7b50a016 calico: don't set calico-node cpu limits by default (#11914)
Upstream calico isn't doing that, and:
- this can cause throttling
- the cpu needed by calico is very cluster / workload dependent
- missing cpu limits will not starve other pods (unlike missing memory
  requests), because the kernel scheduler will still gives priority to
  other process in pods not exceeding their requests
2025-01-22 19:24:36 -08:00
Max Gautier
d2e51e777c CI: cleanup vars identical to kubespray defaults (#11903) 2025-01-21 05:46:37 -08:00
Max Gautier
89476b48e5 CI: scope stdout debug callback to kubespray test runs
The debug callback apparently breaks using ansible-playbook in
pre-commit, so scope the variables to only where we're using it instead.
2025-01-21 14:07:32 +01:00
Max Gautier
3f01d4725d Apply new pre-commit version updater 2025-01-21 12:10:43 +01:00
Max Gautier
a142f40e25 Update versions in README.md with pre-commit
Currently, versions in README.md need to be manually updated, and we
check it's done with a bash script.

Add a small utility playbook to add versions in README.md from their
actual default values, automatically.
This is done in pre-commit, and replace the scripted check ; instead it
will autofix the README.md, and fails in CI if needed.

We switch markdownlint behind the local hooks to gave it the opportunity
to catch a problem with the rendering.
2025-01-21 12:10:21 +01:00
Max Gautier
0e91000a04 CI: remove retry from jobs (#11899)
Since e8ee42280 (CI: remove deletion tasks of 'packet' VMs, 2024-09-13),
our tests appears to not be flakey anymore.
The current retry slow down the testing feedback on pull request.

Since it's not needed anymore, don't retry and fail fast.
2025-01-19 18:38:35 -08:00
Kubernetes Prow Robot
e73c2d081c Merge pull request #11898 from VannTen/cleanup/ci/run_without_sample
Run CI without the sample inventory
2025-01-17 08:00:36 -08:00
Max Gautier
5862bff044 ci: show pre-commit diff on failure
Sometimes the change done by pre-commit are not obvious, this should
help.
2025-01-17 16:22:58 +01:00
Max Gautier
b548ccbe7f Adapt CI/vagrant to run without sample inventory 2025-01-17 16:22:57 +01:00
Kubernetes Prow Robot
a5142e7dfd Merge pull request #11891 from VannTen/download_graphql
Overhaul of the python hashes updater
2025-01-17 04:16:07 -08:00
ChengHao Yang
3930919283 Cleanup OWNERS files in each folders (#11892)
* Cleanup not in k-sigs members OWNERS

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

* Cleanup inactive members on Kubespray

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-01-15 12:10:34 -08:00
Kay Yan
b104bb7a57 [kubernetes] Support Kubernetes v1.32.0 with RHEL8 (#11885)
* [kubernetes] Support Kubernetes v1.32.0

* add workaround for RHEL8

Signed-off-by: Kay Yan <kay.yan@daocloud.io>

---------

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
Co-authored-by: Mohamed Zaian <mohamedzaian@gmail.com>
2025-01-15 08:54:35 -08:00
Max Gautier
bc36e9d440 hash-updater: apply formatter 2025-01-15 14:34:48 +01:00
Max Gautier
d8629b8e7e download: separate static metadata into it's own file
By separating logic from data, we should make it easier to add new
components.
2025-01-15 14:32:49 +01:00
Bas
c84336b48c Contrib: upload2artifactory.py (#11886)
* Contrib: upload2artifactory.py

Signed-off-by: Bas Meijer <bas.meijer@enexis.nl>

* Pythonic

Signed-off-by: Bas Meijer <bas.meijer@enexis.nl>

* Suggested

Co-authored-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>

* upload2artifactory.py documentation.

---------

Signed-off-by: Bas Meijer <bas.meijer@enexis.nl>
Co-authored-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
2025-01-15 05:18:33 -08:00
Christian Kröger
403a73ac11 [ingress-nginx] expose custom tcp and udp ports in ingress-nginx-controller (#11850) 2025-01-15 05:14:33 -08:00
Fredrik Liv
5ca23e3bfe Changed to use first_kube_control_plane to parse kubeadm_certificate_key (#11875)
Co-authored-by: nvalembois <nvalembois@live.com>
2025-01-14 08:34:34 -08:00
Max Gautier
4d3f06e69e download: cleanup graphQL query
- remove unused parts in the response
- clarify variables names
2025-01-14 17:04:29 +01:00
Max Gautier
d17bd286ea download: allow excluding some component
This is handy when some component releases is buggy (missing file at the
download links) to not block everything else.

Move the filtering up the stack so we don't have to do it multiples
times.
2025-01-14 17:04:28 +01:00
Max Gautier
55cff4f3d3 download: get checksums file relative to git root
This means the update-hashes command can be run anywhere in Kubespray
repository without having to figure out the correct path.
2025-01-14 17:04:28 +01:00
Max Gautier
76e07daa12 download: put grapqQL query in package + read from importlib 2025-01-14 17:04:27 +01:00
Max Gautier
a551922c84 Adapt download.py to run as a package script 2025-01-14 17:04:27 +01:00
Max Gautier
ba3258d7f0 Move download_hash.py into a python package
Can operate on several branches without the need for backport
2025-01-14 17:04:26 +01:00
Max Gautier
9b56840d51 download: create pyproject.toml 2025-01-14 17:04:24 +01:00
Max Gautier
4351b47ebe download: convert to logging 2025-01-14 17:04:18 +01:00
Max Gautier
b08c5e8b14 download: Log Github rate-limit status 2025-01-14 17:02:29 +01:00
Kay Yan
3527cb1916 Update CI test from AlmaLinux8 to AlmaLinux9 (#11889)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2025-01-14 02:50:32 -08:00
Max Gautier
81790cab91 download: remove unneeded imports 2025-01-14 10:41:42 +01:00
Max Gautier
9fbc566d98 download: Support adding new versions and update the doc 2025-01-14 10:41:41 +01:00
Max Gautier
ff768cc9fe download: support multiple hash algorithm 2025-01-14 10:41:41 +01:00
Max Gautier
ff3d9a0443 download: Support for gvisor (part 2)
Gvisor releases, besides only being tags, have some particularities:
- they are of the form yyyymmdd.p -> this get interpreted as a yaml
  float, so we need to explicitely convert to string to make it work.
- there is no semver-like attached to the version numbers, but the API
  (= OCI container runtime interface) is expected to be stable (see
  linked discussion)
- some older tags don't have hashs for some archs

Link: https://groups.google.com/g/gvisor-users/c/SxMeHt0Yb6Y/m/Xtv7seULCAAJ
2025-01-14 10:41:40 +01:00
Max Gautier
6608efb2c4 download: compute version from Github tags for gvisor
Gvisor is the only one of our deployed components which use tags instead
of proper releases. So the tags scraping support will, for now, cater to
gvisor particularities, notably in the tag name format and the fact that
some older releases don't have the same URL scheme.
2025-01-14 10:41:39 +01:00
Max Gautier
479fda6355 download: support cri-dockerd, youki, kata, crun 2025-01-14 10:41:39 +01:00
Max Gautier
3a44411aa1 Support project using alternates names for arch
(the url should use `alt_arch` instead of `arch` for those)
2025-01-14 10:41:38 +01:00
Max Gautier
9334bc1fee support components with no premade hashes 2025-01-14 10:41:38 +01:00
Max Gautier
c94daa4ff5 download: Update yaml data with new hashes 2025-01-14 10:41:37 +01:00
Max Gautier
5be8155394 remove old loops and generators 2025-01-14 10:41:36 +01:00
Max Gautier
08913c4aa0 Don't use 'checksum' in the components names 2025-01-14 10:41:36 +01:00
Max Gautier
38dd224ffe Extract get_hash into it's own function
Also, always raise even for 404 not found (should not happen now that
we'll use GraphQL to find the exact set of versions)
2025-01-14 10:41:36 +01:00
Max Gautier
24c59cee59 download_hash: adapt download urls to v-less versions 2025-01-14 10:41:35 +01:00
Max Gautier
2be54b2bd7 Filter new versions for new ones and same minor releases
We're only interested in new patch releases for auto-update.
2025-01-14 10:41:35 +01:00
Max Gautier
ae68766015 Filter by github results InvalidVersion
Containerd use the same repository for releases of it's gRPC API (which
we are not interested in).
Conveniently, those releases have tags which are not valid version
number (being prefixed with 'api/').

This could also be potentially useful for similar cases.
The risk of missing releases because of this are low, since it would
require that a project issue a new release with an invalid format, then
switch back to the previous format (or we miss the fact it's not
updating for a long period of time).
2025-01-14 10:41:34 +01:00
Max Gautier
9f58ba60f3 download: compute new versions from Github API
We obtain the set of version from Github, then for each component we do
a set comparison to determine which versions we don't have.
2025-01-14 10:41:34 +01:00
Max Gautier
a6219c84c9 Put graphql query in it's own file 2025-01-14 10:41:33 +01:00
Max Gautier
7941be127d downloads: add graphql node ids
The Github graphQL API needs IDs for querying a variable array of
repository.

Use a dict for components instead of an array of url and record the
corresponding node ID for each component (there are duplicates because
some binaries are provided by the same project/repository).
2025-01-14 10:41:33 +01:00
Max Gautier
c938dfa634 scripts: get_nodes_ids.sh
Add the script used to obtain graphql node IDs from Github so it's
easier to add a new component.
2025-01-14 10:41:31 +01:00
ChengHao Yang
5a353cb04f Add manual option to the external_cloud_provider variable (#11883)
* Add `manual` option in the `external_cloud_provider` value

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

* Update external cloud provider description in roles & sample inventory

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-01-13 00:12:34 -08:00
kyrie
1f186ed451 add containerd registry mirror certificate configuration (#11857)
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
2025-01-09 01:48:31 -08:00
Chad Swenson
8443f370d4 Structured AuthorizationConfiguration (#11852)
Adds the ability to configure the Kubernetes API server with a structured authorization configuration file.

Structured AuthorizationConfiguration is a new feature in Kubernetes v1.29+ (GA in v1.32) that configures the API server's authorization modes with a structured configuration file.
AuthorizationConfiguration files offer features not available with the `--authorization-mode` flag, although Kubespray supports both methods and authorization-mode remains the default for now.

Note: Because the `--authorization-config` and `--authorization-mode` flags are mutually exclusive, the `authorization_modes` ansible variable is ignored when `kube_apiserver_use_authorization_config_file` is set to true. The two features cannot be used at the same time.

Docs: https://kubernetes.io/docs/reference/access-authn-authz/authorization/#configuring-the-api-server-using-an-authorization-config-file
Blog + Examples: https://kubernetes.io/blog/2024/04/26/multi-webhook-and-modular-authorization-made-much-easier/
KEP: https://github.com/kubernetes/enhancements/tree/master/keps/sig-auth/3221-structured-authorization-configuration

I tested this all the way back to k8s v1.29 when AuthorizationConfiguration was first introduced as an alpha feature, although v1.29 required some additional workarounds with `kubeadm_patches`, which I included in example comments.

I also included some example comments with CEL expressions that allowed me to configure webhook authorizers without hitting kubeadm 1.29+ issues that block cluster creation and upgrades such as this one: https://github.com/kubernetes/cloud-provider-openstack/issues/2575.
My workaround configures the webhook to ignore requests from kubeadm and system components, which prevents fatal errors from webhooks that are not available yet, and should be authorized by Node or RBAC anyway.
2025-01-07 09:14:28 +01:00
ChengHao Yang
1801debaea Add Flatcar 4081.2.1 image to test-infra (#11849)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-01-07 08:38:28 +01:00
Kay Yan
369be00960 increase the memory requirement to 2GB (#11864)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2025-01-07 08:00:28 +01:00
Kay Yan
ae1805587b cleaup for 2.27.0 (#11854)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2025-01-07 05:06:29 +01:00
Noam
55d1e4a4b5 enable bash completion tasks for Suse OS family (#11860)
* remove check for os family on bash completion tasks

* add Suse
2025-01-06 15:36:16 +01:00
Max Gautier
ac9b76eb2e Ignore Mem preflight errors on ubuntu upgrade testcase (#11859) 2025-01-06 11:52:16 +01:00
Mohamed Omar Zaian
9ec9b3a202 [ingress-nginx] upgrade to 1.12.0 (#11846) 2025-01-02 04:58:14 +01:00
Antoine Legrand
0222a2a634 Add option to skip network plugin installation (#11844) 2024-12-31 12:52:13 +01:00
Kubernetes Prow Robot
57490d5e5e Merge pull request #11793 from VannTen/cleanup/ci_testcases_better_callback
Use debug stdout callback in ci rather than manual debug
2024-12-27 18:40:12 +01:00
Kubernetes Prow Robot
5af3a34de8 Merge pull request #11819 from VannTen/cleanup/preinstall_fact
Cleanups in kubernetes/preinstall (DNS stuff)
2024-12-27 18:04:11 +01:00
ChengHao Yang
54a01f2774 Bump: Containerd upgrade to 1.7.24 & runc upgrade to v1.2.3 (#11833)
* Bump: Containerd upgrade to 1.7.24

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

* Docs: README.md update Containerd version 1.7.24

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

* Bump: runc upgrade to v1.2.3

Runc upgrade to v1.2.3, and add v1.1.15, v1.2.x checksum

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-12-27 13:36:11 +01:00
Max Gautier
6f6da3d3c7 Update SECURITY_CONTACTS with active maintainers (#11827)
* Update SECURITY_CONTACTS with active maintainers

* Add yankay to SECURITY_CONTACTS
2024-12-27 06:26:13 +01:00
ChengHao Yang
a6bc327d63 Bump: Helm upgrade to v3.16.4 (#11832)
* Bump: Helm default version v3.16.4

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

* Docs: README.md update helm version

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-12-26 14:24:11 +01:00
Mohamed Omar Zaian
25d0380db7 [calico] Add version 3.29.1 and make it default (#11798) 2024-12-25 23:14:11 +01:00
ChengHao Yang
3305ae9235 Bump: Kubernetes default version v1.31.4 (#11828)
* Bump: kubernetes upgrade to 1.31.4

Add Kubernetes 1.31.4, 1.30.8 and 1.29.12 version

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

* Docs: Upgrade Kubernetes version to 1.31.4

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-12-25 23:10:13 +01:00
kyrie
e7a5e3ca5c Fix using the default network manager in reset.yml (#11678)
* enhance reset network service

Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>

* reset network service: use systemd module directly

---------

Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
Co-authored-by: Max Gautier <mg@max.gautier.name>
2024-12-24 15:50:11 +01:00
dependabot[bot]
6c69ffed5b build(deps): bump molecule-plugins[vagrant] from 23.5.3 to 23.6.0 (#11826)
Bumps [molecule-plugins[vagrant]](https://github.com/ansible-community/molecule-plugins) from 23.5.3 to 23.6.0.
- [Release notes](https://github.com/ansible-community/molecule-plugins/releases)
- [Commits](https://github.com/ansible-community/molecule-plugins/compare/v23.5.3...v23.6.0)

---
updated-dependencies:
- dependency-name: molecule-plugins[vagrant]
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-24 14:46:11 +01:00
Max Gautier
d173f1d951 Only consider host in 'k8s_cluster' when checking if ip is a cached fact (#11817)
This avoids spurious failure with 'localhost'.

It should also be more correct the inventory contains uncached hosts
which are not in `k8s_cluster` and therefore should not be Kubespray
business.

(We still use hostvars for uncached hosts, because it's easier to select
on 'ansible_default_ipv4' that way and does not change the end result)
2024-12-23 08:48:10 +01:00
Max Gautier
91ad58a185 Update ansible-lint pre-commit + drop jsonschema dep (#11818) 2024-12-20 03:00:09 +01:00
Chad Swenson
2fbf4806ed Add ResourceQuota plugin configuration (#11814)
This enables [configuration](https://kubernetes.io/docs/concepts/policy/resource-quotas/#limit-priority-class-consumption-by-default) of the [ResourceQuota AdmissionController plugin](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#resourcequota). The configuration file will be empty by default when no limitedResources are set.
2024-12-19 18:12:09 +01:00
Max Gautier
684f52eaf4 kubernetes/preinstall: remove unused variable 2024-12-19 16:30:48 +01:00
Max Gautier
55e095c1c7 kubernetes/preinstall: dns vars cleanup
- Move validation from facts to verify-settings
- Move set_fact to vars/
2024-12-19 16:30:47 +01:00
Max Gautier
1127a62176 kubernetes/preinstall: dns setting cleanup(dhclient, resolvconf)
We use a lot of facts where variables are enough, and format too early,
which prevent reusing the variables in different contexts.

- Moves set_fact variables to the vars directory, remove unnecessary
 intermediate variables, and render them at usage sites to only do logic
 on native Ansible/Jinja lists.
- Use defaults/ rather than default filters for several variables.
2024-12-19 16:30:46 +01:00
Max Gautier
a3e569f5c4 kubernetes/preinstall: switch coredns_server to vars/ 2024-12-19 15:51:02 +01:00
Ekko
bf70335493 Add iproute(2) package checking (#11816)
Signed-off-by: ekko <lihai.tu@daocloud.io>
2024-12-19 11:32:09 +01:00
Max Gautier
180ce0b2ce CI: test hardening setup in normal CI run (#11809) 2024-12-18 15:40:09 +01:00
Max Gautier
331671ac30 Revert "apiserver: fix incorrect path to admission plugins config files (#11779)" (#11808)
This reverts commit 742409e663.
2024-12-18 15:02:10 +01:00
Emilien M
03de8ff566 Fix Ansible example values for OpenStack controller (#11803) 2024-12-17 16:06:52 +01:00
ERIK
540c6ddb96 remove legacy kubelet container pre-upgrade tasks (#11805)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-12-17 09:38:54 +01:00
Kubernetes Prow Robot
da077ab8a6 Merge pull request #11700 from VannTen/feat/kubectl_stdin
Convert kubernetes-apps to use kubectl directly
2024-12-17 08:06:53 +01:00
Kubernetes Prow Robot
30f0a14489 Merge pull request #11792 from VannTen/flake/race_sa_creation
Fix flakey test + cleanup in testcases/030-checknetwork
2024-12-17 03:26:52 +01:00
Kubernetes Prow Robot
acfaef2adf Merge pull request #11797 from VannTen/ci/fix_collection_testing
CI: build collection before runnings tests
2024-12-16 11:12:51 +01:00
Max Gautier
742409e663 apiserver: fix incorrect path to admission plugins config files (#11779) 2024-12-16 09:40:52 +01:00
dependabot[bot]
a2cde9e77e build(deps): bump ansible-lint from 24.10.0 to 24.12.2 (#11799)
Bumps [ansible-lint](https://github.com/ansible/ansible-lint) from 24.10.0 to 24.12.2.
- [Release notes](https://github.com/ansible/ansible-lint/releases)
- [Commits](https://github.com/ansible/ansible-lint/compare/v24.10.0...v24.12.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-16 07:50:51 +01:00
Max Gautier
7da317348c CI: remove IDEMPOT_CHECK (#11796)
There is no test with IDEMPOT_CHECK=true since commit 7b78e6872 (disable
idempotency tests (#1872), 2017-10-26)

Remove the related infra from our CI scripts.
2024-12-13 20:02:26 +01:00
Max Gautier
2dddb4fb65 CI: test collections in one packet job 2024-12-13 16:44:31 +01:00
Max Gautier
18fab585ad CI: build collection before runnings tests
We were running the playbooks before building the collections, so this
probably wasn't testing much.
2024-12-13 16:44:30 +01:00
Max Gautier
86a949dc81 CI: Remove Flatcar specifics
We don't test Flatcar at all in CI, thus remove special handling for it.
2024-12-13 11:44:51 +01:00
Max Gautier
f6d1c294d4 CI: Use the debug stdout callback instead of manual debug
This display in a readable (by humans) way the result of most tasks, and
should be way more readable that what we have now, which is frequently a
bunch of unreadable json.

+ some small fixes (using delegated_to instead of when
  <control_plane_host>)
2024-12-13 11:44:49 +01:00
Max Gautier
630e9de658 CI: drop special casing for Opensuse and CoreOS (#11791)
- special casing should be in Kubespray, not in the test. It makes no
  sense to do something in tests which won't be done in actual usage.
- We don't actually test CoreOS at all in the CI.
2024-12-13 03:52:26 +01:00
Max Gautier
12ed1fcf93 CI-tests: remove hostnets stuff from 030_check-network
There is no pods with hostNetwork deployed in this test, and therefore
the tasks are skipped / empty output (checked in CI).
2024-12-12 15:52:05 +01:00
Max Gautier
930df78d8a CI: Use deployment instead of Pod for agnhost
This is a followup to 2ba28a338 (Revert "Wait for available API token in
a new namespace (#7045)", 2024-10-25).

While checking for the serviceaccount token is not effective, there is
still a race when creating a Pod directly, because the ServiceAccount
itself might not be created yet.
More details at https://github.com/kubernetes/kubernetes/issues/66689.

This cause very frequent flakes in our CI with spurious failures.

Use a Deployment instead ; it will takes cares of creating the Pods and
retrying ; it also let us use kubectl rollout status instead of manually
checking for the pods.
2024-12-12 15:52:04 +01:00
Kubernetes Prow Robot
74aee12305 Merge pull request #11786 from VannTen/cleanup/unused_ci_test_files
Remove testfiles which are not used in the CI.
2024-12-12 12:32:27 +01:00
Kubernetes Prow Robot
45847ce052 Merge pull request #11785 from VannTen/cleanup/tests_reqs
Remove ara in CI + some cleanup
2024-12-12 12:24:28 +01:00
Max Gautier
5bfc3396e9 CI: ignore Mem errors for some failing test in ci-extended 2024-12-12 09:52:59 +01:00
Max Gautier
b9e9364c50 Remove ara support in CI
We do not use it and it has some overhead.
2024-12-11 17:28:35 +01:00
Max Gautier
61b9bb93f1 Remove unneeded test dependencies
AFAICS, these are not used anywhere
2024-12-11 17:28:33 +01:00
Max Gautier
d9cf380ce0 Remove testfiles which are not used in the CI.
To reproduce this commit run in bash:

for file in $(ls tests/files/)
do
    if ! grep -Rq ${file%.*} .gitlab.ci; then
    rm tests/files/${file}
    fi
done

This also means that our CI matrix was not accurate.
2024-12-11 17:21:49 +01:00
Max Gautier
1307b2fe07 containerd: add After=dbus.service (#11781)
This is needed for shutdown ordering: while at startup, it's not a
problem that containerd start before dbus (the dbus socket already
exists) it needs to shutdown before dbus to do its cleanup (asking
systemd via dbus to cleanup cgroups).
2024-12-11 08:58:03 +00:00
Enrico Falco
782c0b35eb Support python 3.12 for terraform.py in regex expression (#11773) 2024-12-09 15:50:02 +00:00
dependabot[bot]
fccd143533 build(deps): bump molecule from 24.9.0 to 24.12.0 (#11774)
Bumps [molecule](https://github.com/ansible-community/molecule) from 24.9.0 to 24.12.0.
- [Release notes](https://github.com/ansible-community/molecule/releases)
- [Commits](https://github.com/ansible-community/molecule/compare/v24.9.0...v24.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 14:56:05 +00:00
dependabot[bot]
8702b6f3fd build(deps): bump ansible from 9.12.0 to 9.13.0 (#11775)
Bumps [ansible](https://github.com/ansible-community/ansible-build-data) from 9.12.0 to 9.13.0.
- [Changelog](https://github.com/ansible-community/ansible-build-data/blob/main/docs/release-process.md)
- [Commits](https://github.com/ansible-community/ansible-build-data/compare/9.12.0...9.13.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 14:44:06 +00:00
Max Gautier
7c71f257b4 Convert netchecker to kubectl_apply_stdin
Not that the Apparmor check result is no longer used since the PSP removal.
2024-12-09 15:37:09 +01:00
Kundan Kumar
14e0df3450 updated link for migrate_docker2containerd.md (#11771) 2024-12-09 09:12:02 +00:00
Max Gautier
31e56ab76d Convert nodelocaldns to kubectl_apply_stdin 2024-12-09 10:10:52 +01:00
Max Gautier
4b7125f5be Convert CoreDNS Secondary to kubectl_apply_stdin
Note that we're reapplying the RBAC/Sa/Config from coredns which is not
strictly necessary, but harmless, when the secondary is enabled.
2024-12-09 10:10:51 +01:00
Max Gautier
e0c9152bd4 Convert CoreDNS primary to kubectl_apply_stdin 2024-12-09 10:10:51 +01:00
Max Gautier
63adac8314 Convert etcd_metrics to kubectl_apply_stdin 2024-12-09 10:10:50 +01:00
Max Gautier
27ccfc7c66 Convert dashboard to kubectl_apply_stdin 2024-12-09 10:10:50 +01:00
Max Gautier
990d2a1358 Define a standard commandline for applying manifests
This is expected to be used in the command module this way:
command:
  cmd: "{{ kubectl_apply_stdin }}"
  stdin: <... rendered manifests > -> using the 'template' lookup plugin
  in most cases.

The advantages over the kube plugin module integrated in kubespray
(which this should replace eventually):
- way easier to modify to take advantage of new features (server-side
  apply for instance)
- no need for a separate template tasks + checking the result (which can
  introduce problem if the first playbook runs encounters an error).
2024-12-09 10:10:48 +01:00
Max Gautier
70c73f153b calico: stop recording calico_kubelet_name (#11770)
The variable is not used anymore since 29ea790c30.
Besides, this tasks fails on dual stack installation.
2024-12-06 02:09:59 +00:00
ChengHao Yang
2705cfbe04 Fix sample inventory kube_version to 1.31.3 (#11767) 2024-12-05 11:26:00 +00:00
ERIK
98807ffb6b Optimize CA cert hash calculation with community.crypto (#11758)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-12-02 10:27:00 +00:00
Max Gautier
8b96d00d30 Remove some leftover from removed mitogen support (#11761) 2024-12-01 12:44:58 +00:00
Max Gautier
f720290f8f Remove pip and rpm packaging support (#11760)
Those files haven't been touched in roughly 5 years, and pip install on
Kubespray errors out.
The 'Requires:' are outdated, which suggests that no one is using this.
2024-11-30 06:20:57 +00:00
Max Gautier
fc264179b0 Remove jsonschema from dependencies (#11759)
8ff4ad2d8 (preinstall: simplify OS packages selection, 2024-11-04)
removed all usages of ansible.utils.validate (not that many), so the
dependencies is no longer necessary.
2024-11-29 10:50:58 +00:00
ERIK
70b75d35b6 support asymmetric encryption algorithms in ClusterConfigration (#11757)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-11-29 08:06:58 +00:00
Max Gautier
280507ff70 Remove leftover CI for ansible-core 2.11 (apparently) (#11754) 2024-11-28 17:22:58 +00:00
Max Gautier
a074596c2c containerd: always use config_path (#11755)
config_path was introduced in containerd 1.5.0, and registry.mirrors is
deprecated.

There is no reason to keep the old alternative, so just always use
config_path, and consequently remove the option.
2024-11-28 12:38:59 +00:00
ERIK
f83471484d Revert "add encryptionAlgorithm for ClusterConfigration (#11751)" (#11756)
This reverts commit 9f01effadc.
2024-11-28 12:00:58 +00:00
ERIK
9f01effadc add encryptionAlgorithm for ClusterConfigration (#11751)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-11-28 08:28:59 +00:00
Kubernetes Prow Robot
e1ab3122c8 Merge pull request #11748 from VannTen/cleanup/remove_inventory_builder
Remove inventory_builder and re-organize docs
2024-11-27 14:52:58 +00:00
Max Gautier
db9852e853 docs: reorganize "getting started" + cleanups old docs
Our README is currently pretty cluttered:
- Part of the README duplicates docs/getting_started/getting-started.md
-> Remove duplicates and extract useful info into the getting-started.md

- General info on Ansible environment troubleshooting
-> remove most of it as it's not specific to Kubespray, move to
docs/ansible/ansible.md
-> split inventory-related stuff of ansible.md into it's own file. This
should host documentation on how to manages Kubespray inventories in the
future.

ansible.md:
- remove the list of "Unused" variables, as:
  1. It's not accurate
  2. What matters is where users should put their variables
2024-11-26 15:23:59 +01:00
Max Gautier
6b14be6624 Simplify sample inventory
- The bastion is not needed for a simple example
- All is implicit we can just define our host in groups directly
2024-11-26 15:23:20 +01:00
Max Gautier
c144c1ac9c Simplify image mirrors instructions
There is no need to repeat the full example here, simply state what
variables are.
2024-11-26 15:23:20 +01:00
Max Gautier
69ca324192 Clean-up references to inventory_builder in docs 2024-11-26 15:23:19 +01:00
Max Gautier
56e41f0647 Remove contrib/dind
contrib/dind use inventory_builder, which is removed. It overlaps with
the function of kind (Kubernetes in Docker) and has not see change
(apart from linting driven ones) for a long time.

It also does not seem to work (provisioning playbook crash).
2024-11-26 14:43:37 +01:00
Max Gautier
719c0b00c5 Remove the inventory_builder script
This only really help with the easiest part of building your inventory
(listing the hosts) as you still need to edit your groups vars and
similar.
The opaqueness of the script does not really help our users to
understand their own inventory.

Furthermore, there is not really a reason that something which is common
to all the Ansible ecosystem should be done in a special way for
Kubespray.
2024-11-26 14:34:40 +01:00
David
9d6344aac7 Add support for ntpsec (#11665)
* Add support for ntpsec

* fixup: set default ntp_driftfile based on ntp_package

* fixup: docs
2024-11-25 16:42:56 +00:00
Emmanuel Ferdman
faeb114c31 Update dns-stack.md reference (#11745)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2024-11-25 14:02:55 +00:00
ChengHao Yang
795a2dc309 Bump: OpenStack Cloud Controller Manager to v1.31.1 (#11738)
* Refactor: replace registry.k8s.io with kube_image_repo variable

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

* Bump: OpenStack Cloud Controller Manager upgrade to v1.31.1

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

* Refactor: remove occm image tag from sample inventory

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-25 13:38:56 +00:00
ChengHao Yang
3f45301919 Bump: Kubernetes default version v1.31.3 (#11737)
* Bump: Kubernetes default version set to v1.31.3

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

* Docs: README.md update kubernetes version

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-11-25 09:14:57 +00:00
Bin Zhao
d4b2f8c9e9 Update README.md to fix several doc links for OpenStack and vSphere (#11736)
Fix 3 broken links.
Two of them are because of https://github.com/kubernetes-sigs/kubespray/pull/11633
2024-11-25 09:10:56 +00:00
Max Gautier
2e145ffc12 Fix the format of the list of images extracted from kubeadm (#11741)
The download role expect 'groups' be a list, in order to properly filter
images.
2024-11-25 09:06:56 +00:00
Kay Yan
83a340baf1 Update rockylinux9 base image to 9.5 (#11744) 2024-11-25 09:00:57 +00:00
logicsys
b8541962f3 Partial Cilium 1.16+ Support & Add vars for configuring cilium IP load balancer pools and bgp v1 & v2 apis (#11620)
* Add vars for configuring cilium IP load balancer pools and bgp peer policies

* Cilium 1.16+ Support - Add vars for configuring cilium bgpv2 api & handle cilium_kube_proxy_replacement unsupported values
2024-11-19 02:48:53 +00:00
dependabot[bot]
e330ffa4ad build(deps): bump ansible-lint from 24.9.2 to 24.10.0 (#11720)
Bumps [ansible-lint](https://github.com/ansible/ansible-lint) from 24.9.2 to 24.10.0.
- [Release notes](https://github.com/ansible/ansible-lint/releases)
- [Commits](https://github.com/ansible/ansible-lint/compare/v24.9.2...v24.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 17:58:57 +00:00
Max Gautier
6536ed41ac Bump version of community.general (#11724)
We use the persistent option of modprobe, which was introduced in 7.0.0
2024-11-18 11:02:54 +00:00
Max Gautier
badfb6ca34 Fix the pretty-printing of (core|nodelocal)dns (#11694)
When using
dns_upstream_forward_extra_opts:
  prefer_udp: "" # the option as no value so use empty string to just
                 # put the key

This is rendered in the dns configmap as ($ for end-of-line)

...
  prefer_udp $
...

Note the trailing space.
This triggers https://github.com/kubernetes/kubernetes/issues/36222,
which makes the configmap hardly readable when editing them manually or
simply putting them in a yaml file for inspection.

Trim the concatenation of option + value to get rid of any trailing
space.
2024-11-18 07:06:53 +00:00
ERIK
316e579543 fix task naming in bootstrap-os (#11714)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-11-17 17:22:53 +00:00
Javad
e8bdd47ecc Fix kubelet-csr-approver deployment failes if kube_network_plugin=cni(generic) (#11704)
* Make Helm's 'atomic' parameter configurable from role variables

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

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

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

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

* download/kubeadm: remove redundant task

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

* Validate kubeadm configs

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

* kubeadm-upgrade: remove unnecessary bool cast

* Convert kubeadm join discovery timeout to v1beta4 config

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

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

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

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

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

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

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

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

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

* fix template name

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

---------

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Docs: upgrade cert-manager to v1.15.3

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

---------

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

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

* Feat: add external OCI cloud controller manager workflow

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

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

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

* cloud_controller: oracle: simpler asserts

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

---------

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
Co-authored-by: Max Gautier <mg@max.gautier.name>
2024-10-31 12:53:26 +00:00
Kubernetes Prow Robot
3f027abae6 Merge pull request #11598 from VannTen/cleanup/fact_gathering
Do not serialize fact gathering for no_proxy
2024-10-31 10:59:26 +00:00
kyrie
d0f1d520ec update calico template (#11634)
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
2024-10-31 02:21:26 +00:00
dependabot[bot]
bb7b4e0c7c build(deps): bump tox from 4.23.0 to 4.23.2 (#11670)
Bumps [tox](https://github.com/tox-dev/tox) from 4.23.0 to 4.23.2.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.23.0...4.23.2)

---
updated-dependencies:
- dependency-name: tox
  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>
2024-10-30 09:07:25 +00:00
Max Gautier
2ba28a3389 Revert "Wait for available API token in a new namespace (#7045)"
This reverts commit 275c54e810.

Static tokens are no longer created automatically for service account in
Kubernetes. Instead, they are dynamically injected into pods using a
projected volume.

Thus there is no longer a need to check for this (it didn't work anyway,
since the describe output actually contains <none> when there is no
tokens:
{
  "attempts": 1,
  "changed": false,
  "cmd": "set -o pipefail && /usr/local/bin/kubectl describe serviceaccounts default --namespace test | grep Tokens | awk '{print $2}'",
  "delta": "0:00:00.075633",
  "end": "2024-10-19 14:25:04.858871",
  "msg": "",
  "rc": 0,
  "start": "2024-10-19 14:25:04.783238",
  "stderr": "",
  "stderr_lines": [],
  "stdout": "<none>",
  "stdout_lines": [
    "<none>"
  ]
}
)
2024-10-25 15:02:29 +02:00
Robert Volkmann
5988ba0890 Add hashes for crictl 1.30.1 and 1.31.1 (#11661) 2024-10-24 15:50:53 +01:00
Robert Volkmann
87270ebf26 Add hashes for Kubernetes 1.31.2 (new default), 1.30.6 and 1.29.10 (#11662) 2024-10-24 15:46:53 +01:00
ChengHao Yang
e119863e04 Fix debian11-custom-cni failing test & upgrade debian12-custom-cni-helm chart version (#11654)
* Test: update custom_cni values

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

* Test: fix cilium require kube_owner set to root

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

* Test: update custom_cni render manifests

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

* Test: fix render template pre-commit

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

* Test: update debian12-custom-cni-helm chart version to 1.16.3

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-10-22 16:42:51 +01:00
dependabot[bot]
99c620d510 build(deps): bump tox from 4.21.2 to 4.23.0 (#11652)
Bumps [tox](https://github.com/tox-dev/tox) from 4.21.2 to 4.23.0.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.21.2...4.23.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-21 22:54:58 +01:00
Erwan Miran
daa9411b91 Make cri-dockerd log level configurable (#11646) 2024-10-21 22:54:52 +01:00
ChengHao Yang
d1417d54ce Feat: CoreDNS upgrade to v1.11.3 (#11653)
* Feat: bump CoreDNS version to v1.11.3

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

* Docs: update README.md CoreDNS version to v1.11.3

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-10-21 22:50:52 +01:00
kyrie
693eb74f52 fix kube-vip container securityContext (#11647) 2024-10-21 17:42:52 +01:00
Max Gautier
e8ee422808 CI: remove deletion tasks of 'packet' VMs
Kubevirt VMs deletion will be handled by the Kubernetes GC (see previous
commit), remove all the codes handling that.
2024-10-18 12:14:53 +02:00
Max Gautier
65c67c5c51 CI: use Kubernetes GC to delete kubevirt vms
This leverage the Kubernetes GC to delete kubevirt VMs, by using
ownerReferences, with the CI pod running the playbook as the owner.
This concretely means that the control plane in our CI cluster will
delete the kubevirt VMs associated with a particular ci job as soon as
that pod job is deleted, which usually happens when the job terminates,
(barring errors, which will be addressed in the cluster directly)

Upgrade to kubevirt.io/v1 for the VirtualMachine manifests, since the
alpha version is deprecated.
2024-10-18 12:14:52 +02:00
Robert Volkmann
5aea2abc40 Bump containerd to 1.7.23 (#11642) 2024-10-17 14:55:03 +01:00
dependabot[bot]
87fc2b88d8 build(deps): bump ansible from 9.10.0 to 9.11.0 (#11632)
Bumps [ansible](https://github.com/ansible-community/ansible-build-data) from 9.10.0 to 9.11.0.
- [Changelog](https://github.com/ansible-community/ansible-build-data/blob/main/docs/release-process.md)
- [Commits](https://github.com/ansible-community/ansible-build-data/compare/9.10.0...9.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-16 02:53:03 +01:00
Kubernetes Prow Robot
daa2144de3 Merge pull request #11601 from tico88612/feat/crio-default-crun
Feat: CRI-O v1.31 change default runtime to crun
2024-10-16 02:49:03 +01:00
ChengHao Yang
687fa3dbed Fix: cannot stop & remove all cri containers via remove_node.yml (#11631)
Before adding these changes, `ansible_facts.services["containerd.service"]` will not defined and fail to check for triggering the container stop and delete behaviors.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-10-15 08:50:22 +01:00
Alexander
616e4b40db replace deprecated unarchive.copy with unarchive.remote_src (#11207) 2024-10-14 08:20:21 +01:00
Nicolas Marcq
4e62e36f3a Multus configuration add namespace isolation (#11605)
#11594
2024-10-12 03:40:20 +01:00
ChengHao Yang
faa0816b95 Feat: make CRI-O's default runtime configurable
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-10-11 01:49:16 +08:00
Max Gautier
b4768cfa91 Always copy cert generation scripts to first etcd (#11612)
If we don't, existing installation would not pick up fix to that script,
such as dc33a1971d.
2024-10-09 02:44:22 +01:00
ChengHao Yang
a16d7b4365 Test: revert accidental deletion Fedora 39 CRI-O CI (#11611)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-10-08 14:32:23 +01:00
Seena Fallah
7f90fc7b12 containerd: simplify registry mirror template (#11326)
Simplify registry mirror rendering in config.toml.
The map filter can extract the host list from mirrors so we can
just unique them and render them without needing to construct vars
for it.
For the registry mirror tls section, we can first extract mirrors
from the dict then filter on only the ones having skip_veridy defined
first and then filter on the ones having true (as the dict might not
have skip_verify defined and that would cause errors of undefined var).

This will speed up and simply the templating.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-10-08 08:46:22 +01:00
Kay Yan
fb312e5179 cleanup kube 1.28 and cri-o 1.28 (#11609) 2024-10-08 08:28:22 +01:00
Kubernetes Prow Robot
9204f60b19 Merge pull request #11606 from VannTen/cleanup/pre_commit_ansible_lint
Reduce pre-commit hooks dependencies
2024-10-08 06:56:22 +01:00
Max Gautier
4f27bc2bf9 pre-commit: drop redundant ansible-syntax-check
ansible-lint hook already check syntax on the playbooks.
2024-10-07 14:18:36 +02:00
Max Gautier
07e551ab77 pre-commit: auto-update all hooks 2024-10-07 14:15:34 +02:00
Max Gautier
a7ace2e55b ansible-lint: Adjust pre-commit hooks dependencies
Dropping the ansible dependencies for ansible-lint will allow us to
catch missing dependencies collections in galaxy.yml. For collections
needed for contrib/ or tests/ (i.e: not part of core kubespray
dependencies), we can just configure ansible-lint to mock them.

This mean it won't check the mocked module parameters, but for those
area of the code base it's an acceptable trade-off.
2024-10-07 14:11:24 +02:00
ChengHao Yang
8aa4c9ac0c Cleanup: Fedora 37/38 CI tests & docs (#11600)
* Feat: update the remaining Fedora 37 vagrant CI

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

* Cleanup: remove EOL Fedora 37/38 CI tests

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

* Docs: remove EOL Fedora 37/38

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-10-07 09:16:06 +01:00
dependabot[bot]
fb92206918 Bump tox from 4.20.0 to 4.21.2 (#11602)
Bumps [tox](https://github.com/tox-dev/tox) from 4.20.0 to 4.21.2.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.20.0...4.21.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 08:48:05 +01:00
ChengHao Yang
e008e8ee01 Test: fix Molecule CRI-O default runtime to crun
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-10-07 07:40:39 +08:00
ChengHao Yang
f3d4377a16 Feat: add skopeo new version hash & upgrade skopeo version to v1.16.1
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-10-07 00:47:23 +08:00
ChengHao Yang
2717a2e585 Feat: add crun new version hash & upgrade crun version to 1.17
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-10-07 00:46:46 +08:00
ChengHao Yang
461a480887 Feat: complete the missing hash crun ppc64le
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-10-07 00:45:08 +08:00
ChengHao Yang
24e115c8b9 Feat: change cri-o default runtime to crun
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-10-07 00:43:30 +08:00
Max Gautier
6b3eaf8312 Use correct secret name for csi-upcloud pull secret (#11597) 2024-10-04 13:44:28 +01:00
Max Gautier
b0fb06054e Assert correct limit usage
This should prevent confusing errors with undefined variables
2024-10-04 14:20:30 +02:00
Max Gautier
1d032d06d1 Docs update on access ip 2024-10-04 14:20:29 +02:00
Max Gautier
2826b357d4 Remove serialized collect of ansible_default_ipv4
The fallback_ips tasks are essentially serializing the gathering of one
fact on all the hosts, which can have dramatic performance implications
on large clusters (several minutes).

This is essentially a reversal of 35f248dff0
Being able to run without refreshing the cache facts is not worth it.

We keep fallback_ip for now, simply changing the access to a normal
hostvars variable instead of a custom dictionnary.
2024-10-04 14:19:20 +02:00
Kubernetes Prow Robot
ddd92c998c Merge pull request #11507 from VannTen/cleanup/shell_etcd_reset
Refactor remove-etcd-node
2024-10-03 11:58:27 +01:00
Max Gautier
80b2765f20 Fix dynamic groups definition when using --limit (#11577)
Using the hosts directive at the play level prevent those tasks from
being run when using --limit and the group in question is not part of
the limit (ex: running scale.yml on new worker nodes only)

Instead, run on all hosts, and for each group, partition between that
group and '_' (generic group name which is not used; using an empty
string as the group is not supported by ansible.builtin.group_by)

Reported-by: asteppat <asteppat@cisco.com>
2024-10-03 10:14:27 +01:00
Baargav
bb4f1b1168 update cilium to 1.15.9 (#11593) 2024-10-03 10:10:27 +01:00
Olivier Boudry
583583942c Fix Flatcar bug #11268 missing default value for ansible_interpreter_python_fallback variable (#11270) 2024-10-03 09:54:27 +01:00
ChengHao Yang
b0563c20b0 Feat: support Fedora 39/40 (#11573)
* Add Fedora 39/40 to Vagrantfile

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

* Add CI tests for Fedora 39/40

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

* Update CI tests documentation

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

* Update support OS version in README.md

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-10-01 07:57:49 +01:00
peterw
6b499186b0 add cilium hubble-ui enable flag (#10939) 2024-10-01 06:53:49 +01:00
dependabot[bot]
1ccf0df540 Bump tzdata from 2024.1 to 2024.2 (#11590)
Bumps [tzdata](https://github.com/python/tzdata) from 2024.1 to 2024.2.
- [Release notes](https://github.com/python/tzdata/releases)
- [Changelog](https://github.com/python/tzdata/blob/master/NEWS.md)
- [Commits](https://github.com/python/tzdata/compare/2024.1...2024.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 10:40:03 +01:00
kyrie
d59a5bf431 update containerd_max_container_log_line_size default value (#11585)
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
2024-09-30 09:12:03 +01:00
Kay Yan
fcbcf3c03b cri-o Switch to libexecdir (#11584)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2024-09-30 08:34:03 +01:00
Serge Hartmann
0eeac591ad variables cilium_enable_host_firewall and cilium_policy_audit_mode for configmap/cilium-config (#11230)
capitalise values for Host Firewall and Policy Audit Mode
fix missing quotes
2024-09-30 08:22:02 +01:00
ChengHao Yang
fabf17a10c Add Fedora 39/40 images in test-infra (#11578)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-09-29 08:48:02 +01:00
Baargav
860c15cec1 Update cluster-role for cilium to prevent errors in agent startup (#11466)
* Update cluster-role for cilium to prevent errors in agent startup

ciliumloadbalancerippools permissions exists in the cilium helm chart for version 1.13.0
https://github.com/cilium/cilium/blob/v1.13.0/install/kubernetes/cilium/templates/cilium-agent/clusterrole.yaml#L71

The agent also needs permissions to read/watch secrets for bgp auth secrets when using CiliumBGPPeeringPolicy with a secret.

* Remove list/watch permissions for secrets

* Remove secrets from list/watch permissions
2024-09-29 02:30:02 +01:00
Erwan Miran
8c3b2851f6 feat(calico): add support for numAllowedLocalASNumbers on bgppeers per node definition (#11570) 2024-09-28 10:06:01 +01:00
M. Hamzah Khan
24e1765ae2 Added containernetworking-plugins to fcos bootstrap packages (#11273) 2024-09-27 20:24:01 +01:00
Andrea Zonca
d3113ad869 [doc] Add previously undocumented options in Terraform/Openstack (#11477)
These options are available in 6ba3656410/contrib/terraform/openstack/modules/compute/variables.tf (L204-L218) but are currently undocumented in the README.md
2024-09-27 19:02:02 +01:00
Kubernetes Prow Robot
bbd90f7657 Merge pull request #11568 from VannTen/cleanup/dont_rely_on_kube_node_existing
Only require minimum structure in inventory, part II
2024-09-27 11:30:02 +01:00
DirkTheDaring
3281c47f98 [kubernetes] Add hashes for kubernetes 1.29.8, 1.29.9, 1.30.5 (#11581)
* [kubernetes] Add hashes for kubernetes 1.29.8, 1.29.9, 1.30.5

* Update checksums.yml

reintroduce --- for yaml
2024-09-27 08:28:02 +01:00
janosbabik
6352fee0fd Update nerdctl version to 1.7.7 (#11575) 2024-09-27 05:04:01 +01:00
janosbabik
9f6db4012c Update runc version to v1.1.14 and add checksums (#11574) 2024-09-27 03:58:01 +01:00
Kubernetes Prow Robot
6c112a9b41 Merge pull request #11567 from VannTen/cleanup/remove_node_static_token_generation
Remove generation of static tokens for cluster members
2024-09-26 13:58:01 +01:00
janosbabik
656ed796b9 [etcd] make etcd 3.5.16 default (#11572)
* [etcd] make etcd 3.5.16 default

* Update etcd binary checksums for version 3.5.16 and lower
2024-09-26 09:12:01 +01:00
Bakke
e355bef79b fix: vsphere image repositories, tags and docs (#11564)
The old repository for these has been deleted, leaving the previous
configuration not possible to deploy, and even currently running clusters
fail after a restart as the DeameonSet has ImagePullPolicy: Always. More
details can be found here: kubernetes-sigs/vsphere-csi-driver#3053

As of writing, only CSI driver versions 3.1.2 to 3.3.1 is available in
this registry. This "officially" supports Kubernetes 1.26 to 1.30. Since
older drivers are not available, I have removed some feature-gating for
those unavailable versions while I was at it. For the cloud provider,
the `latest` image is now missing, and only 1.28.0 to 1.31.0 are
available. I've set the latest of these as the new default.

I also updated the documented default versions, as they were all out of
date and not aligned with actual code defaults.
2024-09-26 08:22:02 +01:00
Philip Sabri
15bb5b0789 [kubernetes] Support kubernetes 1.31.1 (#11533) 2024-09-25 05:10:01 +01:00
Max Gautier
fbcc8cc336 control-plane: refactor group membership test
Testing with group_names does not require the groups to exist.
2024-09-24 11:16:32 +02:00
Max Gautier
0679d9c8e9 metrics-server: proper defaults, cleaner deploy template 2024-09-24 11:16:32 +02:00
Max Gautier
dba00f2d85 metrics-server: Unconditional control-plane tolerations
There is no harm on having unneeded toleration when control-plane node
are not tainted, so simplify the template to always use the toleration.
2024-09-24 11:16:31 +02:00
Max Gautier
9f45552201 Cleanup redundancy
k8s_cluster = kube_control_plane + kube_node
2024-09-24 11:16:30 +02:00
Max Gautier
ee0d9c5428 remove-etcd-node: cleanups, correct change semantics 2024-09-24 09:11:32 +02:00
Max Gautier
2a52e5f08c remove-etcd-node: refactor shell to ansible filters
Remove unnecessary error handling. If the node ip is not defined, is
does not change anything whether we fail early of late.
2024-09-24 09:08:54 +02:00
dependabot[bot]
ebdc599b05 Bump tox from 4.18.1 to 4.20.0 (#11562)
Bumps [tox](https://github.com/tox-dev/tox) from 4.18.1 to 4.20.0.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.18.1...4.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-24 02:52:00 +01:00
Max Gautier
a2a2dfa419 k8s/control-plane: cleanup excessive defaulting 2024-09-23 20:37:56 +02:00
Max Gautier
baf0a331c9 Don't generate static tokens for nodes and control planes
Nodes to api-server relies by default certificates, and bootstrap
tokens, and there should be no need to generate tokens for every nodes,
even when enabling static token auth.
2024-09-23 16:58:42 +02:00
Baargav
1c0718bb7d update containerd 1.7.22 (#11554) 2024-09-23 15:31:59 +01:00
Kubernetes Prow Robot
03a055c383 Merge pull request #10643 from VannTen/cleanup/k8s_node_templates
Refactor kubernetes/node templates
2024-09-23 14:16:00 +01:00
Kubernetes Prow Robot
e9d406ed08 Merge pull request #11559 from VannTen/cleanup/less_inventory_boilerplate
Only require minimum structure in inventory, compute the rest
2024-09-23 10:08:00 +01:00
dependabot[bot]
99c6a884a9 Bump ansible-lint from 24.9.0 to 24.9.2 (#11563)
Bumps [ansible-lint](https://github.com/ansible/ansible-lint) from 24.9.0 to 24.9.2.
- [Release notes](https://github.com/ansible/ansible-lint/releases)
- [Commits](https://github.com/ansible/ansible-lint/compare/v24.9.0...v24.9.2)

---
updated-dependencies:
- dependency-name: ansible-lint
  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>
2024-09-23 09:32:00 +01:00
Max Gautier
1818993a8a CI: for upgrade testing, checkout old version before provisioning
Otherwise, modifying the test inventory + it's expected structure will
always fail.
2024-09-21 15:10:59 +02:00
Max Gautier
88b6f08e26 Documentation of k8s_cluster auto-defined
Also remove the group from the example inventory, since it should not be
needed anymore.
2024-09-21 14:35:36 +02:00
Max Gautier
7580e59bbf Define k8s_cluster dynamically
This allows inventories to not define the k8s_cluster group manually.
2024-09-21 14:35:35 +02:00
Max Gautier
2ec1c93897 Test group membership with group_names
Testing for group membership with group names makes Kubespray more
tolerant towards the structure of the inventory.
Where 'inventory_hostname in groups["some_group"] would fail if
"some_group" is not defined, '"some_group" in group_names' would not.
2024-09-21 14:09:09 +02:00
dependabot[bot]
89ff0710e9 Bump ansible-lint from 24.7.0 to 24.9.0 (#11541)
Bumps [ansible-lint](https://github.com/ansible/ansible-lint) from 24.7.0 to 24.9.0.
- [Release notes](https://github.com/ansible/ansible-lint/releases)
- [Commits](https://github.com/ansible/ansible-lint/compare/v24.7.0...v24.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-20 10:45:58 +01:00
dependabot[bot]
1fa4bb733d Bump ansible from 9.8.0 to 9.10.0 (#11540)
Bumps [ansible](https://github.com/ansible-community/ansible-build-data) from 9.8.0 to 9.10.0.
- [Changelog](https://github.com/ansible-community/ansible-build-data/blob/main/docs/release-process.md)
- [Commits](https://github.com/ansible-community/ansible-build-data/compare/9.8.0...9.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-20 09:33:39 +01:00
Kubernetes Prow Robot
93ee1226eb Merge pull request #11521 from VannTen/cleanup/deduplicate_kubeadm_control_plane
Use in inventory variables rather than patch files for kubeadm_patches
2024-09-20 01:05:14 +01:00
Leeon Fu
4323e5d039 Reset operation, disable service enabled and clean container's logs. (#11501) 2024-09-19 19:14:37 +01:00
Kubernetes Prow Robot
163697951c Merge pull request #11527 from VannTen/feat/vagrant_multi_inv
Cleanup Vagrantfile and allow to use multiples inventories
2024-09-19 13:46:45 +01:00
Kubernetes Prow Robot
893e9cb177 Merge pull request #11471 from VannTen/feat/config_plugin_list
Update the list of admission plugins which needs config
2024-09-18 13:18:44 +01:00
Max Gautier
76c42b4d3f CI: cleanup '-scale' tests infra (#11535)
There is actually no test using this since ad6fecefa8,
so there is no reason to keep that infra in our tests scripts.
2024-09-18 13:04:50 +01:00
Max Gautier
b3b00775ea Remove unused test infrastructure (#11529)
These two files haven't been touched since 2016 and don't appear to be
referenced anywhere else
2024-09-18 13:04:44 +01:00
Qasim Mehmood
e550118314 Allow setting annotations on ingress-nginx service (#11544) 2024-09-18 11:54:44 +01:00
Max Gautier
c3de25c782 Move the CRI endpoint setting to kubelet config (#11550)
The `--container-runtime-endpoint` kubelet argument is deprecated in
favor of the config file alternative.
2024-09-18 01:34:45 +01:00
dependabot[bot]
59dd713585 Bump molecule from 24.8.0 to 24.9.0 (#11542)
Bumps [molecule](https://github.com/ansible-community/molecule) from 24.8.0 to 24.9.0.
- [Release notes](https://github.com/ansible-community/molecule/releases)
- [Commits](https://github.com/ansible-community/molecule/compare/v24.8.0...v24.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 08:31:14 +01:00
Kay Yan
e5d2452828 fix elastx cleanup security groups (#11411) 2024-09-15 13:59:13 +01:00
ChengHao Yang
8cb081a3d0 Fix: download hash crictl link (#11534)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-09-14 17:35:13 +01:00
Max Gautier
4bf2d7a2c2 Rework vagrant documentation
- Use proper syntax highlighting for config.rb examples
- Consistent shell style ($ as prompt)
- Use only one way to do things
- Remove OS specific details
2024-09-13 08:00:33 +02:00
Max Gautier
1e769b7260 Rework vagrant inventory handling + support for multiples inventories
The current way to handle a custom inventory in vagrant is a bit
hackish, copy files around and can break Vagrantfile parsing in
cornercase scenarios (removing vagrant inventories, or the inventory
copied into vagrant inventory).

Instead, simply pass additional inventories to the ansible-playbook
command lines as raw arguments with `-i`.
This also makes supporting multiples inventories trivial, so we add a
new `$inventories` variable for that purpose.
2024-09-13 08:00:32 +02:00
Max Gautier
8d8d063de4 Remove useless file (#11526)
This was somehow copied from vagrant docs, not sure why it's there...
2024-09-13 04:31:12 +01:00
Kevin Huang
c601c8faf2 fix: Swap kubespray-defaults & boostrap-os (#11441)
- Execute boostrap-os before so that Python is installed for kubespray-defaults
- Remove outdated kubespray-defaults dependency on boostrap-os
2024-09-12 22:21:12 +01:00
Max Gautier
5ae433bf47 Remove refs to rhel7 in Vagrantfile (#11525) 2024-09-12 11:01:13 +01:00
Max Gautier
d54356e113 Add testcase for kubeadm_patches 2024-09-12 10:31:10 +02:00
Max Gautier
c87097fc35 Document how to use kubeadm patches 2024-09-12 10:31:09 +02:00
Kubernetes Prow Robot
4e6ae04b06 Merge pull request #11513 from VannTen/feat/python_download
Refactor and expand download_hash.py
2024-09-12 06:51:12 +01:00
Max Gautier
8e254ec1e8 kubeadm: allow to provide patch inline in inventories
Specifying one directory for kubeadm patches is not ideal:
1. It does not allow working with multiples inventories easily
2. No ansible templating of the patch
3. Ansible path searching can sometimes be confusing

Instead, provide the patch directly in a variable, and add some quality
of life to handle components targeting and patch ordering more
explicitly (`target` and `type` which are translated to the kubeadm
scheme which is based on the file name)
2024-09-10 20:37:14 +02:00
Max Gautier
a8b66fd207 Deduplicate kubeadm_patches tasks
kubernetes/control-plane and kubernetes/kubeadm roles both push kubeadm
patches in the same way.
Extract that code and make it a dependency of both.
This is safe because it's only configuration for kubeadm, which only
takes effect when kubeadm is run.
2024-09-10 17:39:31 +02:00
M. Hamzah Khan
d54cfba6c2 Fix SAN check on newer versions versions of openssl (#11277) 2024-09-09 10:04:27 +01:00
dependabot[bot]
533dbc62fe Bump ara[server] from 1.7.1 to 1.7.2 (#11514)
Bumps [ara[server]](https://github.com/ansible-community/ara) from 1.7.1 to 1.7.2.
- [Commits](https://github.com/ansible-community/ara/compare/1.7.1...1.7.2)

---
updated-dependencies:
- dependency-name: ara[server]
  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>
2024-09-09 08:38:27 +01:00
dependabot[bot]
95f038559b Bump tox from 4.18.0 to 4.18.1 (#11515)
Bumps [tox](https://github.com/tox-dev/tox) from 4.18.0 to 4.18.1.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.18.0...4.18.1)

---
updated-dependencies:
- dependency-name: tox
  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>
2024-09-09 06:04:27 +01:00
Sy Tran Dung
bb724655ae Add favicon in Kubespray website (#11512) 2024-09-09 04:42:27 +01:00
Qasim Mehmood
538a1f2791 Update multus to v4.1.0 and clarify cilium compatibility (#11434)
* Update multus to v4.1.0 and clarify cilium compatibility

* Fix: bug introduced by #10934 where the template would break if multus was defined

* Set priorityClassName to system-node-critical for multus pods
2024-09-09 03:56:27 +01:00
Max Gautier
230cb37626 download_hash: document usage 2024-09-08 14:27:03 +02:00
Max Gautier
dec4e711d1 download_hash: cache request for 'multi-hash' files
This avoid re-downloading the same file for different arch and
re-parsing it
2024-09-08 14:27:03 +02:00
Max Gautier
1b1045c0e2 download_hash: use persistent session
This allows to reuse http connection and be more efficient.
From rough measuring it saves around 25-30% of execution time.
2024-09-08 14:27:02 +02:00
Max Gautier
86855be634 download_hash: document missing support 2024-09-08 14:27:02 +02:00
Max Gautier
b2e64aed4b download_hash: support 'multi-hash' components 2024-09-08 14:27:01 +02:00
Max Gautier
a2644c7a4f download_hash: add support for 'simple hash' components 2024-09-08 14:14:00 +02:00
Max Gautier
e256f74f2a download_hash: propagate new patch versions to all archs 2024-09-08 14:11:47 +02:00
Max Gautier
2710e984c8 download_hash: argument handling with argparse
Allow the script to be called with a list of components, to only
download new versions checksums for those.
By default, we get new versions checksums for all supported (by the
script) components.
2024-09-08 11:13:25 +02:00
Max Gautier
da0e445d69 download_hash.py: support for 'multi-hash' file + runc
runc upstream does not provide one hash file per assets in their
releases, but one file with all the hashes.
To handle this (and/or any arbitrary format from upstreams), add a
dictionary mapping the name of the download to a lambda function which
transform the file provided by upstream into a dictionary of hashes,
keyed by architecture.
2024-09-08 11:13:24 +02:00
Max Gautier
a7616231a4 download_hash.py: generalized and data-driven
The script is currently limited to one hardcoded URL for kubernetes
related binaries, and a fixed set of architectures.

The solution is three-fold:
1. Use an url template dictionary for each download -> this allow to easily
   add support for new downloads.
2. Source the architectures to search from the existing data
3. Enumerate the existing versions in the data and start searching from
   the last one until no newer version is found (newer in the version
   order sense, irrespective of actual age)
2024-09-08 11:13:23 +02:00
Max Gautier
fe60832a02 Remove kubelet_node_{custom_flags,config_extra_args}
There is no need to have an extra variables for this, just use different
values per host (using Ansible group_vars, for example)
2024-09-06 09:35:34 +02:00
Max Gautier
1bc61c9f35 Simplify kubelet-config template
Remove system|kube_master_<resource>_reserved variables.
Those variables are unnecessary because users can simply use the
variables in group_vars if they which to differentiate control plane
nodes from other nodes.

Set conservative defaults for ephemeral-storage and pids for both kube
and system reserved resources.
2024-09-06 09:33:07 +02:00
Max Gautier
872d717105 Add kube|system_reserved CI testing 2024-09-06 09:25:26 +02:00
Max Gautier
1533d40411 Fix kube_reserved_cgroups_for_service_slice
The default value is used across kubespray but only defined in
kubernetes/node.
Move it to kubespray-defaults
2024-09-06 09:25:23 +02:00
Bogdan Sass
4b324cb0f0 Rename master to control plane - non-breaking changes only (#11394)
K8s is moving away from the "master" terminology, so kubespray should follow the same naming conventions. See 65d886bb30/sig-architecture/naming/recommendations/001-master-control-plane.md
2024-09-06 07:56:19 +01:00
Kay Yan
d4bf3b9dc7 cleaup for 2.26.0 (#11511) 2024-09-06 07:02:28 +01:00
Max Gautier
f9ebd45c74 boostrap-os: use import_tasks instead of symlinks (#11508)
Working symlinks are dependant on git configuration (when using the playbook as
a git repository, which is common), precisely `git config
core.symlinks`.

While this is enabled by default, some company policies will disable it.

Instead, use import_tasks which should avoid that class of bugs.
2024-09-05 08:24:49 +01:00
Max Gautier
7f527f6195 Drop support for RHEL 7 / CentOS 7 (#11246)
* Simplify docker systemd unit

systemd handles missing unit by ignoring the dependency so we don't need
to template them.

* Remove RHEL 7/CentOS 7 support

- remove ref in kubespray roles
- move CI from centos 7 to 8
- remove docs related to centos7

* Remove container-storage-setup

Only used for RHEL 7 and CentOS 7
2024-09-05 07:41:01 +01:00
刘旭
3da6c4fc18 Allow for configuring etcd progress notify interval and default set to 5s (#11499) 2024-09-05 06:29:05 +01:00
Max Gautier
e744a117d6 Remove systemd version + ostree check for docker TasksMax (#11493)
systemd ignores unknown keys (with a warning) so version checking is not
necessary.
There is no rationale for excluding it from ostree systems either.
2024-09-02 13:16:57 +01:00
Jongwoo Han
03372d883a upgrade nerdctl to v1.7.6 (#11492)
Signed-off-by: Jongwoo Han <jongwooo.han@gmail.com>
2024-09-01 11:20:44 +01:00
ChengHao Yang
8a961a60c2 Feat: Gateway API CRDs install support (#11376)
* Feat: add Gateway API CRDs installation

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

* Feat: add Gateway API CRDs variable in inventory

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

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-08-31 08:24:45 +01:00
ERIK
db0138b2f9 fix: incorrect member matching when removing etcd nodes (#11488)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-08-31 08:20:44 +01:00
Max Gautier
b0be5f2dad Print the name of faulty jinja templates in pre-commit (#11484) 2024-08-30 06:43:30 +01:00
Kay Yan
27c7dc7008 upgrade helm to v3.15.4 (#11486) 2024-08-30 06:39:30 +01:00
Lihai Tu
acc5e579f6 Add conditional checking on ubuntu kernel unattended_upgrades disabling (#11479)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-08-29 15:47:39 +01:00
Takuya Murakami
60b323b17f [CI] Add a CI job to test cluster upgrading, and fix bug of testcases_run.sh (#11458)
* Fix: fix testcases_run.sh for upgrade tests

Need to git checkout ${CI_COMMIT_SHA} before running upgrade playbook (revert #11173 partially)

* feat: add CI job to test upgrade

Add a packet_ubuntu22-calico-all-in-one-upgrade job
2024-08-29 15:47:32 +01:00
Ehsan Golpayegani
924a979955 Calico v3.28.[0-1] checksums and change calico default version (#11234)
* make calico api server manifest backward compatible with version older than 3.27.3

Add 3.28.1 checksums
Add 3.28.0 checksums
Change default version to 3.27.3

* change default calico version to 3.28.1

* Set mount type to DirectoryOrCreate for hostPath needed by Calico
2024-08-29 12:10:28 +01:00
Max Gautier
5fe8714f05 Adding myself (VannTen) as approver (#11483) 2024-08-29 10:30:29 +01:00
Kay Yan
6acb44eeaf update containerd 1.7.21 (#11478) 2024-08-29 04:22:29 +01:00
Takuya Murakami
c89ea7e4c7 Fix: remove --config option from kubeadm upgrade (#11350) (#11352)
We can't mix some options with --config for kubeadm upgrade.
The --config on upgrade is deprecated, and should be removed.
2024-08-29 03:08:29 +01:00
Selçuk Arıbalı
3d9e4951ce fix static api server advertise address (#11457) 2024-08-28 15:20:56 +01:00
Max Gautier
776b40a329 Adjust task name since we allow empty kube_node (#11474) 2024-08-28 06:35:02 +01:00
Max Gautier
a3d0ba230d Remove kubeadm_version and use kube_version instead (#11473)
We explicitly check for equality so customizing kubeadm_version does not
work at the moment.

Use only one variable instead.
2024-08-28 06:34:56 +01:00
Vlad Korolev
9a7b021eb8 Do not use ‘yes/no’ for boolean values (#11472)
Consistent boolean values in ansible playbooks
2024-08-28 06:30:56 +01:00
R. P. Taylor
5c5421e453 fix double pop of access_ip (#11435) 2024-08-27 16:28:57 +01:00
dependabot[bot]
1798989f99 Bump molecule from 24.7.0 to 24.8.0 (#11460)
Bumps [molecule](https://github.com/ansible-community/molecule) from 24.7.0 to 24.8.0.
- [Release notes](https://github.com/ansible-community/molecule/releases)
- [Commits](https://github.com/ansible-community/molecule/compare/v24.7.0...v24.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-27 14:32:56 +01:00
kyrie
961a6a8c9e fix reset network for tencent OS (#11459)
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
2024-08-26 15:32:08 +01:00
Max Gautier
5b057c7328 Update list of admission plugins with a config file 2024-08-26 14:53:20 +02:00
Max Gautier
d3402736d4 Remove special case for PodNodeSelector
This is already handled by the previous task.
2024-08-26 14:43:00 +02:00
Max Gautier
47c3949477 Change plugins_needs_config list format
Makes easier diff when adding or removing plugins.
2024-08-26 14:42:04 +02:00
Lola Delannoy
2f84567a69 Add containerd config options (#11080)
* chore(containerd): add some config debug options

See: https://github.com/containerd/containerd/blob/v1.7.15/docs/man/containerd-config.toml.5.md

* chore(containerd): add CRI config options

See: https://github.com/containerd/containerd/blob/v1.7.15/docs/man/containerd-config.toml.5.md
See: https://github.com/containerd/containerd/blob/v1.7.15/docs/cri/config.md
2024-08-21 05:13:05 +01:00
dependabot[bot]
171b0e60aa Bump tox from 4.17.1 to 4.18.0 (#11461)
Bumps [tox](https://github.com/tox-dev/tox) from 4.17.1 to 4.18.0.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.17.1...4.18.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-20 02:35:44 -07:00
Mohamed Omar Zaian
c4338687e1 [ingress-nginx] upgrade to 1.11.2 (#11463) 2024-08-19 06:10:27 -07:00
Mohamed Omar Zaian
ad1ce92b41 Update node-feature-discovery to v0.16.4 (#11250) 2024-08-19 05:59:30 -07:00
kokyhm
1093c76f9b bump k8s version (#11455) 2024-08-19 00:12:33 -07:00
ChengHao Yang
c7935e2988 Add tico88612 as reviewer (#11453)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-08-16 07:06:39 -07:00
Ho Kim
0306771c29 fix: cleanup networkmanager dns conf on reset (#11440) 2024-08-15 06:43:19 -07:00
Mengxin Liu
390d74706c [kube-ovn] update version to 1.12.21 (#11445)
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
2024-08-15 06:39:18 -07:00
dependabot[bot]
ce9ba9a8bf Bump tox from 4.16.0 to 4.17.1 (#11442)
Bumps [tox](https://github.com/tox-dev/tox) from 4.16.0 to 4.17.1.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.16.0...4.17.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-14 04:19:37 -07:00
Ho Kim
fe4cbbccd1 fix: correct resolvconf typo (#11439) 2024-08-14 02:07:55 -07:00
Selçuk Arıbalı
e43e08c7d1 fix: use super-admin.conf for kube-vip on first master when it exists (#11422)
* fix: use super-admin.conf for kube-vip when it exists

* Mathieu Parent add as co-author

Co-authored-by: Mathieu Parent <math.parent@gmail.com>

* template change for readability

* fix lint error

---------

Co-authored-by: Mathieu Parent <math.parent@gmail.com>
2024-08-10 21:35:58 -07:00
Cyclinder
28712045a5 bump cni version to v1.4.0 (#10698) 2024-08-10 05:25:58 -07:00
Not Darko
1968db9a52 fix: skip multus when not defined (#10934)
fix task failure:
TASK [kubernetes-apps/network_plugin/multus : Multus | Start resources] ************************************************
fatal: [hfal12k8n1 -> {{ groups['kube_control_plane'][0] }}]: FAILED! => {"msg": "Error in jmespath.search in json_query filter plugin:\n'ansible.vars.hostvars.HostVarsVars object' has no attribute 'multus_manifest_2'"}
2024-08-06 03:42:50 -07:00
Slavi Pantaleev
cc03ca62be Avoid empty "supersede domain-name-servers" directives for dhclient.conf (#10948)
Fixes https://github.com/kubernetes-sigs/kubespray/issues/10947

This patch aims to be minimal and intentionally:

- does not change the generation logic for `supersede_domain` and `supersede_search`
- does not change how `nameserverentries` (for NetworkManager) is built

It seems like `nameserverentries` in the "Generate nameservers for resolvconf, including cluster DNS"
task is built the same way as `dhclient_supersede_nameserver_entries_list`.
However, `nameserverentries` in the "Generate nameservers for resolvconf, not including cluster DNS"
task (below) is built differently for some reason. It includes `configured_nameservers` as well.
Due to these differences, I have refrained from reusing the same building logic
(`dhclient_supersede_nameserver_entries_list`) for both.

If the `configured_nameservers` addition can be removed or made to apply
to dhclient as well, we could potentially build a single list and then
generate the `nameserverentries` and `supersede_nameserver` strings from it.
2024-08-06 03:38:51 -07:00
Injun Baeg
5f18fe739e Restart kube-proxy pods only on configmap changes (#11401) 2024-08-06 00:50:50 -07:00
kyrie
343d680371 fix kylin OS choose NetworkManager (#11406)
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
2024-08-05 03:34:59 -07:00
Mohamed Omar Zaian
3d1653f950 [containerd] add hashes for versions '1.6.32-34', 'v1.7.17-20' and make v1.7.20 default (#11413) 2024-08-05 02:48:07 -07:00
Bas
dd51ef6f96 Bugfix/code inspection. (#11384)
- Make ansible-galaxy collection dependencies explicit
- Reorganized requirements.yml
- Adding required collections to galaxy.yml
- Ansible 9.6.0 was yanked on Pypi
- Sync pre-commit requirements with requirements.txt

Signed-off-by: Bas Meijer <bas.meijer@enexis.nl>
2024-08-02 03:43:54 -07:00
James
4e99b94dcc Add generic post upgrade hooks for node (#11368) 2024-07-31 21:58:48 -07:00
Sanyam Shah
54ac5a6de4 Update cni-kube-ovn.yml.j2 (#11357)
Made corrections in Indentation at L658 which causes kubespray execution failed with YAML to Json conversion. #11356
2024-07-31 21:58:39 -07:00
David
2799f11475 Add support for LB in upcloud private zone (#11260) 2024-07-31 21:58:30 -07:00
Mohamed Omar Zaian
8d497b49a6 [kubernetes] Add hashes for kubernetes 1.29.7, 1.28.[11-12] (#11407) 2024-07-31 03:50:56 -07:00
Kay Yan
86f980393c Merge pull request #11402 from tu1h/fix_centos_baserepo
Check CentOS-Base.repo exists for CentOS 7
2024-07-30 11:08:22 +08:00
Erwan Miran
d469503e84 Make netchecker log levels configurable (#11334)
* Make netchecker log levels configurable

* use ETCD_LOG_LEVEL
2024-07-28 23:57:56 -07:00
tu1h
351832ba1d Check CentOS-Base.repo exists for CentOS 7
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-07-29 13:49:14 +08:00
R. P. Taylor
468c5641b2 fix kube_reserved so it only controls kubeReservedCgroup (#11367) 2024-07-26 01:39:20 -07:00
Ugur Can Ozturk
2299e49e0e [containerd/tracing]: fix containerd tracing templating (#11372)
Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>
2024-07-26 01:30:38 -07:00
Tom M.
c0fabccaf6 Add missing advertise-address flag to Kubeadm config, so it's passed to api-server (#11387) 2024-07-26 01:22:05 -07:00
Kay Yan
2ac5b37aa9 Merge pull request #11391 from tico88612/bump/k8s-1.30.3
Make kubernetes v1.30.3 default
2024-07-26 16:15:01 +08:00
Lihai Tu
8208a3f04f Rename systemd module to systemd_service (#11396)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-07-26 01:11:39 -07:00
Lihai Tu
2d194af85e Limit nodes in gather ansible_default_ipv4 (#11370)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-07-25 19:17:48 -07:00
dependabot[bot]
8022eddb55 Bump ansible-lint from 24.6.1 to 24.7.0 (#11380)
Bumps [ansible-lint](https://github.com/ansible/ansible-lint) from 24.6.1 to 24.7.0.
- [Release notes](https://github.com/ansible/ansible-lint/releases)
- [Commits](https://github.com/ansible/ansible-lint/compare/v24.6.1...v24.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-25 19:06:07 -07:00
Tom M.
242edd14ff Fix etcd certificate to acces address as SAN (#11388) 2024-07-25 18:49:23 -07:00
Bas
8f5f75211f Improving yamllint configuration (#11389)
Signed-off-by: Bas Meijer <bas.meijer@enexis.nl>
2024-07-25 18:42:20 -07:00
dependabot[bot]
5394715d9b Bump jsonschema from 4.22.0 to 4.23.0 (#11381)
Bumps [jsonschema](https://github.com/python-jsonschema/jsonschema) from 4.22.0 to 4.23.0.
- [Release notes](https://github.com/python-jsonschema/jsonschema/releases)
- [Changelog](https://github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/python-jsonschema/jsonschema/compare/v4.22.0...v4.23.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 23:51:24 -07:00
ChengHao Yang
56e26d6061 Bump: CRI-O from v1.30.2 to v1.30.3
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-07-21 21:54:41 +08:00
ChengHao Yang
513e18cb90 Bump: Kubernetes from v1.30.2 to v1.30.3
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2024-07-21 21:54:16 +08:00
ChengHao Yang
5f35b66256 Bump: OpenStack Cloud Controller Manager to 1.30.0 (#11358)
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-07-16 02:22:54 -07:00
ChengHao Yang
bab0398c1e Bump Cinder CSI Plugin to v1.30.0 (#11374)
* Chore: bump cinder-csi-plugin from v1.29.0 to v1.30.0

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

* Docs: update README.md cinder-csi-plugin version

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

---------

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-07-13 02:01:08 -07:00
dependabot[bot]
d993b2b8cf Bump molecule from 24.2.1 to 24.7.0 (#11373)
Bumps [molecule](https://github.com/ansible-community/molecule) from 24.2.1 to 24.7.0.
- [Release notes](https://github.com/ansible-community/molecule/releases)
- [Commits](https://github.com/ansible-community/molecule/compare/v24.2.1...v24.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-13 01:53:08 -07:00
dependabot[bot]
c89f901595 Bump tox from 4.15.0 to 4.16.0 (#11363)
Bumps [tox](https://github.com/tox-dev/tox) from 4.15.0 to 4.16.0.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.15.0...4.16.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-11 05:25:24 -07:00
R. P. Taylor
2615805da2 Increase ansible timeout to 300 (#11354) 2024-07-10 19:19:24 -07:00
ChengHao Yang
464cc716d7 Feat: Update CentOS 7 EOL package to vault.centos.org (#11360)
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-07-08 04:36:52 -07:00
ERIK
1ebd860c13 [kubernetes] Add hashes for kubernetes 1.29.6 (#11351)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-07-05 00:18:25 -07:00
ChengHao Yang
474b259cf8 CI: Remove Debian 10 support & macvlan test move to Debian 12 (#11347)
* CI: macvlan test switch to debian 11 & default job

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

* CI: cilium-svc-proxy test switch to debian 12

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

* CI: remove debian 10 test

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

* Docs: remove debian 10 support

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

---------

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-07-03 09:13:59 -07:00
Takuya Murakami
a0d03d9fa6 [kubernetes] Support kubernetes 1.30.2 (#11343) 2024-07-03 00:06:20 -07:00
Erwan Miran
0bcedd4603 Make local_volume_provisioner log level configurable (#11336) 2024-07-02 07:14:06 -07:00
Erwan Miran
413572eced Make calico-kube-controllers log level configurable (#11335) 2024-07-02 07:13:59 -07:00
dependabot[bot]
0be525c76f Bump ansible-lint from 24.5.0 to 24.6.1 (#11320)
Bumps [ansible-lint](https://github.com/ansible/ansible-lint) from 24.5.0 to 24.6.1.
- [Release notes](https://github.com/ansible/ansible-lint/releases)
- [Commits](https://github.com/ansible/ansible-lint/compare/v24.5.0...v24.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 07:09:59 -07:00
Antoine Legrand
fe97b99984 CI: remove centos7 and weave jobs from test pipeline (#11344)
Centos7 reached EOL and the jobs are failing.
Weave network is an archived project
2024-07-02 04:21:59 -07:00
ChengHao Yang
348335ece5 [cert-manager] upgrade to v1.14.7 (#11341)
* Feat: upgrade cert-manager crd to 1.14.7

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

* Feat: upgrade cert-manager download version to 1.14.7

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

---------

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-07-02 00:19:58 -07:00
Takuya Murakami
ee3fef1051 [kubernetes] Add hashes for kubernetes 1.30 (#11109) (#11261)
Add hashes to crictl, crio, kubelet, kubectl and kubeadm
2024-07-02 00:15:59 -07:00
Antoine Legrand
a0587e0b8e CI: rework pipeline: short/extended based on labels (#11324)
* CI: reduce VM resources requests to improve scheduling

* CI: Reduce default jobs; add labels(ci-full/extended) to run more test

* CI: use jobs dependencies instead of stages

* precommit one-job

* CI: Use Kubevirt VM to run Molecule and Vagrant jobs
2024-07-01 03:25:36 -07:00
Keita Mochizuki
ff18f65a17 add ingress controller svc nodeport param (#11310) 2024-06-30 21:58:05 -07:00
opethema
35e904d7c3 fix image and kube-vip links (#11267) 2024-06-28 18:42:06 -07:00
dependabot[bot]
9a6922125c Bump netaddr from 1.2.1 to 1.3.0 (#11258)
Bumps [netaddr](https://github.com/netaddr/netaddr) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/netaddr/netaddr/releases)
- [Changelog](https://github.com/netaddr/netaddr/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/netaddr/netaddr/compare/1.2.1...1.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-26 07:02:22 -07:00
Max Gautier
821dfbfdba Switch back pre-commit hook misspell to upstream (#11280)
The pull request adding the pre-commit hook config was merged.
2024-06-26 05:14:21 -07:00
ChengHao Yang
cce585066e Bump CNI weave 2.8.1 to 2.8.7 (community version) (#11228)
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-06-26 02:40:27 -07:00
Alexander
619938da95 add the ability to configure extra args to the different cinder-csi-p… (#11169)
* add the ability to configure extra args to the different cinder-csi-plugin containers

* endfor block added to be syntactically correct jinja
2024-06-26 02:40:20 -07:00
Keita Mochizuki
88b502f29d add ingress controller admission svc (#11309) 2024-06-26 02:30:41 -07:00
Serge Hartmann
db316a566d dependencies for kubelet.service (#11297)
Signed-off-by: serge Hartmann <serge.hartmann@gmail.com>
2024-06-26 02:30:34 -07:00
Lihai Tu
817c61695d Support disable unattended-upgrades for Linux kernel and all packages start with linux- on Ubuntu (#11296)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-06-26 02:30:27 -07:00
Lihai Tu
0c84175e3b Bump docker_containerd to 1.6.32 (#11293)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-06-26 02:30:21 -07:00
Elias-elastisys
cae266a045 Upgrade upcloud csi driver to v1.1.0 and add snapshot features (#11303) 2024-06-26 02:26:21 -07:00
Robin Wallace
15b62cc7ce upcloud: v5.6.0 and better server groups (#11311) 2024-06-26 01:42:21 -07:00
Daniil Muidinov
c352773737 fix task Set label to node (#11307) 2024-06-25 06:35:40 -07:00
Kay Yan
af0ac977a5 fix-ci-packet_centos7-calico-ha-once-localhost (#11315)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2024-06-24 20:49:40 -07:00
Aleksander Salamatov
40f5b28302 Update Vagrantfile: fix path for vagrant.md (#11306) 2024-06-24 20:03:40 -07:00
qlijin
2d612cde4d Fix broken links in the cilium doc (#11318) 2024-06-24 19:45:42 -07:00
ERIK
27cb22cee4 update docker cli version for ubuntu (#11291)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-06-24 05:20:56 -07:00
Kay Yan
b7873a0891 add step for k8s upgrade on release process (#11321)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2024-06-23 23:34:57 -07:00
peterw
edce2b528d add cilium_hubble_event_buffer_capacity & cilium_hubble_event_queue_size vars (#10943) 2024-06-23 20:14:56 -07:00
Kay Yan
647092b483 fix openstack cleanup (#11299)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2024-06-21 10:30:55 -07:00
Lihai Tu
921b0c0bed Add options to control images pulling of kubelet (#11094)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-06-21 07:54:54 -07:00
tico88612
24dc4cef56 Feat: upgrade cert-manager from 1.13.2 to 1.13.6 (#11279)
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-06-18 00:45:31 -07:00
Antoine Legrand
3e72be2f72 CI: switch to unprivileged Kaniko to build pipeline images (#11292) 2024-06-11 06:19:02 -07:00
Antoine Legrand
f85e96904d Pipeline image: add qemu-utils (#11281) 2024-06-10 06:53:55 -07:00
Ehsan Golpayegani
0c8d29462d make sure peers is defined. (#11259)
* make sure peers is defined.

* Update peer_with_router.yml
2024-06-04 10:02:23 -07:00
itayporezky
351393e32a Removed unnecessary python modules (#11199) 2024-05-31 07:05:01 -07:00
Kay Yan
b70eaa0470 fix auto bump PR is blocked by label (#11256) 2024-05-31 06:28:48 -07:00
Antoine Legrand
ef6d24a49e CI require a 'lgtm' or 'ok-to-test' labels to pass (#11251)
- Require a 'lgtm' or 'ok-to-test' label for running CI after the
  moderator stage

Signed-off-by: ant31 <2t.antoine@gmail.com>
2024-05-31 03:42:49 -07:00
jmaccabee13
6cf11a9c72 fix Hetzner group names (#11232)
The inventory file generated by Terraform produces the following warnings:
```
[WARNING]:  * Failed to parse <PATH>/kubespray/contrib/terraform/hetzner/inventory.ini with ini plugin:
<PATH>/kubespray/contrib/terraform/hetzner/inventory.ini:21: Section [k8s_cluster:children] includes undefined group: kube-master
...
[WARNING]: Could not match supplied host pattern, ignoring: kube-master

PLAY [Add kube-master nodes to kube_control_plane] ********************************************************************************************************
skipping: no hosts matched
[WARNING]: Could not match supplied host pattern, ignoring: kube-node

PLAY [Add kube-node nodes to kube_node] *******************************************************************************************************************
skipping: no hosts matched
```
2024-05-31 01:29:55 -07:00
Kay Yan
aba79d1b3c Merge pull request #11235 from kubernetes-sigs/dependabot/pip/pytest-testinfra-10.1.1
Bump pytest-testinfra from 10.1.0 to 10.1.1
2024-05-31 10:13:05 +08:00
spnngl
4b82e90dcb fix(bootstrap-os): do not install pkgs requirements on flatcar (#11224)
Fix regression added in 663fcd104c for
flatcar nodes.

See: 663fcd104c
2024-05-30 06:34:25 -07:00
Hedayat Vatankhah (هدایت)
dedc00661a Add 'system-packages' tag to control installing packages from OS repositories (#10872) 2024-05-30 04:25:21 -07:00
Kubernetes Prow Robot
0624a3061a Merge pull request #11239 from VannTen/cleanup/collection-build-test
Cleanup galaxy.yml
2024-05-30 04:10:29 -07:00
Max Gautier
3082fa3d0f Allow empty kube_node group (#11248)
While uncommon, provisioning only a control plane is a valid use case,
so don't block it.
2024-05-30 03:01:38 -07:00
Antoine Legrand
d85b29aae1 owners: move ant31 from emeritus to approvers (#11247) 2024-05-30 02:32:28 -07:00
dependabot[bot]
eff4eec8de Bump pytest-testinfra from 10.1.0 to 10.1.1
Bumps [pytest-testinfra](https://github.com/pytest-dev/pytest-testinfra) from 10.1.0 to 10.1.1.
- [Release notes](https://github.com/pytest-dev/pytest-testinfra/releases)
- [Changelog](https://github.com/pytest-dev/pytest-testinfra/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-testinfra/compare/10.1.0...10.1.1)

---
updated-dependencies:
- dependency-name: pytest-testinfra
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-30 02:38:40 +00:00
Kubernetes Prow Robot
af593465b2 Merge pull request #11226 from VannTen/cleanup/pre-commit-hooks
pre-commit: make hooks self contained + ci config
2024-05-29 19:37:56 -07:00
Max Gautier
870049523f collection support: use manifest instead of excludes
The default for galaxy. `manifest` works well enough for our case, and
this avoids maintaining a blacklist.
2024-05-29 13:57:33 +02:00
Kay Yan
184b1add54 Merge pull request #11236 from kubernetes-sigs/dependabot/pip/ansible-9.6.0
Bump ansible from 9.5.1 to 9.6.0
2024-05-29 17:17:20 +08:00
Max Gautier
37d824fd2d Update pre-commit hooks 2024-05-28 13:28:03 +02:00
Max Gautier
ff48144607 pre-commit: adjust mardownlint default, md fixes
Use a style file as recommended by upstream. This makes for only one
source of truth.
Conserve previous upstream default for MD007 (upstream default changed
here https://github.com/markdownlint/markdownlint/pull/373)
2024-05-28 13:26:49 +02:00
Max Gautier
0faa805525 Remove gitlab-ci job done in pre-commit 2024-05-28 13:26:47 +02:00
Max Gautier
bc21433a05 Run pre-commit hooks in dynamic pipeline
Use gitlab dynamic child pipelines feature to have one source of truth
for the pre-commit jobs, the pre-commit config file.

Use one cache per pre-commit. This should reduce the "fetching cache"
time steps in gitlab-ci, since each job will have a separate cache with
only its hook installed.
2024-05-28 13:26:46 +02:00
Max Gautier
19851bb07c collection-build-install convert to pre-commit 2024-05-28 13:26:46 +02:00
Max Gautier
7f7b65d388 Convert check_typo to pre-commit + use maintained version
client9/misspell is unmaintained, and has been forked by the golangci
team, see https://github.com/client9/misspell/issues/197#issuecomment-1596318684.

They haven't yet added a pre-commit config, so use my fork with the
pre-commit hook config until the pull request is merged.
2024-05-28 13:26:45 +02:00
Max Gautier
d50f61eae5 pre-commit: apply autofixes hooks and fix the rest manually
- markdownlint (manual fix)
- end-of-file-fixer
- requirements-txt-fixer
- trailing-whitespace
2024-05-28 13:26:44 +02:00
Max Gautier
77bfb53455 Fix ci-matrix pre-commit hook
- Remove dependency of pydblite which fails to setup on recent pythons
- Discard shell script and put everything into pre-commit
2024-05-28 13:26:44 +02:00
Max Gautier
0e449ca75e pre-commit: fix hooks dependencies
- ansible-syntax-check
- tox-inventory-builder
- jinja-syntax-check
2024-05-28 13:26:43 +02:00
Max Gautier
f6d9ff4196 Switch to upstream ansible-lint pre-commit hook
This way, the hook is self contained and does not depend on a previous
virtualenv installation.
2024-05-28 13:26:42 +02:00
Max Gautier
21aba10e08 Use alternate self-sufficient shellcheck precommit
This pre-commit does not require prerequisite on the host, making it
easier to run in CI workflows.
2024-05-28 13:26:42 +02:00
dependabot[bot]
bd9d90e00c Bump ansible from 9.5.1 to 9.6.0
Bumps [ansible](https://github.com/ansible-community/ansible-build-data) from 9.5.1 to 9.6.0.
- [Changelog](https://github.com/ansible-community/ansible-build-data/blob/main/docs/release-process.md)
- [Commits](https://github.com/ansible-community/ansible-build-data/compare/9.5.1...9.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-27 03:45:28 +00:00
tico88612
5616a4a3ee Docs: update ubuntu support version & docker version (#11231)
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-05-26 20:14:18 -07:00
Mohamed Omar Zaian
4b9349a052 Update 'KUBESPRAY_VERSION and kube_version_min_required', cleanup old hashes for v2.25.0 (#11221) 2024-05-21 06:08:44 -07:00
Kay Yan
7e0a407250 Merge pull request #11156 from jisnardo/master
Update kube-vip to v0.8.0
2024-05-21 17:26:12 +08:00
Kay Yan
1173711acc Merge pull request #11216 from kubernetes-sigs/dependabot/pip/ansible-lint-24.5.0
Bump ansible-lint from 24.2.3 to 24.5.0
2024-05-21 11:50:40 +08:00
Kubernetes Prow Robot
998e04e5a7 Merge pull request #11212 from VannTen/cleanup/check_sidebar_ci
Check that PRs have correctly ran the sidebar gen
2024-05-20 08:04:33 -07:00
Jorge Isnardo Altamirano
40cbdceb3c Merge branch 'kubernetes-sigs:master' into master 2024-05-20 08:32:00 +02:00
dependabot[bot]
e54e7c0e1d Bump ansible-lint from 24.2.3 to 24.5.0
Bumps [ansible-lint](https://github.com/ansible/ansible-lint) from 24.2.3 to 24.5.0.
- [Release notes](https://github.com/ansible/ansible-lint/releases)
- [Commits](https://github.com/ansible/ansible-lint/compare/v24.2.3...v24.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-20 03:23:19 +00:00
tico88612
53ad8d9126 Docs: fix README.md flannel link (#11208)
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-05-19 04:43:21 -07:00
Max Gautier
96bb0a3e12 sidebar_gen: force C locale
If we don't, find output can change depending on system locale, which
will produce inconsistent results.
2024-05-19 12:04:07 +02:00
Max Gautier
76dae63c69 Check that PRs have correctly ran the sidebar gen 2024-05-19 11:56:30 +02:00
Max Gautier
fae41172ed gen_docs_sidebar: redirect output to sidebar.md as part of the script
The script should be self-sufficient (with no need to manually specify a
redirection).
This makes it easier to run it as part of pre-commit and CI.
2024-05-19 11:54:39 +02:00
tico88612
f85111f6d4 CI: add ubuntu 24.04 support (#11132)
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-05-18 00:35:20 -07:00
Kubernetes Prow Robot
30d057a0a8 Merge pull request #11128 from Payback159/auto-gen-docs-sidebar
add script to generate docs _sidebar.md based on the /docs content
2024-05-17 07:56:35 -07:00
Payback159
4123cf13ef add gen_docs_sidebar.sh result, mark docs/_sidebar.md as a generated file 2024-05-17 15:09:54 +02:00
Payback159
5d01dfa179 add auto generate documentation sidebar script, introduce script as pre-commit-hook, adapt existing scripts to work with documentation structure 2024-05-17 15:09:54 +02:00
Payback159
4dbfd42f1d modify doc structure and update existing doc-links as preparation for new doc generation script 2024-05-17 15:09:54 +02:00
peterw
0b464b5239 crio container runtime crio_registries path fix (#11030) 2024-05-17 04:39:24 -07:00
ERIK
dac4705ebe bump docker version for openeuler linux (#11206)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-05-17 04:24:38 -07:00
Lihai Tu
d5f6838fba Bump scheduler plugins version (#11205)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-05-17 02:05:35 -07:00
ERIK
354ffe7bd6 bump docker version of kylin and uos (#11203)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-05-17 01:58:23 -07:00
tico88612
427f868718 Bump docker version 26.1 (#11198)
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-05-16 06:05:26 -07:00
QCU
d7756d85ef fix: Change the position of the containerd_extra_args parameter to make the parameter more universal. (#11013)
that you can only place thing in the root table in a toml document before the first table heading.
2024-05-16 00:41:26 -07:00
dependabot[bot]
2c2b2ed96e Bump pbr from 5.11.1 to 6.0.0 (#11188)
Bumps [pbr](https://docs.openstack.org/pbr/latest/) from 5.11.1 to 6.0.0.

---
updated-dependencies:
- dependency-name: pbr
  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>
2024-05-16 00:32:12 -07:00
Kay Yan
361d2def09 Merge pull request #11196 from mzaian/add-k8s-new-hashes-1.29.5
[kubernetes] Add hashes for kubernetes 1.29.5, 1.28.10, 1.27.14
2024-05-16 12:16:35 +08:00
dependabot[bot]
f47ad82991 Bump ara[server] from 1.7.0 to 1.7.1 (#11178)
Bumps [ara[server]](https://github.com/ansible-community/ara) from 1.7.0 to 1.7.1.
- [Commits](https://github.com/ansible-community/ara/compare/1.7.0...1.7.1)

---
updated-dependencies:
- dependency-name: ara[server]
  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>
2024-05-15 05:43:19 -07:00
dependabot[bot]
f488ecb6cc Bump cryptography from 41.0.4 to 42.0.7 (#11187)
Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.4 to 42.0.7.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/41.0.4...42.0.7)

---
updated-dependencies:
- dependency-name: cryptography
  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>
2024-05-15 05:39:34 -07:00
Mohamed Omar Zaian
08293f2ef7 [kubernetes] Add hashes for kubernetes 1.29.5, 1.28.10, 1.27.14 2024-05-15 10:44:47 +02:00
Mohamed Omar Zaian
fe1a2d5dd9 [argocd] update argocd to v2.11.0 (#11193) 2024-05-14 19:34:31 -07:00
Max Gautier
73c2722d00 rockylinux vagrant boxes only boot in UEFI mode (#11192)
https://forums.rockylinux.org/t/vagrant-box-rockylinux-8-v7-0-0-with-libvirt-provider-fails-to-boot/8212
2024-05-14 09:11:12 -07:00
Kay Yan
a5714a8c6b change dependbot to interval weekly (#11189) 2024-05-14 03:09:11 -07:00
hayden
e410e30694 Change a task name in preinstall/0080-system-configurations.yml (#11171) 2024-05-14 00:39:11 -07:00
Max Gautier
0b2533143f Don't force python interpreter on ubuntu (#11183)
This allows local override in tasks for using virtualenvs.
2024-05-13 19:51:11 -07:00
Max Gautier
3e4ea1065a Add the official vagrant boxes for debian 11/12 (#11135) 2024-05-13 18:43:10 -07:00
Mohamed Omar Zaian
6dbb09435c [ingress-nginx] upgrade to 1.10.1 (#11184) 2024-05-13 18:39:10 -07:00
Max Gautier
d8a4aea9bc Revert "support CoreDNS use host network and config dns port (#10617)" (#11185)
This reverts commit bc5b38a771.
2024-05-13 14:51:11 -07:00
dependabot[bot]
a8f58c244b Bump yamllint from 1.32.0 to 1.35.1 (#11177)
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.32.0 to 1.35.1.
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.32.0...v1.35.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 08:58:49 -07:00
dependabot[bot]
169280ba64 Bump markupsafe from 2.1.3 to 2.1.5 (#11176)
Bumps [markupsafe](https://github.com/pallets/markupsafe) from 2.1.3 to 2.1.5.
- [Release notes](https://github.com/pallets/markupsafe/releases)
- [Changelog](https://github.com/pallets/markupsafe/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/markupsafe/compare/2.1.3...2.1.5)

---
updated-dependencies:
- dependency-name: markupsafe
  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>
2024-05-13 08:49:45 -07:00
tico88612
fa03f4ffd0 Fix: sample inventory local path provisioner image repo (#11180)
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-05-13 08:39:37 -07:00
Kay Yan
7aa415e707 fix-container-selinux-amzn-linux (#11182) 2024-05-13 07:39:33 -07:00
Alexander
cd459a04f3 Revert OCCM standard dnsPolicy to ClusterFirst and make dnsPolicy configurable to support 10618 (#11168) 2024-05-13 03:25:09 -07:00
user81230
a00b0c48fe Update recover-control-plane.md (#11155)
#10844 Copy node instead of move
2024-05-13 03:25:00 -07:00
dependabot[bot]
8a1ee990a2 Bump molecule from 6.0.2 to 24.2.1 (#11150)
Bumps [molecule](https://github.com/ansible-community/molecule) from 6.0.2 to 24.2.1.
- [Release notes](https://github.com/ansible-community/molecule/releases)
- [Commits](https://github.com/ansible-community/molecule/compare/v6.0.2...v24.2.1)

---
updated-dependencies:
- dependency-name: molecule
  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>
2024-05-13 03:24:51 -07:00
dependabot[bot]
523d016767 Bump pytest-testinfra from 9.0.0 to 10.1.0 (#11149)
Bumps [pytest-testinfra](https://github.com/pytest-dev/pytest-testinfra) from 9.0.0 to 10.1.0.
- [Release notes](https://github.com/pytest-dev/pytest-testinfra/releases)
- [Changelog](https://github.com/pytest-dev/pytest-testinfra/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-testinfra/compare/9.0.0...10.1.0)

---
updated-dependencies:
- dependency-name: pytest-testinfra
  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>
2024-05-13 03:24:42 -07:00
Max Gautier
d321e42d9e CI: Factorize ansible-playbook flags (#11173)
We have inconsistent sets of options passed to the playbooks during our
CI runs.

Don't run ansible-playbook directly, instead factorize the execution in
a bash function using all the common flags.
Also remove various ENABLE_* variables and instead directly test for the
relevant conditions at execution time, as this makes it more obvious and
does not force one to go back and forth in the script.
2024-05-13 03:20:48 -07:00
Ugur Can Ozturk
a512b861e0 [etcd/tracing]: fix etcd sampling rate flag (#11175)
Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>
2024-05-13 03:14:39 -07:00
Max Gautier
d870a3ee4e Avoid potential loop_var shadowing (#11162)
With CentOS, kubespray currently produces the following warning:

[WARNING]: TASK: bootstrap-os : Enable Oracle Linux repo: The loop variable
'item' is already in use. You should set the `loop_var` value in the
`loop_control` option for the task to something else to avoid variable
collisions and unexpected behavior.

This could bites us in nasty ways, so fix it.
2024-05-13 03:14:30 -07:00
Max Gautier
41036e3b53 Enable opensuse in CI (#11159)
It works, so let's ensure it continues to work.
2024-05-10 10:59:43 -07:00
Kay Yan
975362249c add-ubuntu-2404-image (#11167) 2024-05-09 05:40:21 -07:00
Franz Nemeth
ce2642f27b feat: Adding a check which determines if cgroups are enabled on a node (#11163) (#11165) 2024-05-09 05:40:03 -07:00
tico88612
5dc12b2a15 Bump openstack-cloud-controller-manager from 1.25.3 to 1.28.2 (#11174)
Registry change to registry.k8s.io

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-05-08 02:45:36 -07:00
dependabot[bot]
edc33888a3 Bump ansible-lint from 6.22.2 to 24.2.3 (#11151)
Bumps [ansible-lint](https://github.com/ansible/ansible-lint) from 6.22.2 to 24.2.3.
- [Release notes](https://github.com/ansible/ansible-lint/releases)
- [Commits](https://github.com/ansible/ansible-lint/compare/v6.22.2...v24.2.3)

---
updated-dependencies:
- dependency-name: ansible-lint
  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>
2024-05-08 02:15:31 -07:00
Max Gautier
8c12dedf05 Fix amazon linux bootstrap (#11139)
c58497cde (Refactor bootstrap-os (#10983), 2024-03-27) refactored the
boostrap-os include but didn't adapt the amazon linux tasks to the
actual ID of amazon linux ('amzn')

Re-enable the CI so we can avoid that kind of breakage.
2024-05-08 02:15:23 -07:00
Mohammad Reza Ghahramani
1697182e73 Fixed some urls in offline.yml file that wasn't yml formatted (#11127) 2024-05-08 02:15:14 -07:00
dependabot[bot]
1c638bdb06 Bump jinja2 from 3.1.3 to 3.1.4 (#11166)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  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>
2024-05-08 02:09:27 -07:00
dependabot[bot]
7eaf2bc4b8 Bump ruamel-yaml from 0.18.5 to 0.18.6 (#11147)
Bumps [ruamel-yaml]() from 0.18.5 to 0.18.6.

---
updated-dependencies:
- dependency-name: ruamel-yaml
  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>
2024-05-08 02:09:13 -07:00
Daniel Strufe
0b0faf8f72 Update external huawei cloud controller to 0.26.8 (#11172)
* Update external huawei cloud controller to 0.26.8

* Update huawei cloud controller templates

* Add security-group-id to config

* git fail
2024-05-08 01:36:31 -07:00
Jorge Isnardo Altamirano
9bb38163c2 Merge branch 'master' of github.com:jisnardo/kubespray 2024-05-07 11:38:24 +02:00
Jorge Isnardo Altamirano
a09c73a356 Update kube-vip manifests to v0.8.0 2024-05-07 11:38:13 +02:00
dependabot[bot]
d94f3ce965 Bump ansible from 9.3.0 to 9.5.1 (#11157)
Bumps [ansible](https://github.com/ansible-community/ansible-build-data) from 9.3.0 to 9.5.1.
- [Changelog](https://github.com/ansible-community/ansible-build-data/blob/main/docs/release-process.md)
- [Commits](https://github.com/ansible-community/ansible-build-data/compare/9.3.0...9.5.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 02:11:09 -07:00
Vladimir Shaikovskii
966a8b95de [metallb] Add variable for the metallb namespace (#11136) 2024-05-06 02:11:02 -07:00
MatthieuFin
a01d0c047a fix: 🐛 patch calico node to avoid vxlan tunnel drop (#11097)
if node.projectcalico.org already existe patch node to set asNumber
instead of apply resource to prevent remove of existing fields feed by
calico-node pods

 Closes: 11096
2024-05-05 20:30:59 -07:00
Max Gautier
21e8809186 Use official rockylinux vagrant boxes + add version 9 (#11160) 2024-05-05 19:59:02 -07:00
Max Gautier
4cb688d5e4 Fix CentOS typo (#11161)
The name reported in ansible_distribution is "CentOS", so this could
break some things.
2024-05-05 19:52:18 -07:00
Aya (Igarashi) Ozawa
e385ac7b40 Add jsonschema to python requirement packages (#11154) 2024-05-03 03:50:27 -07:00
hayden
5ce530c909 Merge stops and removes systemd services tasks in reset playbook (#10902) 2024-05-03 02:34:06 -07:00
Daniel Rodriguez
f82cf29a8a Add calico v3.27.3 (#11059) 2024-05-03 02:27:39 -07:00
Mohamed Omar Zaian
9f62f60814 [kubernetes] Add hashes for kubernetes 1.29.4, 1.28.9, 1.27.13 (#11108) 2024-05-03 02:20:51 -07:00
Kri5
315cfe1edd Fixes additional disks with Virtualbox for Vagrant (#11091)
When using the kube_node_instancers_with_disks* variables, there were
no configuration block using those to provision disks with the
VirtualBox provider.

This commit fixes it.
2024-05-03 02:20:45 -07:00
Ehsan Golpayegani
e01355834b Update k8s-net-calico.yml (#11113)
removed the confusing comment about defaulting to `kube_network_node_prefix` as we are not really defaulting to it when cni is Calico
2024-05-03 01:13:19 -07:00
Jorge Isnardo Altamirano
001df231a6 Merge branch 'kubernetes-sigs:master' into master 2024-05-03 07:56:12 +02:00
Jorge Isnardo Altamirano
def88b26a4 Update kube-vip manifests to v0.8.0 2024-05-02 16:46:53 +02:00
Jorge Isnardo Altamirano
537891a380 Update kube-vip manifests to v0.8.0 2024-05-02 16:37:49 +02:00
dependabot[bot]
85ae701b0f Bump netaddr from 0.9.0 to 1.2.1 (#11148)
Bumps [netaddr](https://github.com/netaddr/netaddr) from 0.9.0 to 1.2.1.
- [Release notes](https://github.com/netaddr/netaddr/releases)
- [Changelog](https://github.com/netaddr/netaddr/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/netaddr/netaddr/compare/0.9.0...1.2.1)

---
updated-dependencies:
- dependency-name: netaddr
  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>
2024-05-02 01:37:46 -07:00
Jorge Isnardo Altamirano
e57e958a39 Update kube-vip to v0.8.0 2024-05-02 09:45:30 +02:00
Mohamed Omar Zaian
91dea023ae [containerd] add hashes for versions '1.6.30-31', 'v1.7.16' and make v1.7.16 default (#11142) 2024-04-30 04:20:29 -07:00
Lihai Tu
245454855d Add additional checking for calico rr cluster_id (#11112)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-04-30 03:46:30 -07:00
Denis Khachyan
3a112e834c ingress-nginx: added ability to enable opentelemetry nginx module (#11034) 2024-04-30 03:46:17 -07:00
dependabot[bot]
cf0de0904c Bump tzdata from 2023.3 to 2024.1 (#11121)
Bumps [tzdata](https://github.com/python/tzdata) from 2023.3 to 2024.1.
- [Release notes](https://github.com/python/tzdata/releases)
- [Changelog](https://github.com/python/tzdata/blob/master/NEWS.md)
- [Commits](https://github.com/python/tzdata/compare/2023.3...2024.1)

---
updated-dependencies:
- dependency-name: tzdata
  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>
2024-04-30 02:16:26 -07:00
dependabot[bot]
d772350b04 Bump molecule-plugins[vagrant] from 23.5.0 to 23.5.3 (#11120)
Bumps [molecule-plugins[vagrant]](https://github.com/ansible-community/molecule-plugins) from 23.5.0 to 23.5.3.
- [Release notes](https://github.com/ansible-community/molecule-plugins/releases)
- [Commits](https://github.com/ansible-community/molecule-plugins/compare/v23.5.0...v23.5.3)

---
updated-dependencies:
- dependency-name: molecule-plugins[vagrant]
  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>
2024-04-30 01:07:08 -07:00
dependabot[bot]
3351dc0925 Bump jinja2 from 3.1.2 to 3.1.3 (#11119)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  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>
2024-04-30 00:36:09 -07:00
Patrick
f0e20705aa Add Calico v3.27.3 and make it default (#11141)
* Add Calico v3.27.3 and make it default

* Add Calico v3.27.3 and make it default

* Update README.md
2024-04-30 00:20:42 -07:00
dependabot[bot]
ff4e572e0c Bump tox from 4.11.3 to 4.15.0 (#11133)
Bumps [tox](https://github.com/tox-dev/tox) from 4.11.3 to 4.15.0.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.11.3...4.15.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-30 00:20:33 -07:00
Kubernetes Prow Robot
97e71da97b Merge pull request #11131 from VannTen/design/modular_pkgs_install
Fine grained OS packages installation
2024-04-30 00:20:24 -07:00
RaSerge
a7f98116ca fix: updating the calico-crds (#11089) 2024-04-30 00:15:09 -07:00
Max Gautier
088b1b0cec Add enabled to pkgs to handle ipvs
Some packages requirements depends on inventory variables
(`kube_proxy_mode` in that case but it could apply to others).

As the case seems pretty rare, instead of adding complexity to pkgs, we
add an escape hatch to use jinja conditions.
That should be revisited if we find ourselves shoehorning lots of logic
in this later on.
2024-04-29 21:22:23 +02:00
Max Gautier
11f35e462c Convert common packages to use the new tooling
The empty dict means that packages will always be installed on the host.
2024-04-29 21:22:22 +02:00
Max Gautier
da3ff1cc11 Convert OS specific packages to new format
Uses the logic introduced in the previous patch to convert all
kubernetes/preinstall/vars/* os specific files to the `pkgs`
dictionary.

Some niceties for devs:
- always validate the `pkgs` variable to catch mistakes in CI.
- ensure that `pkgs` is always sorted. This makes it easier to find the
  packages you're looking for.
2024-04-29 21:22:21 +02:00
Max Gautier
663fcd104c Filter packages installation by OS and by group
Adds infrastructure to install OS packages depending not only on OS
(family, versions, etc) but on groups.
All the informations related to a particular package should reside in
the `pkgs` dictionnary, which takes inspiration from the `downloads`
dictionary structure.
2024-04-29 21:22:20 +02:00
Max Gautier
a2019c1c24 Add a JSON schema describing the packages install structure
Since the structure we're setting in place for installing packages has
some complexity, add a JSON schema to avoid frustrating errors when
modifying the informations (adding/removing packages install).
2024-04-29 21:22:19 +02:00
Max Gautier
3a43ac4506 Don't special case openssl for tumbleweed
openssl 1.1.1 is EOL since 12 September 2023, so just use the default
version on tumbleweed like we do on other distributions.
2024-04-29 21:22:18 +02:00
Max Gautier
f91e00a61b preinstall: Move ipvs packages into defaults 2024-04-29 21:22:15 +02:00
Mathieu Parent
c6bdc38776 containerd: allow to configure fallback server (#10988)
Also nerdctl limitation is now removed as we use /etc/containerd/certs.d/
2024-04-29 05:41:47 -07:00
Max Gautier
08a7010e80 Revert "Only download kubeadm images where needed (#10899)" (#11105)
This reverts commit 4b0a134bc9.

The mentionned PR break scale.yml. This goes back to the status quo
until a proper fix can be provided, at which point we'll reapply the
PR.
2024-04-29 01:59:51 -07:00
Pavan Gunda
538deff9ea ntp: add config to filter and set ntp interfaces (#11066)
* ntp: add config to set which interface ntp should listen

* Fixed config to only have one variable
2024-04-25 07:51:45 -07:00
tico88612
cd7d11fea2 Feat: dependabot initial config (#11084)
* Feat: dependabot initial config

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

* Feat: ignore yaml lint check .github path

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

---------

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-04-25 01:34:39 -07:00
Lihai Tu
23b56e3f89 Enclose the cpu type with quotation marks in kubelet-config.v1beta1 (#11111)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-04-25 00:32:06 -07:00
Devesh Kumar
eee5b5890d feat: Add support for cilium 1.15 and updated cilium to v1.15.4 (#11106) 2024-04-23 19:42:11 -07:00
Ugur Can Ozturk
ab0ef182fb [containerd/tracing]: add distributed tracing config flags (#11103)
* [containerd/tracing]: add distributed tracing config flags

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>

* [containerd/tracing]: add distributed tracing config flags -fix

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>

---------

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>
2024-04-23 00:24:19 -07:00
MatthieuFin
4db3e2c3cf fix: 🐛 calico-cni-plugin missing RBAC (#11077)
To configure node asNumber for per node peering service account
calico-cni-plugin need nodes/status update rights

 Closes: 11076
2024-04-22 10:09:37 -07:00
MatthieuFin
3d19e744f0 feat(calico): add support filters on bgppeers per node definition (#11079)
Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
2024-04-21 19:35:34 -07:00
Lilian ARAGO
929c818b63 Fixed joined_control_planes when ansible_hostvars references a variable (#11060) 2024-04-19 03:20:58 -07:00
Alexander
4baa2c8704 set default containerd_version to v1.7.15 and add checksums (#11083)
* set default containerd_version to v1.7.15 and add checksums for v1.7.14 and v1.7.15

* update containerd version in README.md
2024-04-16 19:33:15 -07:00
Abhishek Jain
f3065cc5c4 bump skopeo version and checksum (#11044)
Signed-off-by: Abhishek Jain <jain.abhishek1991@gmail.com>
2024-04-16 01:19:27 -07:00
Kay Yan
ed2059395c Remove the archived debian apt repository (#11088)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2024-04-16 00:21:55 -07:00
kyrie
8919901ed5 fix python regex matching problem when finding docker packages (#11075) 2024-04-14 19:55:18 -07:00
kyrie
cc0c3d73dc fix reset/main.yml lsattr command error when kubelet has symbolic link (#11074)
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
2024-04-14 19:55:05 -07:00
kyrie
dd0f42171f fix kubespray-defaults: Check for boostrap-os FQCN (#11073) 2024-04-14 18:21:11 -07:00
Barry M
1b870a1862 Update kubelet systemd service default allowed IP addresses for cluster hardening (#11061)
Signed-off-by: bmelbourne <barry.melbourne0@gmail.com>
2024-04-11 00:58:27 -07:00
J
8a423abd0f Update Snapshot controller to v7.0.2 (#11041)
Upgrade Snapshot controller installed for all supported Kubernetes
versions to v7.0.2. Also update the manifests used to deploy the
Snapshot controller.
2024-04-10 20:38:08 -07:00
Barry M
3ec2e497c6 Update kubelet-csr-approver to v1.1.0 (#11070)
Signed-off-by: bmelbourne <barry.melbourne0@gmail.com>
2024-04-10 18:57:02 -07:00
Mathieu Parent
7844b8dbac Promote nodelocaldns daemonset to system-node-critical (#11056)
As upstream
2024-04-09 19:48:01 -07:00
kyrie
e87040d5ba change debian8 network manage service from networking to systemd-networkd (#11058)
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
2024-04-09 06:50:39 -07:00
Mathieu Parent
d58343d201 Document "Remove access to cluster from anonymous users" (#11068)
See https://github.com/kubernetes-sigs/kubespray/pull/11016
2024-04-09 03:34:36 -07:00
Sergey
b2cce8d6dc force update helm repo if exists on host (#11043) 2024-04-08 19:02:48 -07:00
Robert Volkmann
3067e565c0 Fix calico host local ipam (#11022)
* Prevent upgrade-ipam for host-local IPAM

Otherwise, the init container upgrade-ipam would clear the state of the host-local plugin, potentially causing it to reassign IPs that are still in use.

* USE_POD_CIDR required for host-local

4efd1bfd91/charts/calico/templates/calico-node.yaml (L279)
4efd1bfd91/charts/calico/templates/calico-typha.yaml (L133)
2024-04-03 00:52:31 -07:00
Nicolas Goudry
c6fcbf6ee0 Remove access to cluster from anonymous users (#11016)
* feat: add user facing variable with default

* feat: remove rolebinding to anonymous users after init and upgrade

* feat: use file discovery for secondary control plane nodes

* feat: use file discovery for nodes

* fix: do not fail if rolebinding does not exist

* docs: add warning about kube_api_anonymous_auth

* style: improve readability of delegate_to parameter

* refactor: rename discovery kubeconfig file

* test: enable new variable in hardening and upgrade test cases

* docs: add option to config parameters

* test: multiple instances and upgrade
2024-04-02 23:54:12 -07:00
ERIK
fdf5988ea8 revert crictl version (#11042)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-04-01 18:43:53 -07:00
Kay Yan
a7d42824be Merge pull request #11036 from mzaian/etcd-3512
[etcd] make etcd 3.5.12 default
2024-04-01 14:57:48 +08:00
peterw
9ef6678b7e configure crio to use kube reserved cgroups (#11028) 2024-03-31 22:21:33 -07:00
Mohamed Omar Zaian
70a54451b1 [etcd] make etcd 3.5.12 default 2024-03-30 05:01:01 +01:00
Max Gautier
c6758fe544 Cleanup of kubernetes/preinstall (#11010)
* Move fedora ansible python install to bootstrap-os

* /bin/dir is set in bootstrap-os

* Removing ansible_os_family workarounds

Support for these distributions was merged in Ansible, no need to
override it ourselves now.
https://github.com/ansible/ansible/pull/69324 openEuler
https://github.com/ansible/ansible/pull/77275/ UnionTech OS Server 20
https://github.com/ansible/ansible/pull/78232/ Kylin

* Don't unconditionnaly set VARIANT_ID=coreos in os-release

WTF, this is so wrong.
Furthermore, is_fedora_coreos is already handled in boostrap-os

* Handle Clearlinux generically

Followup of 4eec302e86 (since we're using
package module anyway, let's get rid of the custom task)
2024-03-28 15:17:52 -07:00
itayporezky
10315590c7 Change hard-coded URLs to use variables (#11031) 2024-03-27 20:44:25 -07:00
Mohamed Omar Zaian
03ac02afe4 [kubernetes] Add hashes for kubernetes 1.29.3, 1.28.8, 1.27.12 (#11035) 2024-03-27 12:30:27 -07:00
Arthur Outhenin-Chalandre
fd83ec9d91 kubespray-defaults: regenerate checksums and bump various versions (#10999)
Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
2024-03-27 06:02:53 -07:00
Max Gautier
c58497cde9 Refactor bootstrap-os (#10983)
* Remove leftover files for Coreos

Coreos was replaced by flatcar in 058438a25 but the file was copied
instead of moved.

* Remove workarounds for resolved ansible issues

* boostrap: Use first_found to include per distro

Using directly ID and VARIANT_ID with first_found allow for less manual
includes.
Distro "families" are simply handled by symlinks.

* boostrap: don't set ansible_python_interpreter

- Allows users to override the chosen python_interpreter with group_vars
  easily (group_vars have lesser precedence than facts)
- Allows us to use vars at the task scope to use a virtual env

Ansible python discovery has improved, so those workarounds should not
be necessary anymore.
Special workaround for Flatcar, due to upstream ansible not willing to
support it.
2024-03-27 05:58:53 -07:00
kyrie
baf4842774 make kube-vip LeaderElection variables configurable (#11021)
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
2024-03-25 02:24:57 -07:00
David
01c86af77f Make proxy protocol in upcloud LB configurable (#10971) 2024-03-22 16:08:59 -07:00
Tom M
e7d29715b4 Add kubelet_cpu_manager_policy_options (#11023) 2024-03-22 12:21:39 -07:00
ERIK
30da721f82 fix: config hostname as string type in kubeadmConf rendering (#10997)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-03-22 03:54:25 -07:00
Gary Miguel
a1cf8291a9 spelling: scrapper -> scraper (#11015) 2024-03-15 07:34:30 -07:00
Max Gautier
ef95eb078a Cleanup unused CI tooling (#11014) 2024-03-15 03:57:27 -07:00
Max Gautier
7ddc175b70 Show log on vagrant (#10958)
Should make it easier to understand what's going on when testing locally
and in CI.
2024-03-14 07:37:23 -07:00
Max Gautier
3305383873 Fix ansible python version range (#11009) 2024-03-14 05:54:31 -07:00
Max Gautier
7f6ca804a1 Upgrade ansible-core to 2.16.4 (#10984)
* upgrade ansible version

Needed for with_first_found to work correctly:
https://github.com/ansible/ansible/issues/70772 fixed in 2.16

* Remove unused google cloud cloud_playbook

* Fix dpkg_selection on non-existing packages

Needed since ansible-core>2.16, see:
f10d11bcdc
2024-03-14 02:12:45 -07:00
ABW
7f785a5e4e Fix of ingress selector typo (#10976)
* feat/add default ingress-nginx service

feat/add default ingress-nginx service

feat/add default ingress-nginx service

feat/add default ingress-nginx service

* fix/ingress selector typo
2024-03-11 13:41:03 -07:00
Clement Phu
eff331ad32 Upgrade Nerdctl version to 1.7.4 (#10968) 2024-03-11 13:35:07 -07:00
Max Gautier
71fa66c08d Delete old leftover script (#10996) 2024-03-11 13:28:00 -07:00
Arthur Outhenin-Chalandre
26af6c7fda scripts: ignore download_hash download failures (#10998)
* scripts: ignore download_hash download failures

Binary names on github releases often change and this script might break
because of that, this commit allow to ignore these failures as a mean to
be able to run the script anyway.

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>

* scripts: use sha256sums for crio as well

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>

* scripts: add ppc64le support for crio

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
2024-03-11 09:36:56 -07:00
Arthur Outhenin-Chalandre
43c1e3b15e scripts: refactor scripts/download_hash.sh (#10713)
The new version brings the following improvements:
- remove having to resort to python python to limit tags (it it slower than
the sh equivalent as python has a somewhat significant startup time).

- Introduce a concept of min version so that it can only get Kubernetes
version supported by Kubespray.

- Fix an issue with kata changing their file scheme (the arch
  specifically)

- Now download sha256/sha256sum files if provided rather than
  downloading the full file and computing the hash

- A few minor style tweaks

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr.fr>
2024-03-11 04:53:26 -07:00
Ricky Kwan
69bf6639f3 Fix typo in selector (#10994) 2024-03-11 03:07:37 -07:00
Noam
c275b3db37 update checksum for crio 1.29.1 (#10952)
* update checksum for crio 1.29.1

* update crio bin's names

* crio_conmon for 1.29

* remove unrequired change
2024-03-11 02:56:35 -07:00
Mohamed Omar Zaian
66eaba3775 [calico] Add hashes and make v3.27.2 default (#10960) 2024-03-10 00:20:17 -08:00
joy717
44950efc34 fix ssh_args in ansible.cfg no effect (#10981) 2024-03-07 01:06:35 -08:00
Kay Yan
90b0151caf support node feature discovery (#10861)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2024-03-05 08:36:08 -08:00
Clement Phu
04e40f2e6f Add configuration to create cilium CNI plugin file when cilium>=1.14.0 (#10966) 2024-03-02 20:56:06 -08:00
Clement Phu
7a9def547e Upgrade Helm to v3.14.2 (#10967) 2024-02-27 18:10:19 -08:00
Kay Yan
4317723d3c cleanup-for-2.24.1 (#10962) 2024-02-27 00:24:34 -08:00
Ludovic Logiou
26034b296e Bump cinder-csi version and switch container registry (#10894)
* Bump cinder-csi version and switch container registry

Signed-off-by: Ludovic Logiou <ludovic.logiou@gmail.com>

* Update roles/kubespray-defaults/defaults/main/download.yml

Co-authored-by: Mohamed Omar Zaian <mohamedzaian@gmail.com>

---------

Signed-off-by: Ludovic Logiou <ludovic.logiou@gmail.com>
Co-authored-by: Mohamed Omar Zaian <mohamedzaian@gmail.com>
2024-02-22 05:06:40 -08:00
jaszil
e250bb65bb [Terraform-Openstack] Add optional Octavia loadbalancer for Master Nodes (#10924)
* terraform-openstack add optional master lb

* remove unnecessary spaces

* remove unnecessary spaces

* fix ci warnings
2024-02-19 17:42:21 -08:00
Max Gautier
12c8d0456f Move perma failing jobs in CI to manual run (#10886)
Should free CI resources
2024-02-19 10:00:39 -08:00
Max Gautier
667bb2c913 Remove holmsten from approver (contrib/terraform) (#10936)
As they're no longer in kubernetes-sigs org.
2024-02-19 09:46:29 -08:00
Max Gautier
d40b073f97 Add extra_vars support to vagrant setup (#10932) 2024-02-19 02:58:20 -08:00
Ricky Kwan
5d822ad8cb Support overriding cni directory owner (#10929) 2024-02-19 02:58:11 -08:00
Max Gautier
4a259ee3f0 Remove mirwan from approvers (#10930)
Since they are no longer in the kubernetes-sigs organization, they can
no longer be assigned PR to approve.
2024-02-19 02:53:00 -08:00
Alin Dragomir
b34b7e0385 Add new OpenStack Cloud for terraform (#10910) 2024-02-19 02:52:51 -08:00
ABW
a0d2bda742 feat/add default ingress-nginx service (#10925)
feat/add default ingress-nginx service

feat/add default ingress-nginx service

feat/add default ingress-nginx service
2024-02-19 02:47:36 -08:00
Max Gautier
c13b21e830 Explicit private/public nature of *ip vars (#10904) 2024-02-19 02:00:26 -08:00
R. P. Taylor
9442f28c60 do not disable SELinux surreptitiously (#10920) 2024-02-17 20:17:40 -08:00
anders-elastisys
8fa5ae1865 bin: improve manage-offline-container-images script (#10857)
Fixes bug for retrieving images with tags containing image digests.
Script now gets images from jobs and cronjobs as well.
New env variable DESTINATION_REGISTRY to push to another registry
instead of local registry.
New env variable IMAGES_FROM_FILE to pull images listed in a file
instead of getting images from a running k8s environment.
New env variable REGISTRY_PORT to override port (default is 5000).
2024-02-17 19:34:29 -08:00
Max Gautier
65b0604db7 download: Remove deleted kubeadm config field (#10931) 2024-02-16 05:08:43 -08:00
Mohamed Omar Zaian
082ac10fbb [kubernetes] Add hashes for kubernetes 1.29.2, 1.28.7, 1.27.11 (#10919) 2024-02-16 01:40:58 -08:00
Radek Smid
8d5091a3f7 fix: Kubelet not starting because of non-existent feature gate (#10448) 2024-02-16 01:27:46 -08:00
Max Gautier
b60220c597 Update almalinux-8 base image to 8.9 (#10918)
Should fix GPG errors in CI
2024-02-16 01:19:22 -08:00
Max Gautier
bf42ccee4e Fix ingress-nginx controller election (#10913)
Under the original code, leader election failed for ingress controllers
as a result of mismatch between election-id in the controller config,
and the resourceName in the relevant rule of role 'ingress-nginx'.
This appeared in the controller logs.

To fix the issue, a command-line option was added to container
execution (--election-id=...).

Now, the election-id agrees with the resourceName provided in
the role-ingress-nginx.yml file. A comment in that file was
changed to reflect the new logic.

Co-authored-by: Vasilis Samoladas <vsam@softnet.tuc.gr>
Co-authored-by: Mohamed Omar Zaian <mohamedzaian@gmail.com>
2024-02-12 02:58:45 -08:00
Kundan Kumar
bfbb3f8d33 updated ingress controller version (#10868) 2024-02-12 01:11:03 -08:00
Arthur Rahmangulov
250b80ee7c Fixed typos in inventory/sample/group_vars/k8s_cluster (#10911) 2024-02-12 00:27:55 -08:00
Max Gautier
ffda3656d1 Enable containerd 'discard_unpacked_layers' by default (#10905)
* containerd: Remove redundant 'default' filters

* containerd: enable 'discard_unpacked_layers' by default

This should help with containerd disk usage
2024-02-09 06:33:16 -08:00
Max Gautier
f5474ec6cc Don't try to set permissions recursively on cache+staging directory (#10900)
This should avoid permissions problems when the user creating the
directory and the user creating the content are different (when
containers images are saved by root for instances, because the user
can't use the container runtime).
2024-02-09 06:04:28 -08:00
Max Gautier
ad9f194c24 Adjust galaxy.yml (#10906) 2024-02-09 05:40:19 -08:00
Max Gautier
ef7197f925 Use run_once for checking ansible version instead of localhost (#10908)
The `assert` module does not connect to the host anyway, and this avoids
skipping the assert when running with --limit.
2024-02-09 02:34:28 -08:00
Max Gautier
9648300994 Add test for coredns_dual in CI (#10903) 2024-02-08 02:52:10 -08:00
Max Gautier
4b0a134bc9 Only download kubeadm images where needed (#10899)
* Refactor of kubeadm images listing

Instead of setting multiples facts, we directly create the dict we need from
kubeadm output.

* Remove useless 'default' filters in roles/download

* Only download kubeadm images where needed
2024-02-08 02:14:45 -08:00
flxbwr
ad565ad922 Fix waiting for MetalLB controller (#10858)
The current state waiting method is bad to implement.
When changing the deployment version, which is execute with the upgrade_cluster in the previous ansible task: "Kubernetes Apps | Install and configure MetalLB", next ansible task: "Kubernetes Apps | Wait for MetalLB controller to be running" may fall with an error.
2024-02-06 02:58:59 -08:00
Oliver Larsson
65e22481c6 Remove documentation for removed in-tree openstack provider (#10889) 2024-02-06 01:11:00 -08:00
Max Gautier
6f419aa18e Revert "implement download mirrors support (#8474)" (#10884)
This reverts commit c6e5314fab.

There is no user of the download mirrors support in kubespray, for a
long time.
2024-02-06 00:48:29 -08:00
anders-elastisys
c698790122 add nat_outgoing_ipv6 to calico defaults and docs (#10866) 2024-02-05 23:14:22 -08:00
Max Gautier
de4d6a69ee Make more fields mandatory in bug report template (#10883)
-> to make people actually give us the information we need
2024-02-05 20:34:19 -08:00
Gianmarco Mameli
989ba207e9 task description modified (#10875) 2024-02-05 07:59:04 -08:00
Max Gautier
f2bdd4bb2f Fix logical error when checking for boostrap-os (#10867)
Also remove some clutter along the way.
2024-02-05 07:58:55 -08:00
raviranjan
200b630319 Adding egress IPv6 for node-local-dns queries 2024-02-05 16:57:13 +01:00
Max Gautier
21289db181 Cleanup main OWNERS file (#10848)
Remove inactive reviewers / move inactive approvers to emeritus
2024-02-05 07:45:56 -08:00
Kay Yan
c9a44e4089 make docker 24.0 default (#10873)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2024-02-04 21:55:19 -08:00
kyrie
0dbde7536f make containerd 1.7.12 default and upgrade runc to v1.1.11 (#10862)
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
2024-02-01 04:06:08 -08:00
Victor Login
8d53c1723c bump coredns version to 1.11.1 (#10719)
* update version coredns 1.11.1

* Update roles/kubespray-defaults/defaults/main/download.yml

Co-authored-by: Mohamed Omar Zaian <mohamedzaian@gmail.com>

---------

Co-authored-by: Mohamed Omar Zaian <mohamedzaian@gmail.com>
2024-02-01 03:28:20 -08:00
Mohamed Omar Zaian
dce68e6839 [feat] Update metrics server to v0.7.0 (#10856) 2024-01-31 05:13:26 -08:00
Max Gautier
11c01ef600 docs: vagrant-libvirt is tested in CI (#10847) 2024-01-31 05:13:17 -08:00
Takuya Murakami
785366c2de [kubernetes] Support kubernetes 1.29 (#10820)
* [kubernetes] Make kubernetes 1.29.1 default

* [cri-o]: support cri-o 1.29

Use "crio status" instead of "crio-status" for cri-o >=1.29.0

* Remove GAed feature gates SecCompDefault

The SecCompDefault feature gate was removed since k8s 1.29
https://github.com/kubernetes/kubernetes/pull/121246
2024-01-31 00:57:23 -08:00
Max Gautier
e3ea19307a Doc clarification: skipping patches releases is OK (#10850) 2024-01-29 22:31:40 -08:00
Max Gautier
ee8b909a67 Download hash script: auto discover versions (#10849)
* Download patches version automatically from a minor

* Automate versions discovery for hash download

* Small refactoring
2024-01-29 18:06:10 -08:00
Saber
1d119f1a3c Fixed grammar (#10853) 2024-01-29 17:46:58 -08:00
Kundan Kumar
4ea1a0132e Updated vagrant.md (#10836) 2024-01-28 21:16:35 -08:00
jandres - moscardo
0ddf872163 Update upgrades.md with serial=1 for rolling updates (#10837)
* Update upgrades.md

 modify env serial to have real rolling upgrades

* Update upgrades.md

change section for serial

* Update docs/upgrades.md

Co-authored-by: Kundan Kumar <kundan.kumar@india.nec.com>

---------

Co-authored-by: Kundan Kumar <kundan.kumar@india.nec.com>
2024-01-28 21:07:17 -08:00
Slavi Pantaleev
a487667b9d Make large-deployments.md link to downloads.md (#10840) 2024-01-25 14:55:33 +01:00
Ugur Can Ozturk
7863fde552 [apiserver-kubelet/tracing]: add distributed tracing config variables (#10795)
* [apiserver-kubelet/tracing]: add distributed tracing config flags

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>

* [apiserver-kubelet/tracing]: add distributed tracing config flags - fix

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>

* [apiserver-kubelet/tracing]: add distributed tracing config flags - fix

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>

---------

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>
2024-01-25 10:24:35 +01:00
kimsehwan96
758d34a7d1 Fix typo mistake in roles/kubernetes/control-plane/tasks/define-first-kube-control.yml
- Fix 'Set fact joined_control_panes' into 'Set fact joined_control_planes'
2024-01-24 13:39:39 +01:00
Max Gautier
c80f2cd573 Allow the DNS stack to be backward compatible with an old dns_domain (#10630)
Handle all old dns domains:
- for nodelocaldns: in the same server block as the current dns_domain
- for coredns: uffix rewrite of each of the old dns domains to the
  current one
2024-01-24 06:31:22 +01:00
Simon Wessel
0e26f6f3e2 chore: improve performance of python script for hash download (#10335)
The old version of the script downloaded all binaries and generated file checksums locally.
This was a slow process since all binaries of all architectures needed to be downloaded.
The new version simply downloads the .sha256 files containing the binary checksum in text
form which saves a lot of traffic and time.
2024-01-23 16:41:20 +01:00
Maxime Leroy
ab0163a3ad fix(kubernetes): taint nodes with kubectl (#10705)
Signed-off-by: Maxime Leroy <19607336+maxime1907@users.noreply.github.com>
2024-01-23 15:46:13 +01:00
Daniel Strufe
2eb588bed9 Update external huawei cloud controller to 0.26.6 (#10824)
* Update huaweicloud controller to 0.26.6

See <https://github.com/kubernetes-sigs/cloud-provider-huaweicloud/compare/v0.26.3...v0.26.6>

* Update huaweicloud sample to use 0.26.6
2024-01-23 09:28:00 +01:00
Louis Tu
a88bad7947 Add scheduler plugins support (#10747)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-01-23 07:42:33 +01:00
Max Gautier
89d42a7716 Fix coredns_dual usage (#10821) 2024-01-22 18:36:16 +01:00
Max Gautier
b4dd8b4313 Hopefully final batches of ipaddr deprecation cleanup (#10822) 2024-01-22 18:20:44 +01:00
Max Gautier
4fc1fc729e Remove dead link in README for debian jessie (#10827) 2024-01-22 18:00:59 +01:00
yun
13e1f33898 Correct the POLY1305 cipher suites by adding the suffix _SHA256 (#10641) 2024-01-22 18:00:52 +01:00
Alexander
de2c4429a4 Enable configuring mountOptions, reclaimPolicy and volumeBindingMode … (#10450)
* Enable configuring mountOptions, reclaimPolicy and volumeBindingMode for cinder-csi StorageClasses

* Check if class.mount_options is defined at all, before generating the option list
2024-01-22 18:00:34 +01:00
Max Gautier
22bb0976d5 Adjust kubelet_event_record_qps to K8S default (#10826)
Also remove redundant check in the kubelet config template (we define a
default, so the setting will always be "true")
2024-01-22 17:49:14 +01:00
Serge Hartmann
a2ed5fcd3d Doc: variable cilium_ipsec_key must be base64 encoded (#10781)
Signed-off-by: serge Hartmann <serge.hartmann@gmail.com>
2024-01-22 17:49:00 +01:00
R. P. Taylor
6497ecc767 workaround for terraform bug related to no_floating and extra_groups (#10764) 2024-01-22 17:28:28 +01:00
R. P. Taylor
54fb75f0e0 don't overwrite changes to openstack allowed_address_pairs (#10760) 2024-01-22 17:28:19 +01:00
my-git9
5a405336ae Support following k8s version selection pause image (#10756)
Signed-off-by: xin.li <xin.li@daocloud.io>
2024-01-22 17:28:09 +01:00
Kri5
fd6bb0f7fd Allow vagrant directory location to be configurable (#10718)
In the case were vagrant is not invoked directly from the repository,
but from another location, and the Vagrantfile is "included" into
another, we need to be able to specify where the location of the vagrant
directory is, as of now it's hardcoded relative to the Vagrantfile
location. This commit fix it.
2024-01-22 17:22:37 +01:00
Yuhao Zhang
0e971a37aa Offline control plane recover (#10660)
* ignore_unreachable for etcd dir cleanup

ignore_errors ignores errors occur within "file" module. However, when
the target node is offline, the playbook will still fail at this task
with node "unreachable" state. Setting "ignore_unreachable: true" allows
the playbook to bypass offline nodes and move on to proceed recovery
tasks on remaining online nodes.

* Re-arrange control plane recovery runbook steps

* Remove suggestion to manually update IP addresses

The suggestion was added in 48a182844c 4
years ago. But a new task added 2 years ago, in
ee0f1e9d58, automatically update API
server arg with updated etcd node ip addresses. This suggestion is no
longer needed.
2024-01-22 17:22:27 +01:00
Max Gautier
4e52fb7a1f Adjust the releases process documentation. (#10727)
* markdown numbered lists: no need to manually maitain the numbers

* add instructions to update the collection version roughly following
  Ansible collection maintenance guidelines
  (https://docs.ansible.com/ansible/latest/community/collection_contributors/collection_release_with_branches.html)

* Distinguish major from minor releases in the release process

* Bump current galaxy.yml version to the next release
2024-01-22 17:11:17 +01:00
Noam
3e7b568d3e crictl allow setting grace period for stop containers upon reset (#10651)
* crictl allow setting different grace period for stop containers and pods

* correct grace period location
2024-01-22 17:11:08 +01:00
kyrie
a45a40a398 update kube-version-min-required to v1.27 (#10817) 2024-01-22 14:26:12 +01:00
Takuya Murakami
4cb1f529d1 [kubernetes] Add hashes for kubernetes 1.29.0 and 1.29.1 (#10778)
* Add hashes of crictl and crio
* Add versions of etcd, crictl, crio and csi-snapshotter
2024-01-22 09:39:15 +01:00
ERIK
fe819a6ec3 Fix file loss during download (#10779)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-01-22 05:56:08 +01:00
Kay Yan
df5a06dc70 cleanup-for-2.24.0 (#10811) 2024-01-19 17:29:17 +01:00
Mohamed Omar Zaian
64447e745e [kubernetes] Make kubernetes v1.28.6 default (#10810) 2024-01-19 09:07:27 +01:00
ERIK
78eb74c252 Pin equinix provider version (#10809)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-01-19 05:55:41 +01:00
Kay Yan
669589f761 cleanup-for-2.23.2 (#10800) 2024-01-17 10:03:02 +01:00
Max Gautier
b7a83531e7 etcd: update to v3.5.10 (#10798) 2024-01-17 09:50:48 +01:00
Max Gautier
a9e29a9eb2 Fix etcd client generation (#10769)
* ci: redefine multinode to node-etcd-client

This should allow to catch several class of problem rather than just
one -> from network plugin such as calico or cilium talking directly to
the etcd.

* Dynamically define etcd host range

This has two benefits:
- We don't play the etcd role twice for no reason
- We have access to the whole cluster (if needed) to use things like
  group_by.
2024-01-16 15:50:41 +01:00
Kay Yan
a0a2f40295 add containerd config override_path (#10776) 2024-01-16 14:15:53 +01:00
lobiyed.karim
7b7c9f509e Add PodDisruptionBudget for CoreDNS deployment. Allows users to control disruption behavior and set maximum unavailable pods (#10557) 2024-01-16 10:04:47 +01:00
qlijin
beb2660aa8 Update docs for crio (#10785) 2024-01-16 05:23:09 +01:00
Louis Tu
3f78bf9298 Fix incorrect ciliumcli binary (#10575)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-01-16 05:23:00 +01:00
Max Gautier
06a2a3ed6c Fix issues forms typos (#10796) 2024-01-15 12:28:56 +01:00
Max Gautier
eb40523388 Convert issue templates to issues forms (#10793)
* Convert the bug-report template to issue form

* Convert the enchancement issue template to form

* Convert "Failing Test" template to issue form

* github: Remove support request template, direct to slack instead
2024-01-15 09:29:37 +01:00
Gaëtan Trellu
50fbfa2a9a Fix PyYAML package name on SLES and openSUSE (#10794) 2024-01-15 04:21:08 +01:00
Gaëtan Trellu
747d8bb4c2 Fix ntp installation on SLES and openSUSE (#10786) 2024-01-12 04:03:35 +01:00
Max Gautier
e90cae9344 Refactor check_galaxy + fix version (#10729)
* Remove checks for docs using exact tags

Instead use a more generic documentation for installing kubespray as a
collection from git.

* Check that we upgraded galaxy.yml to next version

This is only intented to check for human error. The version in galaxy
should be the next (which does not mean the same if we're on master or a
release branch).

* Set collection version to KUBESPRAY_NEXT_VERSION
2024-01-11 15:49:31 +01:00
Serge Hartmann
bb67d9524d Fix crio_version version comparison (#10780)
Signed-off-by: serge Hartmann <serge.hartmann@gmail.com>
2024-01-11 11:49:35 +01:00
Kay Yan
a306f15a74 bump vagrant 2.3.7 (#10787) 2024-01-11 11:23:15 +01:00
Kay Yan
8c09c3fda2 fix image pull in insecure-registry (#10775) 2024-01-09 10:20:16 +01:00
Louis Tu
a656b7ed9a Add kube_vip_lb_fwdmethod option for kube-vip (#10762)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-01-09 08:22:13 +01:00
Kay Yan
2e8b72e278 fix disable swap in centos (#10751) 2024-01-08 17:38:14 +01:00
Louis Tu
ddf5c6ee12 Update coredns rolling update strategy (#10748)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-01-08 17:38:05 +01:00
Ryan Lonergan
eda7ea5695 feat: add support for Cilium 1.14 (#10684)
* update cilium configmap template for new routing mode and tunnel-protocol options
Ryan Lonergan ryan.tlonergan@gmail.com

* add rbac for new cilium crd in 1.14
Ryan Lonergan ryan.tlonergan@gmail.com

* add conditional for cni-install.sh that's no longer included in cilium 1.14
Ryan Lonergan ryan.tlonergan@gmail.com

* Update roles/network_plugin/cilium/templates/cilium/ds.yml.j2

Co-authored-by: Cyclinder <qifeng.guo@daocloud.io>

---------

Co-authored-by: Cyclinder <qifeng.guo@daocloud.io>
2024-01-08 02:43:02 +01:00
刘旭
08c0b34270 [cert-manager] upgrade to v1.13.2 (#10616) 2024-01-05 04:45:10 +01:00
Romain
1a86b4cb6d Fix download retry when get_url has no status_code. (#10613)
* Fix download retry when get_url has no status_code.

* Fix until clause in download role.
2024-01-04 04:00:47 +01:00
Mohamed Omar Zaian
aea150e5dc [kubernetes] Make kubernetes v1.28.5 default (#10739)
* Add hashes for kubernetes 1.29.0, 1.28.5, 1.27.9, 1.26.12
2023-12-21 17:30:45 +01:00
my-git9
ee2dd4fd28 support other other runtime tool for manage-offline-container-images (#10740)
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-12-21 16:45:09 +01:00
Andrei Costescu
c3b674526d Fix modprobe module on Flatcar (#10678)
* Fix modprobe module on Flatcar

* Add todo about upstream issue report
2023-12-21 16:16:34 +01:00
Kay Yan
565eab901b remove containerd registries (#10738) 2023-12-21 10:01:12 +01:00
Max Gautier
c3315ac742 systemd-resolved: use a drop-in for kubespray dns (#10732)
This avoid needlessly overriding things and make cleanup easier.
Also simplifies the template a bit.
2023-12-21 09:52:14 +01:00
my-git9
da9b34d1b0 docs: improve format for offline/README.md (#10731)
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-12-21 09:52:07 +01:00
Max Gautier
243ca5d08f Add test case for calico using etcd datastore (#10722)
* Add multinode ci layout

* Add test case for calico using etcd datastore
2023-12-20 09:59:02 +01:00
Olivier Levitt
29ea790c30 Fix calico-node in etcd mode (#10438)
* Calico : add ETCD endpoints to install-cni container

* Calico : remove nodename from configmap in etcd mode
2023-12-19 04:09:06 +01:00
Ugur Can Ozturk
ae780e6a9b [etcd]: add etcd distributed tracing flags (#10666)
* [etcd]: add etcd distributed tracing flags

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>

* [etcd]: add etcd distributed tracing flags - fix

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>

* [etcd]: add etcd distributed tracing flags - fix

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>

---------

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>
2023-12-19 04:00:10 +01:00
Max Gautier
471326f458 Remove PodSecurityPolicy support and references (#10723)
This is removed from kubernetes since 1.25, time to cut some dead code.
2023-12-18 14:13:43 +01:00
Max Gautier
7395c27932 CI: Document the 'all-in-one' layout + small refactoring (#10725)
* Rename aio to all-in-one and document it

ADTM.
Acronyms don't tell much.

* Refactor vm_count in tests provisioning
2023-12-18 11:33:13 +01:00
Michael Kebe
d435edefc4 Removed DEPRECATED --logtostderr from metrics-server (#10709)
The --logtostderr is deprecated.

https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components
2023-12-14 22:49:28 +01:00
刘旭
eb73f1d27d support disable dns autoscaler when use CoreDNS (#10608) 2023-12-14 10:03:34 +01:00
Maxime Leroy
9a31f3285a chore(Dockerfile): best practices (#10708)
Signed-off-by: Maxime Leroy <19607336+maxime1907@users.noreply.github.com>
2023-12-13 17:40:53 +01:00
Maxime Leroy
45a070f1ba chore(Dockerfile): python requirements file (#10700)
Signed-off-by: Maxime Leroy <19607336+maxime1907@users.noreply.github.com>
2023-12-12 18:04:38 +01:00
Mohamed Omar Zaian
ccb742c7ab [containerd] add hashes for versions 1.6.25-26 and 1.7.9-11 make v1.7.11 default (#10671) 2023-12-12 17:53:32 +01:00
jandres - moscardo
cb848fa7cb New PR default node selector (#10607) 2023-12-12 14:51:26 +01:00
Max Gautier
8abf49ae13 Disable podCIDR allocation from control-plane when using calico (#10639)
* Disable control plane allocating podCIDR for nodes when using calico

Calico does not use the .spec.podCIDR field for its IP address
management.
Furthermore, it can false positives from the kube controller manager if
kube_network_node_prefix and calico_pool_blocksize are unaligned, which
is the case with the default shipped by kubespray.

If the subnets obtained from using kube_network_node_prefix are bigger,
this would result at some point in the control plane thinking it does
not have subnets left for a new node, while calico will work without
problems.

Explicitely set a default value of false for calico_ipam_host_local to
facilitate its use in templates.

* Don't default to kube_network_node_prefix for calico_pool_blocksize

They have different semantics: kube_network_node_prefix is intended to
be the size of the subnet for all pods on a node, while there can be
more than on calico block of the specified size (they are allocated on
demand).

Besides, this commit does not actually change anything, because the
current code is buggy: we don't ever default to
kube_network_node_prefix, since the variable is defined in the role
defaults.
2023-12-12 14:38:36 +01:00
Louis Tu
8f2390a120 Fix the path of download.yml (#10711)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2023-12-12 13:47:27 +01:00
Max Gautier
81a3f81aa1 Revert "Update etcd-servers for apiserver (#8253)" (#10652)
This reverts commit ee0f1e9d58.

Avoid restarting all api servers at once by changing their config.
2023-12-12 11:22:38 +01:00
Max Gautier
0fb404c775 etcd: use dynamic group for certs generation check (#10610)
We take advantage of group_by to create the list of nodes needing new
certs, instead of manually looping inside a Jinja template.

This should make the role more readable and less susceptible to
white space problems.
2023-12-12 11:22:29 +01:00
Max Gautier
51069223f5 Decouple kubespray-defaults from download (#10626)
* Decouple role kubespray-defaults from download

Avoids doing re-importing the download role on every invocation of
kubespray-defaults (and skipping everything).

This has a measurable effect on playbook performance.

* Update docs refering to moved download defaults
2023-12-11 16:56:17 +01:00
David Leadbeater
17b51240c9 Remove legacy crio packaging cleanup (#10702)
This has now been removed and results in a 404 when trying to remove the
old key, even if it's not present.
2023-12-11 15:41:13 +01:00
Max Gautier
306103ed05 Add VannTen as reviewer (#10661) 2023-12-11 11:45:43 +01:00
piwinkler
eb628efbc4 Update 0040-verify-settings.yml (#10699)
remove embedded template
2023-12-11 10:56:13 +01:00
Max Gautier
2c3ea84e6f Use systemd for disabling swap when it's used (#10587)
* Mask systemd swap.target do disable swap

This is a more generic way to disable swap, since it pulls .swap units
in systemd distributions; fstab is only one way to generate .swap units.

* Unconditionally disable swap

We only care to disable it (the "swapon" registered variable is not used
anywhere else.
This allows to get rid of the ignore_errors, since this was added
because swapon.stdout does not exist in check_mode (see issue #6642).

* Don't explicitly disable swapOnZram

We're already masking the swap.target, which would pull the zram unit,
hence no need to handle zram-generator specifically.
2023-12-07 13:26:21 +01:00
Max Gautier
85f15900a4 Remove unneeded workaround for removing kubeadm DNS (#10695)
Kubeadm dns phase is correctly skipped.
This was a workaround for kubernetes/kubeadm#1557, which was actually
not a bug ; the correct fix was #4867
2023-12-07 12:54:15 +01:00
Kundan Kumar
af1f318852 Updated AWS ALB ingress controller version (#10680) 2023-12-07 10:29:16 +01:00
Max Gautier
b31afe235f Final ipaddr deprecation cleanup (#10675)
Followup of #10518
2023-12-06 03:49:25 +01:00
Mohamed Omar Zaian
a9321aaf86 [calico] Add version 3.26.4 and make it default (#10669) 2023-12-06 03:05:33 +01:00
Max Gautier
d2944d2813 Check jinja templates for syntax error (#10667)
Allow to fail early (pre-commit time) for jinja error, rather than
waiting until executing the playbook and the invalid template.

I could not find a simple jinja pre-commit hook in the wild.
2023-12-06 03:05:24 +01:00
Kay Yan
fe02d21d23 update nerdctl to v1.7.1 (#10685)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2023-12-05 19:00:41 +01:00
Kay Yan
5160e7e20b using ctr pull instead of nerdctl (#10687) 2023-12-05 16:00:55 +01:00
Alexander
c440106eff add dnsPolicy: ClusterFirstWithHostNet to DaemonSets with hostNetwork: true value to avoid DNSConfigFormat events (#10618) 2023-12-05 02:52:17 +01:00
Max Gautier
a1c47b1b20 Factorize some identical playbooks steps into their own sub-playbooks (#10633)
* Factorize identical playboooks steps in sub-playbooks

* Copy legacy_groups.yml into its sole user
2023-12-04 23:24:00 +01:00
Max Gautier
93724ed29c Use non-deprecated stdout_callback (#10647)
Skippy is deprecated as its functionality has been incorporated into
the default callback plugin.
2023-12-04 09:38:20 +01:00
Mohamed Omar Zaian
75fecf1542 Update nodelocaldns version (#10621) 2023-11-29 12:19:36 +01:00
Max Gautier
0d7bdc6cca pre-upgrade cleanup (#10656)
* Clean up redondant defaulting

drain_{timeout,grace_period}_after_failure don't exist at this point, so
they always default.

* Remove useless facts

The drain_*_after_failure are never used
2023-11-28 22:49:56 +01:00
chansuke
c87d70b04b [cert-manager] Upgrade to v1.12.6 2023-11-28 22:42:50 +01:00
Jelmer Vernooij
fa7a504fa5 Drop installation notes for Debian Jessie (#10642)
Jessie has not received security updates for at least three years. See https://www.debian.org/releases/jessie/
2023-11-28 22:35:28 +01:00
Max Gautier
612cfdceb1 Check conntrack module presence instead of kernel version (#10662)
* Try both conntrack modules instead of checking kernel version

Depending on kernel distributor, the kernel version might not be a
correct indicator of the conntrack module use.
Instead, we check both (and use the first found).

* Use modproble.persistent rather than manual persistence
2023-11-28 18:31:02 +01:00
ERIK
70bb19dd23 fix copy etcdctl retries (#10634)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2023-11-28 10:52:03 +01:00
Max Gautier
94d3f65f09 ipaddr (deprecated alias) => ansible.utils.ipaddr (#10650) 2023-11-28 09:56:55 +01:00
Valerii Kretinin
cf3ac625da revert env section deletion (#10655) 2023-11-28 09:47:46 +01:00
Max Gautier
c2e3071a33 kubespray-defaults: Check for boostrap-os FQDN (#10590)
When installed as an ansible collection, roles in
ansible_play_role_names will be designated by their FQDN (i.e
'kubernetes-sigs.kubespray.<role-name>).

It means we need to check for both when checking for roles in the play.
2023-11-28 09:23:46 +01:00
Max Gautier
21e8b96e22 Drop the drain check for kubectl > v1.10.0 (#10657)
Older versions are unsupported for a long time.
2023-11-28 03:14:51 +01:00
Samuel Liu
3acacc6150 add kube_apiserver_etcd_compaction_interval (#10644) 2023-11-27 05:37:33 +01:00
Max Gautier
d583d331b5 Convert exoscale tf provider to new version (#10646)
This is untested. It passes terraform validate to un-broke the CI.
2023-11-24 17:22:55 +01:00
Mohamed Omar Zaian
b321ca3e64 [kubernetes] Add hashes for kubernetes 1.28.4, 1.27.8, 1.26.11 (#10624) 2023-11-24 03:22:55 +01:00
AbhishekKr
6b1188e3dc [fix] modprobe_nf_conntrack for new Linux Kernel, when using ipvs (#10625)
Signed-off-by: AbhishekKr <abhikumar163@gmail.com>
2023-11-20 09:48:06 +01:00
Max Gautier
0d4f57aa22 Validate systemd unit files (#10597)
* Validate systemd unit files

This ensure that we fail early if we have a bad systemd unit file
(syntax error, using a version not available in the local version, etc)

* Hack to check systemd version for service files validation

factory-reset.target was introduced in system 250, same version as the
aliasing feature we need for verifying systemd services with ansible.
So we only actually executes the validation if that target is present.

This is an horrible hack which should be reverted as soon as we drop
support for distributions with systemd<250.
2023-11-17 20:01:23 +01:00
刘旭
bc5b38a771 support CoreDNS use host network and config dns port (#10617) 2023-11-17 14:41:53 +01:00
Lukáš Kubín
f46910eac3 Add helm support for custom_cni deployment (#10529)
* Add helm support for custom_cni deployment

* Linting correction

* Ansible linting correction

* Add test packet with values

Signed-off-by: Lukáš Kubín <lukas.kubin@gmail.com>

* Add custom_cni configuration file with comments

Signed-off-by: Lukáš Kubín <lukas.kubin@gmail.com>

* Default values cleanup

Signed-off-by: Lukáš Kubín <lukas.kubin@gmail.com>

* Add details to custom_cni configuration file

Signed-off-by: Lukáš Kubín <lukas.kubin@gmail.com>

* Set correct yaml type of helm values

Signed-off-by: Lukáš Kubín <lukas.kubin@gmail.com>

* Set CNI filesystem ownership to root

Signed-off-by: Lukáš Kubín <lukas.kubin@gmail.com>

* Update cilium example parameter name

Signed-off-by: Lukáš Kubín <lukas.kubin@gmail.com>

---------

Signed-off-by: Lukáš Kubín <lukas.kubin@gmail.com>
2023-11-16 00:32:21 +01:00
Khanh Ngo Van Kim
adb8ff14b9 fix: invalid version check in containerd jinja-template config (#10620) 2023-11-15 16:06:42 +01:00
Arthur Outhenin-Chalandre
7ba85710ad Update to ansible 2.15 (#10481)
* ansible: upgrade to version >= 2.15.5

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>

* tests: update requirements

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>

* contrib/openstack: fix wrong gitignore pattern

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>

* tests: add missing tzdata requirement

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>

* tests: remove some molecules tests

Those doesn't work in Ansible 2.15. Ansible can't load builtin now
apparently and these tests are not worth it.

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
2023-11-15 09:39:09 +01:00
Noam
cbd3a83a06 add option to enable cdi for containerd (#10603) 2023-11-14 17:20:19 +01:00
Eeo Jun
eb015c0362 configure cluster-name for hubble relay (#10614) 2023-11-13 19:22:40 +01:00
Patrick O'Brien
17681a7e31 fallback_ips: ignore unreachable hosts (#10601)
Sets ignore_unreachable: true to `Gather ansible_default_ipv4 from all hosts`
task from fallback_ips.yml

Without this scale.yml will fail if a single node in the cluster is down, which
for large clusters happens often.
2023-11-10 21:07:18 +01:00
Mohamed Omar Zaian
cca7615456 Update checksums (#10606) 2023-11-09 16:43:04 +01:00
Samuel Mutel
a4b15690b8 fix: Same nameservers for resolv.conf and dhcp (#10548) 2023-11-08 16:57:45 +01:00
Louis Tu
32743868c7 Add cri-o criu support (#10479)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2023-11-08 16:57:32 +01:00
yun
7d221be408 Remove crio package configuration (#10584)
* Remove crio package configuration

* Remove crio package config directly without loop
2023-11-08 16:29:42 +01:00
Denis
2d75077d4a fix: (#10197)
Remove cri-o apt repo job has state present but need absent
Uninstall CRI-O packages job has undefined variable crio_packages
replaced by list of packages
2023-11-08 16:22:39 +01:00
borgiacis
802da0bcb0 Create variables for ipvs kernel modules (#10580)
* Create variables for ipvs kernel modules

* Corrected kubernetes role node task missing name

* Added changes as suggested during review by VannTen
2023-11-08 12:44:02 +01:00
Seal1998
6305dd39e9 Metallb --lb-class cmd arg to support multiple LoadBalancer implementations (#10550)
* metallb --lb-class cmd arg to support multiple load balancer implementations

* removed loadbalancer_class from metallb_config; metallb_loadbalancer_class in role defaults
2023-11-08 12:43:48 +01:00
Max Gautier
b3f6d05131 Move control plane certs renewal "spread out" into the systemd timer (#10596)
* Use RandomizedDelaySec to spread out control certificates renewal plane

If the number of control plane node is superior to 6, using (index * 10
minutes) will fail (03:60:00 is not a valid timestamp).

Compared to just fixing the jinja expression (to use a modulo for
example), this should avoid having two control planes certificates
update node being triggered at the same time.

* Make k8s-certs-renew.timer Persistent

If the control plane happens to be offline during the scheduled
certificates renewal (node failure or anything like that), we still want
the renewal to happen.
2023-11-08 12:35:20 +01:00
Max Gautier
8ebeb88e57 Refactor "multi" handlers to use listen (#10542)
* containerd: refactor handlers to use 'listen'

* cri-dockerd: refactor handlers to use 'listen'

* cri-o: refactor handlers to use 'listen'

* docker: refactor handlers to use 'listen'

* etcd: refactor handlers to use 'listen'

* control-plane: refactor handlers to use 'listen'

* kubeadm: refactor handlers to use 'listen'

* node: refactor handlers to use 'listen'

* preinstall: refactor handlers to use 'listen'

* calico: refactor handlers to use 'listen'

* kube-router: refactor handlers to use 'listen'

* macvlan: refactor handlers to use 'listen'
2023-11-08 12:28:30 +01:00
Kay Yan
c9d685833b cleanup-for-2.23.1 (#10600) 2023-11-07 13:58:49 +01:00
Mohamed Omar Zaian
f3332af3f2 [containerd] add hashes for version 1.7.8 (#10589) 2023-11-03 16:45:15 +01:00
Boris Barnier
870065517f [kube-router] set version to 2.0.0 (#10503)
Signed-off-by: Boris Barnier <bozzo@users.noreply.github.com>
2023-11-02 11:19:57 +01:00
Mohamed Omar Zaian
267a8c6025 [ingress-nginx] upgrade to 1.9.4 (#10583) 2023-11-02 04:02:24 +01:00
Hedayat Vatankhah (هدایت)
edff3f8afd Set remove_default_searchdomains to false by default (#10554)
It was not 'false', which made some tasks (e.g. using systemd-resolved
template) to effectively remove default search domains; caused DNS loop
after rebooting the node/restarting cluster, so localdns service didn't
run correctly.
2023-11-01 03:33:57 +01:00
yun
cdc8d17d0b Check nameserver when dns is enable (#10561) 2023-11-01 03:07:06 +01:00
Max Gautier
8f0e553e11 etcd/backup: native ansible modules instead of shell (#10540)
This make native ansible features (dry-run, changed state) easier to
have, and should have a minimal performance impact, since it only runs
on the etcd members.
2023-10-30 20:05:28 +01:00
chansuke
5f9a7b9d49 [cert-manager] Upgrade to v1.12.5 (#10500) 2023-10-30 18:51:35 +01:00
qlijin
af7bc17c9a Spicify the runc path when we use the containerd container engine and change the bin_dir path. (#10154)
* Specify the runc path when we use the containerd container engine
and change the bin_dir path.

Signed-off-by: Jin Li <qlijin@gmail.com>

* Update roles/container-engine/containerd/templates/config.toml.j2

Co-authored-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>

---------

Signed-off-by: Jin Li <qlijin@gmail.com>
Co-authored-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
2023-10-30 17:54:31 +01:00
Samuel Mutel
e2b62ba154 feat: Add kube-vip in sample addons.yml (#10522) 2023-10-30 17:45:04 +01:00
Mateus Caruccio
5da421c178 Fix metallb example yaml (#10545)
Added missing :
2023-10-30 17:37:59 +01:00
yun
becb6267fb Set default remove_default_searchdomains to false (#10533) 2023-10-30 17:37:52 +01:00
Max Gautier
34754ccb38 Use calico_pool_blocksize from cluster when existing (#10516)
The blockSize attribute from Calico IPPool resources cannot be changed
once set [1]. Consequently, we use the one currently defined when
configuring the existing IPPool, avoiding upgrade errors by trying to
change it.

In particular, this can be useful when calico_pool_blocksize default
changes in kubespray, which would otherwise force users to add an
explicit setting to their inventories.

[1]: https://docs.tigera.io/calico/latest/reference/resources/ippool#spec
2023-10-30 17:37:43 +01:00
yun
dcd0edce40 Remove always tag applied on bootstrap (#10556) 2023-10-30 17:28:52 +01:00
Mohamed Omar Zaian
7a0030b145 Change default cri-o versions for Kubernetes 1.26 (#10565) 2023-10-30 17:23:32 +01:00
Louis Tu
fa9e41047e Add kubectl alias support (#10552)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2023-10-30 17:23:19 +01:00
Mohamed Omar Zaian
f5f1f9478c [argocd] update argocd to v2.8.4 (#10568) 2023-10-30 12:54:26 +01:00
Mohamed Omar Zaian
6a70f02662 [helm] upgrade to 3.13.1 (#10567) 2023-10-30 04:32:52 +01:00
Mohamed Omar Zaian
3bc0dfb354 [etcd] add 3.5.10 hashes (#10566) 2023-10-30 04:32:45 +01:00
Mohamed Omar Zaian
418df29ff0 Add crictl 1.26.1 for Kubernetes v1.26 (#10564) 2023-10-30 04:28:44 +01:00
Mohamed Omar Zaian
1f47d5b74f [kubernetes] Add hashes for kubernetes 1.28.3, 1.27.7, 1.26.10 (#10541) 2023-10-20 05:43:34 +02:00
Mustafa Mertcan Çam
e52d70885e terraform-aws: variable driven ami selection (#10520)
* modify variables.tf to accept AMI attributes via variables

* update README to guide users on utilizing variable-driven AMI configuration

* fix markdown lint error
2023-10-19 05:09:22 +02:00
Marc Brugger
3f1409d87d Correct cilium metrics port mapping (#10519)
Signed-off-by: Marc Brugger <m.brugger@bison-group.com>
2023-10-19 05:09:13 +02:00
Max Gautier
0b2e5b2f82 Retries ssh connection for Gather node certs (#10515)
This allows this task to work with a forks count > 10 and the default
configuration of sshd, which is to limit sessions to 10. (see
MaxSessions in sshd_config).

Since this is a delegate_to task, it connects to the same host (first
etcd) for each node in the cluster, thus easily going above 10.

Raising the ssh connection attempts allow for more robustness, without
decreasing the forks count or serialising the tasks, which could slow
the task (or the playbook as a whole, if decreasing forks).
2023-10-19 05:04:29 +02:00
Unai Arríen
228efcba0e Migrate node-role.kubernetes.io/master to node-role.kubernetes.io/con… (#10464)
* Migrate node-role.kubernetes.io/master to node-role.kubernetes.io/control-plane

* Migrate node-role.kubernetes.io/master to node-role.kubernetes.io/control-plane

* Migrate node-role.kubernetes.io/master to node-role.kubernetes.io/control-plane
2023-10-17 21:39:40 +02:00
Max Gautier
401ea552c2 Cleanup a deprecation warning (ipaddr filter) (#10518) 2023-10-17 09:45:11 +02:00
Ugur Can Ozturk
8cce6df80a [external-lb]: kubelet.conf server address and kube-proxy api-server address fix (#10490)
* [external-lb-kubeconfig]: fix server address in worker kubelet.conf

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>

* [external-lb-kubeconfig]: fix server address in kube-proxy

Signed-off-by: Furkan Pehlivan <furkanpehlivan34@gmail.com>

---------

Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>
Signed-off-by: Furkan Pehlivan <furkanpehlivan34@gmail.com>
Co-authored-by: Furkan Pehlivan <furkanpehlivan34@gmail.com>
2023-10-17 09:45:00 +02:00
Mohamed Omar Zaian
3e522a9f59 [calico] Make version 3.26.3 default (#10526) 2023-10-17 08:22:39 +02:00
Mohamed Omar Zaian
ae45de3584 [containerd] add hashes for version 1.7.7 (#10525) 2023-10-17 07:32:10 +02:00
Mohamed Omar Zaian
513b6dd6ad [ingress-nginx] upgrade to 1.9.3 (#10527) 2023-10-17 05:42:13 +02:00
emiran-orange
e65050d3f4 Ability to define GPG key path for Docker APT (#10513) 2023-10-13 04:06:04 +02:00
Mohamed Omar Zaian
4a8a47d438 [ingress-nginx] upgrade to 1.9.0 (#10493) 2023-10-11 23:49:16 +02:00
ERIK
b2d8ec68a4 Fix restart network task cannot be skipped (#10512)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2023-10-11 05:50:37 +02:00
Elias-elastisys
d3101d65aa Added templating to coredns error to allow for consolidation (#10501) 2023-10-10 14:32:41 +02:00
reza
abaddb4c9b fixed the bug in kubespray/contrib/offline/manage-offline-files.sh 2023-10-10 14:21:26 +02:00
Ross Kusler
acb86c23f9 [kube-router] Add option to disable bgp-graceful-restart (10488) (#10489) 2023-10-07 04:52:45 +02:00
Mateus Caruccio
bea5034ddf Update metallb example configs (#10485) 2023-10-07 04:52:35 +02:00
Robin Wallace
5194d8306e upcloud: update terraform provider strict anti-affinity (#10474) 2023-10-07 04:45:41 +02:00
Mohamed Omar Zaian
4846f33136 [etcd] make etcd 3.5.9 default (#10482) 2023-09-29 00:26:42 -07:00
Mohamed Omar Zaian
de8d1f1a3b [kubernetes] Kube-scheduler: remove/update deprecated component config v1beta3 (#10484) 2023-09-29 00:22:45 -07:00
Heather Lapointe
ddd7aa844c [kata-containers] Update configuration to support kata 3.1.3. (#10466)
Namely, the libexec paths have changed since 2.5.
This also makes kata_containers_virtio_fs_cache configurable.
2023-09-28 00:33:33 -07:00
Feruzjon Muyassarov
1fd31ccc28 Refactor NRI activation for containerd and CRI-O (#10470)
Refactor NRI (Node Resource Interface) activation in CRI-O and
containerd. Introduce a shared variable, nri_enabled, to streamline
the process. Currently, enabling NRI requires a separate update of
defaults for each container runtime independently, without any
verification of NRI support for the specific version of containerd
or CRI-O in use.

With this commit, the previous approach is replaced. Now, a single
variable, nri_enabled, handles this functionality. Also, this commit
separates the responsibility of verifying NRI supported versions of
containerd and CRI-O from cluster administrators, and leaves it to
Ansible.

Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2023-09-26 08:05:25 -07:00
Majid Garoosi
6f520eacf7 Bump nerdctl version 1.5.0 (#10475) 2023-09-26 05:05:36 -07:00
qlijin
a0eb7c0d5c [cri-o] update to v1.28.1 (#10480) 2023-09-26 04:36:57 -07:00
Boris Barnier
94322ef72e [kube-router] set default version to 1.6.0 (#10478)
Signed-off-by: Boris Barnier <bozzo@users.noreply.github.com>
2023-09-25 02:32:57 -07:00
蔣 航
c6ab6406c2 Add Retry for Applying PriorityClass (#10469)
Signed-off-by: hang.jiang <hang.jiang@daocloud.io>
2023-09-24 19:54:56 -07:00
Romain
2c132dccba Fix etcdctl.sh TLS file path when not using kubeadm. (#10467) 2023-09-24 19:50:57 -07:00
Christian
7919a47165 [metallb] add config option for IPAddressPool avoidBuggyIPs (#10458)
* Add avoid_buggy_ips as optional
* Revert avoid_buggy_ips default back to false
* Change auto_assign to optional, default true
2023-09-21 20:29:49 -07:00
Jason Witkowski
7b2586943b Fix: kube-apiserver tag will overwrite secrets-at-rest token if used independently (#10460)
Signed-off-by: Jason Witkowski <jwitko1@gmail.com>
2023-09-21 06:55:29 -07:00
Feruzjon Muyassarov
f964b3438d Add configuration option for NRI in crio & containerd (#10454)
* [containerd] Add Configuration option for Node Resource Interface

Node Resource Interface (NRI) is a common is a common framework for
plugging domain or vendor-specific custom logic into container
runtime like containerd. With this commit, we introduce the
containerd_disable_nri configuration flag, providing cluster
administrators the flexibility to opt in or out (defaulted to 'out')
of this feature in containerd. In line with containerd's default
configuration, NRI is disabled by default in this containerd role
defaults.

Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>

* [cri-o] Add configuration option for Node Resource Interface

Node Resource Interface (NRI) is a common is a common framework for
plugging domain or vendor-specific custom logic into container
runtimes like containerd/crio. With this commit, we introduce the
crio_enable_nri configuration flag, providing cluster
administrators the flexibility to opt in or out (defaulted to 'out')
of this feature in cri-o runtime. In line with crio's default
configuration, NRI is disabled by default in this cri-o role
defaults.

Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>

---------

Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2023-09-21 00:30:19 -07:00
Mathieu Parent
09f3caedaa [download] Don't fail on 304 Not Modified (#10452)
i.e when file was not modified since last download
2023-09-21 00:20:20 -07:00
Mohamed Omar Zaian
fe4b1f6dee [ingress-nginx] upgrade to 1.8.2 (#10455) 2023-09-20 19:17:56 -07:00
Mohamed Omar Zaian
bc5e33791f [vsphere_csi] Update to 3.1.0 (#10451) 2023-09-20 04:56:00 -07:00
Fredrik Liv
d669b93c4f terraform-openstack: Added possibility to enable dhcp flag critical on one interface (#10446)
* terraform-openstack: Updated extra partitions to use empty list by default

* terraform-openstack: Added possibility to enable dhcp flag critical on one interface
2023-09-20 03:22:01 -07:00
Romain
a81c6d5448 Add a way to configure reseted networking service name. (#10428) 2023-09-20 02:28:01 -07:00
Mohamed Omar Zaian
6b34e3ef08 [calico] Make version 3.26.1 default (#10416)
* [calico] Make version 3.26.1 default

* [calico] Separate calico-node and calico-cni-plugin service accounts

See: https://github.com/projectcalico/calico/pull/7106
2023-09-19 02:49:06 -07:00
Mohamed Omar Zaian
dbdc4d4123 [kubernetes] Add hashes for kubernetes 1.28.2, 1.27.6, 1.26.9 (#10435) 2023-09-18 05:40:32 -07:00
Mohamed Omar Zaian
c24c279df7 [containerd] add hashes for version 1.7.6, 1.6.24 (#10439) 2023-09-18 05:28:31 -07:00
Qasim Mehmood
0f243d751f Use correct env var name for kube-vip per service leader election (#10433) 2023-09-14 02:22:17 -07:00
Toon Albers
31f6d38cd2 [cilium] fix: invalid hubble yaml if cilium_hubble_tls_generate is enabled (#10430) 2023-09-13 04:16:15 -07:00
Toon Albers
c31bb9aca7 docs: add Cilium CNI to sidebar (#10431) 2023-09-12 08:06:12 -07:00
Takuya Murakami
748b0b294d [kubernetes] support 1.28.0 / 1.28.1 (#10376) (#10390)
* [kubernetes] support 1.28.0/1.28.1 (#10376)

* [kubernetes] Make 1.28.1 default (#10376)
2023-09-11 19:42:12 -07:00
NierYYDS
af8210dfea fix: add kubelet tag in task of fetch facts to avoid kubelet config inconsistencies (#10423)
when people run playbook with option `--tags=kubelet`, the kubelet config may changed, because some variables used in task populating `kubelet-config.yml`  could be different with running task(`Fetch facts`)
2023-09-11 05:12:11 -07:00
Florian Ruynat
493969588e Use cluster_name variable instead of hardcoded value in cinder-csi controller plugin (#10422) 2023-09-08 07:18:16 -07:00
Kay Yan
293573c665 update-docs-for-calico-in-centos (#10417) 2023-09-08 05:18:14 -07:00
Kay Yan
5ffdb7355a cleanup-for-2.23.0 (#10420) 2023-09-08 04:40:13 -07:00
Kay Yan
c33e4d7bb7 fix-resolv.conf-nameserver-inline-comments (#10415) 2023-09-07 05:34:59 -07:00
Mohamed Omar Zaian
24b82917d1 [calico] add v3.25.2 and make it default (#10414) 2023-09-06 19:50:56 -07:00
Florian Ruynat
9696936b59 Fixup recover control plane playbook + add debian12/cilium test (#10411)
* Add debian12 cilium testing

* Fixup recover control plane playbook
2023-09-05 10:42:52 -07:00
Mohamed Omar Zaian
aeca9304f4 Update etcd version on README (#10410) 2023-09-04 03:11:49 -07:00
NierYYDS
8fef156e8f fix: specify owner to kube_owner in task of copy cni plugins (#10407)
if not set owner to kube_owner in unarchive module, the owner of /opt/cni/bin will changed to root, which is inconsistent with the previous task.
2023-09-04 02:29:49 -07:00
Kay Yan
8497528240 update-load-balancers-versions (#10409) 2023-09-03 23:57:49 -07:00
蔣 航
ebd71f6ad7 Fix Typo kubelet_topology_manager_policy (#10384)
Signed-off-by: hang.jiang <hang.jiang@daocloud.io>
2023-09-03 23:39:48 -07:00
Nicolas Goudry
c677438189 docs: add command to restart nginx-proxy container when adding node (#10406) 2023-09-01 09:24:32 -07:00
Mohamed Omar Zaian
d646053c0e [feat] Update metrics server to v0.6.4 (#10400) 2023-08-30 00:44:47 -07:00
Uri Zafrir
c9a7ae1cae Update README.md (#10398) 2023-08-29 02:33:22 -07:00
Mohamed Omar Zaian
e84c1004df [containerd] add hashes for 1.7.4-5 (#10397) 2023-08-28 19:29:20 -07:00
Kay Yan
b19b727fe7 change maximal_ansible_version to 2.15 (#10395) 2023-08-28 04:35:45 -07:00
Louis Tu
0932318b85 fix not-found service error (#10391)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2023-08-24 19:05:17 -07:00
Daniel Strufe
e573a2f6d4 Add huawei cloud controller (#10198)
* Add huaweicloud as external cloud controller

* Add huaweicloud example config

* Rename AK,SK to ACCESS_KEY and SECRET_KEY

* Add reference to huaweicloud

* Fix variable naming

* Fix env var name

* Update example

* Fix variable naming

* Fix cloud_config path

* Add namespace for leader election

* Revert reviewers

* Delete OWNERS

Delete owners who are not responsible here.

* Fix build validation
2023-08-24 18:55:17 -07:00
Mohamed Omar Zaian
52c1826423 [kubernetes] Make 1.27.5 default (#10392)
* Add hashes for 1.27.5 1.26.8, 1.25.13
* Address CVE-2023-3955 , CVE-2023-3676
* Make kubernetes v1.27.5 default
2023-08-24 18:51:17 -07:00
Samuel Liu
e1881fae02 Install etcdutl file by default (#10385) 2023-08-23 07:04:22 -07:00
Victor Morales
5ed85094c2 Update checksum values (#10369)
The following binaries has been updated:

* crio
* krew
* runc
* crun
* gvisor
* nerdctl
* skopeo
* yq

Signed-off-by: Victor Morales <chipahuac@hotmail.com>
2023-08-18 09:46:29 -07:00
tenni
bf29ea55cf fix: flatcar bootstrap (#10363) 2023-08-18 08:14:29 -07:00
Louis Tu
cafe4f1352 Add kubelet topology manager policy on the node (#10370)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2023-08-18 01:26:28 -07:00
cortex3
a9ee1c4167 fix argocd install not working using the kubespray docker image (#10371) 2023-08-17 18:30:28 -07:00
Florian Ruynat
a8c1bccdd5 Move runroot from crio.conf to storage.conf (#10372) 2023-08-17 10:17:22 -07:00
Mohamed Omar Zaian
71cf553aa8 [containerd] add hashes for 1.7.3 , 1.6.22 , 1.6.23 (#10368) 2023-08-17 05:05:24 -07:00
Mohamed Omar Zaian
a894a5e29b [argocd] update argocd to v2.8.0 (#10364) 2023-08-16 21:38:20 -07:00
Mohamed Omar Zaian
9bc7492ff2 [kubernetes] Make 1.27.4 default (#10359) 2023-08-16 21:12:19 -07:00
yun
77bda0df1c Fix containerd config_path mirrors and remove nerdctl insecure_registry (#10196)
* Fix containerd_registries in config_path for mirrors and remove nerdctl global insecure_registry setting

* Make containerd hosts.toml mode 0640

* Add containerd_registries_mirrors and keep containerd_registries to pass packet_debian11-calico-upgrade
2023-08-16 05:18:27 -07:00
cortex3
4c37399c75 fix hcloud-cloud-controller-manager not working in certain setups (#10297) 2023-08-16 05:14:27 -07:00
Mohamed Omar Zaian
cd69283184 [helm] upgrade to 3.12.3 (#10365) 2023-08-16 05:10:29 -07:00
R. P. Taylor
cf3b3ca6fd clean up /etc/hosts file if populate_inventory_to_hosts_file is false (#10144)
* de-populate hosts file if populate_inventory_to_hosts_file is false

keep newline

* fix when condition
2023-08-15 20:22:28 -07:00
Luke Simmons
1955943d4a Removes Ansible reinstall from pipeline (#10032) 2023-08-14 05:11:21 -07:00
charlychiu
3b68d63643 fix: not mount tls when disable (#10357) 2023-08-11 09:01:27 -07:00
Arthur Outhenin-Chalandre
d21bfb84ad project: resolve ansible-lint key-order rule (#10314)
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-08-10 00:57:27 -07:00
Nicolas Goudry
2a7c9d27b2 fix(multus): loop_control template error when item is None (#10347) 2023-08-09 20:51:26 -07:00
ERIK
9c610ee11d not requiring 'v' in youki version (#10346)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2023-08-08 19:33:51 -07:00
Francisco Orselli
7295d13d60 [EOS-11830] Use ETCD port 2381 for metrics (#10332) 2023-08-08 11:06:16 -07:00
ERIK
2fbbb70baa Fix youki binary download url (#10337)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2023-08-08 06:12:15 -07:00
Nico
b5ce69cf3c Set owner/group to root/root when unarchiving kata-containers (#10338)
Set owner/group to root/root when unarchiving kata-containers binary to prevent kata-containers binaries/directories and especially / from getting chowned to 1001:123, the file owner specified in the kata-containers archive
2023-08-08 05:06:15 -07:00
Arthur Outhenin-Chalandre
1c5f657f97 tests/packet-ci: sanitize branch name for kubernetes labels (#10315)
'/' doesn't work in kubernetes label so we replace it.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-08-08 01:54:15 -07:00
Arthur Outhenin-Chalandre
9613ed8782 Use supported version of fedora in CI (#10108)
* tests: replace fedora35 with fedora37

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* tests: replace fedora36 with fedora38

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* docs: update fedora version in docs

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* molecule: upgrade fedora version

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* tests: upgrade fedora images for vagrant and kubevirt

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* vagrant: workaround to fix private network ip address in fedora

Fedora stop supporting syconfig network script so we added a workaround
here
https://github.com/hashicorp/vagrant/issues/12762#issuecomment-1535957837
to fix it.

* netowrkmanager: do not configure dns if using systemd-resolved

We should not configure dns if we point to systemd-resolved.
Systemd-resolved is using NetworkManager to infer the upstream DNS
server so if we set NetworkManager to 127.0.0.53 it will prevent
systemd-resolved to get the correct network DNS server.

Thus if we are in this case we just don't set this setting.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* image-builder: update centos7 image

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* gitlab-ci: mark fedora packet jobs as allow failure

Fedora networking is still broken on Packet, let's mark it as allow
failure for now.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-08-08 00:50:12 -07:00
bo.jiang
b142995808 Add ErikJiang as reviewer
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2023-08-08 09:46:11 +02:00
Arthur Outhenin-Chalandre
36e5d742dc Resolve ansible-lint name errors (#10253)
* project: fix ansible-lint name

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: ignore jinja template error in names

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: capitalize ansible name

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: update notify after name capitalization

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-07-26 07:36:22 -07:00
Kay Yan
b9e3861385 add-cpuManagerPolicy (#10309) 2023-07-25 13:12:20 -07:00
Louis Tu
f2bb3aba1e Update README (#10308)
update minimal ansible version to v2.14+

update supported list of docker versions

Signed-off-by: tu1h <lihai.tu@daocloud.io>
2023-07-24 21:08:04 -07:00
Mikhail Vintcukevich
4243003c94 fix: define variable for reset confirmation (#10303) 2023-07-23 23:58:14 -07:00
satandyh
050bd0527f enchance security with CIS Kubernetes V1.23 (#10304)
Benchmark item number 4.1.9
2023-07-23 19:24:11 -07:00
Mohamed Omar Zaian
fe32de94b9 [kubernetes] Add hashes for kubernetes 1.27.4, 1.26.7, 1.25.12 (#10300) 2023-07-23 19:20:10 -07:00
Louis Tu
d2383d27a9 Bump versions (#10295)
The following applications have been upgraded:

* helm
* skopeo
* yq

Signed-off-by: tu1h <lihai.tu@daocloud.io>
2023-07-19 00:26:03 -07:00
somewho
788190beca reset_confirmation in reset.yml (#10288)
* Update reset.yml

reset confirmation user input fix

* Update reset.yml

added default for non-interactive run in ci/cd

* fix reset_confirmation in reset.yml

* skip reset_confirmation promtp when reset_confirmation is defined via extra-vars option (for tests)
* check both string type and object type with user_input for reset_confirmation var

* reset_confirmation_prompt in conjunction with reset_confirmation

improvement inspired by:
https://github.com/kubernetes-sigs/kubespray/pull/10288#issuecomment-1637056880
2023-07-18 05:45:10 -07:00
yangsenzk
13aa32278a bugfix: fix grep command without -w option causing prefix matched while adding one etcd member (#10291) 2023-07-13 21:43:29 -07:00
Mohamed Omar Zaian
38ce02c610 [ingress-nginx] upgrade to 1.8.1 (#10281) 2023-07-10 21:05:12 -07:00
Arthur Outhenin-Chalandre
9312ae7c6e project: fix galaxy ansible-lint rule (#10277)
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-07-07 00:01:04 -07:00
yun
1d86919883 Clean up calicoctl_alternate_download_url (#10271) 2023-07-05 08:16:57 -07:00
Victor Morales
78c1775661 Upgrade versions (#9798)
The following applications have been upgraded:

* Cilium
* Helm
* crun
* Katacontainers
* youki
* gvisor
* skopeo
* yq

Signed-off-by: Victor Morales <chipahuac@hotmail.com>
2023-07-05 03:32:58 -07:00
Arthur Outhenin-Chalandre
5d00b851ce project: fix var-spacing ansible rule (#10266)
* project: fix var-spacing ansible rule

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: fix spacing on the beginning/end of jinja template

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: fix spacing of default filter

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: fix spacing between filter arguments

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: fix double space at beginning/end of jinja

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: fix remaining jinja[spacing] ansible-lint warning

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-07-04 20:36:54 -07:00
Kundan Kumar
f8b93fa88a link for aws_alb_ingress_controller (#10264) 2023-07-03 03:44:51 -07:00
jeremy-thuon
0405af1107 [cilium] add custom vars for clusterrole cilium operator (#10267) 2023-07-03 02:20:51 -07:00
Wendy
872e173887 update cilium version to 1.13.4 (#10269)
Signed-off-by: yulng <wei.yang@daocloud.io>
2023-07-03 00:02:51 -07:00
yun
b42757d330 Fix RHEL subscription activation key by removing auto_attach and syspurpose (#10258) 2023-06-30 03:21:45 -07:00
Florian Berchtold
a4d8d15a0e Add github container registry (#10265) 2023-06-30 03:17:45 -07:00
Arthur Outhenin-Chalandre
f8f197e26b Fix outdated tag and experimental ansible-lint rules (#10254)
* project: fix outdated tag and experimental

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: remove no longer useful noqa 301

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: replace unnamed-task by name[missing]

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: fix daemon-reload -> daemon_reload

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-06-30 02:51:57 -07:00
Cyclinder
4f85b75087 using configmap to configure calico cni config (#10177)
Signed-off-by: cyclinder qifeng.guo@daocloud.io

Signed-off-by: cyclinder qifeng.guo@daocloud.io
2023-06-30 02:51:45 -07:00
Arthur Outhenin-Chalandre
8895e38060 Update doc after ansible-core upgrade to 2.14 (#10261)
* docs/ansible: update ansible venv install method and ansible version

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* docs/ansible: add a disclaimer about using version below python 3.9

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-06-28 06:28:32 -07:00
yun
9a896957d9 Dockerfile after ansible upgrade (#10259) 2023-06-28 03:54:32 -07:00
Arthur Outhenin-Chalandre
37e004164b metallb: increase wait timeout from 30s to 2m (#10260)
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-06-27 20:54:32 -07:00
Mathieu Parent
77069354cf Add system-upgrade to upgrade-cluster playbook (#10184) 2023-06-26 18:24:30 -07:00
ERIK
2aafab6c19 fix etcdctl copy operation in crio (#10242)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2023-06-26 18:08:30 -07:00
nltimv
35aaf97216 Stop firewalld for rockylinux8 on Vagrant (#10252) 2023-06-26 18:02:30 -07:00
Arthur Outhenin-Chalandre
25cb90bc2d Upgrade ansible (#10190)
* project: update all dependencies including ansible

Upgrade to ansible 7.x and ansible-core 2.14.x. There seems to be issue
with ansible 8/ansible-core 2.15 so we remain on those versions for now.
It's quite a big bump already anyway.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* tests: install aws galaxy collection

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* ansible-lint: disable various rules after ansible upgrade

Temporarily disable a bunch of linting action following ansible upgrade.
Those should be taken care of separately.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: resolve deprecated-module ansible-lint error

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: resolve no-free-form ansible-lint error

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: resolve schema[meta] ansible-lint error

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: resolve schema[playbook] ansible-lint error

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: resolve schema[tasks] ansible-lint error

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: resolve risky-file-permissions ansible-lint error

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: resolve risky-shell-pipe ansible-lint error

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: remove deprecated warn args

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: use fqcn for non builtin tasks

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: resolve syntax-check[missing-file] for contrib playbook

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: use arithmetic inside jinja to fix ansible 6 upgrade

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-06-26 03:15:45 -07:00
Arthur Outhenin-Chalandre
3311e0a296 tests: cleanup stale packet namespace automatically (#10245)
* tests: cleanup stale packet namespace automatically

Cancelled job on Gitlab can produce stale VMs as the delete playbook
will never be executed. This commits allow removing old vms by getting
all the namespace created from the same branch with an older pipeline
id.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* tests: cleanup stale packet namespace after 2 hours

This ensure that we don't have any packet namespace remaining for more
than 2 hours. All the jobs complete usually within 30min-1hour so 2
hours is enough to detect a stale namespace.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* tests: ignore vm cleanup failure

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* tests: use pipeline_id var instead of fetching namespace for cleanup packet vm

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-06-26 00:57:08 -07:00
Tiago Epifânio
eb31653d66 Disable fapolicyd service (#10081) 2023-06-23 20:49:06 -07:00
Vyacheslav Vershinin
180df831ba feat: add option to use custome CA for https_proxy (#10215) 2023-06-23 09:59:24 -07:00
Pat Riehecky
2fa64f9fd6 Add flag to prevent running helm update (#10169)
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
2023-06-23 06:03:23 -07:00
Vaibhav Goel
a1521dc16e Updates the broken links in ingress-controller and kubernetes-apps under kubespray docs (#10239) 2023-06-22 02:29:39 -07:00
Victor Morales
bf31a3a872 Split defaults main file (#10121) 2023-06-22 02:19:40 -07:00
peterw
4a8fd94a5f add growpart azure enabled (#10241) 2023-06-21 06:23:40 -07:00
Louis Tu
e214bd0e1b clean up outdate os files (#10236)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2023-06-21 02:45:39 -07:00
Arthur Outhenin-Chalandre
4ad89ef8f1 local_path_provisioner: fix invalid podhelper yaml (#10237)
New line was not inserted between image and imagePullPolicy for some
reasons with the jinja. Simplifying this altogether should fix this.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-06-20 20:10:21 -07:00
Emin AKTAS
7a66be8254 bump flannel version to v0.22.0 and flannel-cni-plugin version to v1.1.2 (#10205)
This also changes flannel repository from flannelcni to flannel

Signed-off-by: Emin Aktaş <eminaktas34@gmail.com>
2023-06-19 16:52:24 -07:00
Samuel Liu
db696785d5 update local path provisioner version and remove psp (#10054)
* update local_path_provisioner_version

* remove psp and update cm
2023-06-19 11:44:21 -07:00
Mohamed Omar Zaian
dfec133273 [calico] add hashes for v3.26.1 (#10235) 2023-06-19 10:40:23 -07:00
Xieql
41605b4135 Fix broken calico link in README (#10232)
Signed-off-by: Xieql <xieqianglong@huawei.com>
2023-06-19 09:58:21 -07:00
Arthur Outhenin-Chalandre
475abcc3a8 project: drop Kubernetes 1.24 support (#10234)
* project: drop Kubernetes 1.24 support

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* readme: bump crio version to 1.27 in the readme

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-06-19 08:42:21 -07:00
Mohamed Omar Zaian
3a7d84e014 [feature] Correct CoreDNS versions for kubernetes releases (#10233) 2023-06-19 07:34:22 -07:00
Mohamed Omar Zaian
ad3f84df98 [argocd] update argocd to v2.7.4 (#10226) 2023-06-19 07:20:22 -07:00
Emin AKTAS
79e742c03b bump coredns version to 1.10.1 (#10199)
Signed-off-by: Emin Aktaş <eminaktas34@gmail.com>
2023-06-19 04:06:21 -07:00
Victor Morales
d79ada931d Update download hash bash script (#10120) 2023-06-19 02:52:22 -07:00
Takuya Murakami
b2f6abe4ab fix parsing of RHSM proxy configuration (#10060) (#10228)
Remove URL scheme part from http_proxy for server.proxy_hostname
2023-06-19 02:24:21 -07:00
Louis Tu
c5dac1cdf6 Add Debian 12(bookworm) support and CI (#10221)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2023-06-19 02:20:21 -07:00
Yoshitaka Fujii
89a0f515c7 Added terraform support for NIFCLOUD (#10227)
* Add NIFCLOUD

* Add tf-validate-nifcloud in gitlab-ci
2023-06-19 02:02:22 -07:00
Samuel Liu
d296adcd65 allow change argocd url (#10176) 2023-06-18 19:18:20 -07:00
Mohamed Omar Zaian
141064c443 [helm] upgrade to 3.12.1 (#10225) 2023-06-18 17:04:20 -07:00
ERIK
54859cb814 Fix etcdctl copy operation (#10230)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2023-06-16 04:18:19 -07:00
Mohamed Omar Zaian
0f0991b145 [ingress-nginx] upgrade to 1.8.0 (#10223) 2023-06-15 19:48:25 -07:00
Mohamed Omar Zaian
658d62be16 [kubernetes] upgrade versions to address CVE-2023-2728 (#10220)
* [kubernetes] Add hashes for 1.27.3, 1.26.6, 1.25.11
* [kubernetes] make 1.26.6 default
2023-06-15 19:48:18 -07:00
Mohamed Omar Zaian
0139bfdb71 [calico] add hashes for v3.26.0 (#10224) 2023-06-15 19:44:18 -07:00
Kay Yan
efeac70e40 add-ci-for-debian12 (#10222) 2023-06-15 08:34:18 -07:00
Furkan Türkal
b4db077e6a containerd: bump to 1.7.2 (#10219)
Signed-off-by: Furkan <furkan.turkal@trendyol.com>
2023-06-15 03:22:18 -07:00
R. P. Taylor
280e4e3b57 exclude terraform.tfstate backups in .gitignore (#10216)
Newer versions of Terraform use timestamps in the backup name, e.g. `terraform.tfstate.1614728479.backup`
2023-06-14 19:20:17 -07:00
Ugur Can Ozturk
a962fa2357 [podSecurityConfiguration]: fix apiVersion and change default policy versions (#10210)
Signed-off-by: Ugur <ugurozturk918@gmail.com>
2023-06-12 17:55:57 -07:00
palme
775851b00c [flatcar] add python dependency check for helm-apps (#10192)
* add pyyaml install via task instead of package

* Change condition for better consistency in the codebase
2023-06-12 17:51:58 -07:00
Arthur Outhenin-Chalandre
f8fadf53cd helm: fix pyyaml package on RH distros (#10204)
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-06-12 17:39:57 -07:00
ERIK
ce13699dfa Use a uniform way to get the local path of the binaries (#10211)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2023-06-12 00:39:48 -07:00
Ashish Singh Dev
fc5937e948 fix gce-pd-csi driver (#10208)
* fix gce-pd-csi driver

* fixed, 1. reading replicas value from defaults.yml, and 2. corrected gcp-pd-csi driver version in README.md
2023-06-11 20:45:47 -07:00
Kay Yan
729e2c565b cleanup-for-2.22.1 (#10201) 2023-06-08 07:36:15 -07:00
James
26ed50f04a Enable interruptible jobs' pipelines (#10167) 2023-06-08 03:12:13 -07:00
Emin AKTAS
2b80d053f3 bump nodelocaldns version to 1.22.20 (#10200)
Signed-off-by: Emin Aktaş <eminaktas34@gmail.com>
2023-06-08 03:08:14 -07:00
Pat Riehecky
f5ee8b71ff Permit custom names for API server lb/proxy containers. (#10166)
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
2023-06-08 02:54:13 -07:00
James
4c76feb574 Kubelet csr approver fixes (#10165)
* Fix upgrade-path for kubelet-csr-approver

Fixes an error when you enable kubelet-csr-approver when upgrading.
It hangs waiting for the certificate to be approved since the
kubelet-csr-approver is not installed yet.

* Add missing package when using helm role
2023-06-06 02:27:00 -07:00
Mateusz Mojsiejuk
18d84db41c Don't search filesystem mounts in docker build step (#10131)
Limit find cmd to /usr/ where __pycache__ files are located
2023-06-06 01:13:01 -07:00
Kenichi Omichi
08a571b4a1 Remove flannel_cni_download_url (#10188)
Since the commit 937e64d296 the variable
has not been used at all.
This removes it from offline.yml which was the remaining part.
2023-06-05 05:57:25 -07:00
yun
5ebd305d17 remove cri-o using crio_bin_files (#10182) 2023-06-04 20:02:42 -07:00
Arthur Outhenin-Chalandre
edc73bc3c8 project: upgrade test dependencies and drop ansible-core 2.11 (#10034)
Molecule 5.0 require ansible-core 2.12.10.
So this commit we update ansible-core from 2.12.5 to 2.12.10.
We also drop supporting two ansible-core version. Also we now use the "oldest"
still supported ansible-core version as both 2.11 is EOL and not
supported by molecule.



tests/molecule: remove linting in molecule to support molecule 5



tests/molecule: remove role name check for molecule 5 support

Kubespray doesn't use ansible galaxy style naming so we have to disable
that check.



contrib/inventory_builder: fix tox.ini for tox4



tests/molecule: fix get_playbook in testinfra tests



tests: upgrade most tests requirements

Exclude ansible-lint for now, I will do that in a separate PR.



tests/molecule: force kvm driver option

If we don't do this it fallbacks to qemu emulated on our CI for some
reasons.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-06-02 20:40:40 -07:00
Mohamed Omar Zaian
b7fa2d7b87 Fix metrics-server for k8s 1.26 (#10183) 2023-06-02 18:16:40 -07:00
Samuel Liu
7771ac6074 add krew_no_upgrade_check (#10175) 2023-06-02 18:12:40 -07:00
Michael Stötzer
f25b6fce1c Add node_taints to aws_inventory script (#10168) (#10170) 2023-06-01 22:12:52 -07:00
Samuel Liu
d7b79395c7 Add labels to kube-vip static pods (#10139) 2023-06-01 16:45:46 -07:00
Richard Fairthorne
ce18b0f22d fix missing newline in template (#10174) 2023-05-31 23:27:45 -07:00
Aleksandr Karabanov
2d8f60000c Solves #2933: Allow http_proxy, https_proxy and no_proxy environment variables in cert-manager playbook (#10162) 2023-05-31 20:23:45 -07:00
yjqg6666
0b102287d1 [#10148] The download.timeout can be changed by variable download.timeout (#10149)
Reference:
  https://docs.ansible.com/ansible/latest/collections/ansible/builtin/get_url_module.html#parameter-timeout
2023-05-31 18:15:45 -07:00
Pat Riehecky
d325fd6af7 Don't create calico CNI dir when not using calico (#10156)
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
2023-05-31 08:35:48 -07:00
Pat Riehecky
e949b8a1e8 Update cilium to latest (1.13.3) (#10158)
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
2023-05-31 03:23:46 -07:00
Pat Riehecky
ab6e284180 Locate mount names isn't a change to the system (#10161)
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
2023-05-31 01:33:46 -07:00
Pat Riehecky
7421b6e180 Running ping doesn't change state (#10160)
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
2023-05-31 01:29:46 -07:00
Vaibhav Goel
a2f03c559a Fixed the incorrect links in kubespray/docs (#10159) 2023-05-30 19:35:47 -07:00
Pat Riehecky
3ced391fab Print the found version when it is incorrect (#10109)
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
2023-05-30 11:43:49 -07:00
Jeroen Rijken
ea7dcd46d7 Update MetalLB deployment, wait for resource. (#9995)
* Update MetalLB deployment, wait for resource.

Signed-off-by: Jeroen Rijken <jeroen.rijken@xs4all.nl>

* yml to yaml, add basic test for metallb

Signed-off-by: Jeroen Rijken <jeroen.rijken@xs4all.nl>

---------

Signed-off-by: Jeroen Rijken <jeroen.rijken@xs4all.nl>
2023-05-30 11:37:49 -07:00
Mohammad KhoshZaban
94e33bdbbf fix manage-offline-files script - wrong path (#9886) 2023-05-28 21:27:42 -07:00
Maxime Leroy
29f833e9a4 fix(ssl-ca): mount ssl ca directories (#9794)
Signed-off-by: Maxime Leroy <19607336+maxime1907@users.noreply.github.com>
2023-05-28 19:43:42 -07:00
qlijin
8c32be5feb Add insecure_registry config to crio.conf (#10142) 2023-05-28 19:03:41 -07:00
Victor Login
0ba2e655f4 Fix problem migration to k8s 1.27 (#10136)
* Fix `The task includes an option with an undefined variable` for 1.27

* delete old flag --container-runtime

Signed-off-by: Victor Login <batazor@evrone.com>

---------

Signed-off-by: Victor Login <batazor@evrone.com>
2023-05-28 17:09:42 -07:00
Daniel Strufe
78189186e5 Rebasechanges from upstream (#10128) 2023-05-26 00:28:52 -07:00
Andrei Costescu
96e875cd50 Add systemd_resolved_disable_stub_listener (#9875) 2023-05-25 10:04:51 -07:00
Kay Yan
808524bed6 fix-ci-tf-elastx_cleanup (#10133) 2023-05-25 08:38:52 -07:00
ERIK
75e00420ec Add arch and version to the downloaded binary name (#10122)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2023-05-24 22:30:50 -07:00
Mohamed Omar Zaian
8be5604da4 [kubernetes] support 1.27.2 (#9976) 2023-05-24 20:00:50 -07:00
Arthur Outhenin-Chalandre
02624554ae Remove end of life ubuntu versions in CI (#10107)
* tests: replace ubuntu16 with ubuntu20

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* tests: replace ubuntu18 with ubuntu20

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* docs: update docs to remove support for ubuntu 16 and 18

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* molecule: upgrade ubuntu versions

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* vagrant: upgrade ubuntu versions

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* tests: cleanup ubuntu{16,18}

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* tests: increase ubuntu22 ram to allow molecule creation

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-05-24 19:56:50 -07:00
Kay Yan
9d1e9a6a78 kube_ovn_cni_config_priority (#10125) 2023-05-24 18:34:51 -07:00
Kay Yan
861d5b763d fix-dockerfile (#10127) 2023-05-24 17:02:50 -07:00
Kay Yan
4013c48acb cleanup-for-2.22.0 (#10126) 2023-05-24 08:56:50 -07:00
Rob Tongue
f264426646 cert-manager controller args: (#10049)
- Adding in the ability to feed extra-args to cert-manager-controller.
2023-05-24 08:12:53 -07:00
Mathias Petermann
862fd2c5c4 feature(ingress_nginx) Add ingressclass for ingress_nginx (#10091)
Add option to configure class as the default class
Add option to disable wathcing for ingresses without class

Remove redundant if that always evaluates to true

Fix default value missing for ingress_nginx_default
2023-05-24 04:12:50 -07:00
1219 changed files with 30803 additions and 26952 deletions

View File

@@ -7,34 +7,41 @@ skip_list:
# These rules are intentionally skipped:
#
# [E204]: "Lines should be no longer than 160 chars"
# This could be re-enabled with a major rewrite in the future.
# For now, there's not enough value gain from strictly limiting line length.
# (Disabled in May 2019)
- '204'
# [E701]: "meta/main.yml should contain relevant info"
# Roles in Kubespray are not intended to be used/imported by Ansible Galaxy.
# While it can be useful to have these metadata available, they are also available in the existing documentation.
# (Disabled in May 2019)
- '701'
# [role-name] "meta/main.yml" Role name role-name does not match ``^+$`` pattern
# Meta roles in Kubespray don't need proper names
# (Disabled in June 2021)
- 'role-name'
- 'experimental'
# [var-naming] "defaults/main.yml" File defines variable 'apiVersion' that violates variable naming standards
# [var-naming]
# In Kubespray we use variables that use camelCase to match their k8s counterparts
# (Disabled in June 2021)
- 'var-naming'
- 'var-spacing'
- 'var-naming[pattern]'
# Variables names from within roles in kubespray don't need role name as a prefix
- 'var-naming[no-role-prefix]'
# [fqcn-builtins]
# Roles in kubespray don't need fully qualified collection names
# (Disabled in Feb 2023)
- 'fqcn-builtins'
# We use template in names
- 'name[template]'
# No changed-when on commands
# (Disabled in June 2023 after ansible upgrade; FIXME)
- 'no-changed-when'
# Disable run-once check with free strategy
# (Disabled in June 2023 after ansible upgrade; FIXME)
- 'run-once[task]'
exclude_paths:
# Generated files
- tests/files/custom_cni/cilium.yaml
- venv
- .github
- .ansible
- .cache
- .gitlab-ci.yml
- .gitlab-ci
mock_modules:
- gluster.gluster.gluster_volume

8
.ansible-lint-ignore Normal file
View File

@@ -0,0 +1,8 @@
# This file contains ignores rule violations for ansible-lint
inventory/sample/group_vars/k8s_cluster/k8s-cluster.yml jinja[spacing]
roles/kubernetes/control-plane/defaults/main/kube-proxy.yml jinja[spacing]
roles/kubernetes/control-plane/defaults/main/main.yml jinja[spacing]
roles/kubernetes/kubeadm/defaults/main.yml jinja[spacing]
roles/kubernetes/node/defaults/main.yml jinja[spacing]
roles/kubernetes/preinstall/defaults/main.yml jinja[spacing]
roles/kubespray-defaults/defaults/main/main.yml jinja[spacing]

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
docs/_sidebar.md linguist-generated=true

View File

@@ -1,44 +0,0 @@
---
name: Bug Report
about: Report a bug encountered while operating Kubernetes
labels: kind/bug
---
<!--
Please, be ready for followup questions, and please respond in a timely
manner. If we can't reproduce a bug or think a feature already exists, we
might close your issue. If we're wrong, PLEASE feel free to reopen it and
explain why.
-->
**Environment**:
- **Cloud provider or hardware configuration:**
- **OS (`printf "$(uname -srm)\n$(cat /etc/os-release)\n"`):**
- **Version of Ansible** (`ansible --version`):
- **Version of Python** (`python --version`):
**Kubespray version (commit) (`git rev-parse --short HEAD`):**
**Network plugin used**:
**Full inventory with variables (`ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"`):**
<!-- We recommend using snippets services like https://gist.github.com/ etc. -->
**Command used to invoke ansible**:
**Output of ansible run**:
<!-- We recommend using snippets services like https://gist.github.com/ etc. -->
**Anything else do we need to know**:
<!-- By running scripts/collect-info.yaml you can get a lot of useful informations.
Script can be started by:
ansible-playbook -i <inventory_file_path> -u <ssh_user> -e ansible_ssh_user=<ssh_user> -b --become-user=root -e dir=`pwd` scripts/collect-info.yaml
(If you using CoreOS remember to add '-e ansible_python_interpreter=/opt/bin/python').
After running this command you can find logs in `pwd`/logs.tar.gz. You can even upload somewhere entire file and paste link here.-->

147
.github/ISSUE_TEMPLATE/bug-report.yaml vendored Normal file
View File

@@ -0,0 +1,147 @@
---
name: Bug Report
description: Report a bug encountered while using Kubespray
labels: kind/bug
body:
- type: markdown
attributes:
value: |
Please, be ready for followup questions, and please respond in a timely
manner. If we can't reproduce a bug or think a feature already exists, we
might close your issue. If we're wrong, PLEASE feel free to reopen it and
explain why.
- type: textarea
id: problem
attributes:
label: What happened?
description: |
Please provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner.
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect to happen?
validations:
required: true
- type: textarea
id: repro
attributes:
label: How can we reproduce it (as minimally and precisely as possible)?
validations:
required: true
- type: markdown
attributes:
value: '### Environment'
- type: dropdown
id: os
attributes:
label: OS
options:
- 'RHEL 9'
- 'RHEL 8'
- 'Fedora 40'
- 'Ubuntu 24'
- 'Ubuntu 22'
- 'Ubuntu 20'
- 'Debian 12'
- 'Debian 11'
- 'Flatcar Container Linux'
- 'openSUSE Leap'
- 'openSUSE Tumbleweed'
- 'Oracle Linux 9'
- 'Oracle Linux 8'
- 'AlmaLinux 9'
- 'AlmaLinux 8'
- 'Rocky Linux 9'
- 'Rocky Linux 8'
- 'Amazon Linux 2'
- 'Kylin Linux Advanced Server V10'
- 'UOS Linux 20'
- 'openEuler 24'
- 'openEuler 22'
- 'openEuler 20'
- 'Other|Unsupported'
validations:
required: true
- type: textarea
id: ansible_version
attributes:
label: Version of Ansible
placeholder: 'ansible --version'
validations:
required: true
- type: input
id: python_version
attributes:
label: Version of Python
placeholder: 'python --version'
validations:
required: true
- type: input
id: kubespray_version
attributes:
label: Version of Kubespray (commit)
placeholder: 'git rev-parse --short HEAD'
validations:
required: true
- type: dropdown
id: network_plugin
attributes:
label: Network plugin used
options:
- calico
- cilium
- cni
- custom_cni
- flannel
- kube-ovn
- kube-router
- macvlan
- meta
- multus
- ovn4nfv
validations:
required: true
- type: textarea
id: inventory
attributes:
label: Full inventory with variables
placeholder: 'ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"'
description: We recommend using snippets services like https://gist.github.com/ etc.
validations:
required: true
- type: input
id: ansible_command
attributes:
label: Command used to invoke ansible
validations:
required: true
- type: textarea
id: ansible_output
attributes:
label: Output of ansible run
description: We recommend using snippets services like https://gist.github.com/ etc.
validations:
required: true
- type: textarea
id: anything_else
attributes:
label: Anything else we need to know
description: |
By running scripts/collect-info.yaml you can get a lot of useful informations.
Script can be started by:
ansible-playbook -i <inventory_file_path> -u <ssh_user> -e ansible_ssh_user=<ssh_user> -b --become-user=root -e dir=`pwd` scripts/collect-info.yaml
(If you using CoreOS remember to add '-e ansible_python_interpreter=/opt/bin/python').
After running this command you can find logs in `pwd`/logs.tar.gz. You can even upload somewhere entire file and paste link here

6
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
---
blank_issues_enabled: false
contact_links:
- name: Support Request
url: https://kubernetes.slack.com/channels/kubespray
about: Support request or question relating to Kubernetes

View File

@@ -1,11 +0,0 @@
---
name: Enhancement Request
about: Suggest an enhancement to the Kubespray project
labels: kind/feature
---
<!-- Please only use this template for submitting enhancement requests -->
**What would you like to be added**:
**Why is this needed**:

20
.github/ISSUE_TEMPLATE/enhancement.yaml vendored Normal file
View File

@@ -0,0 +1,20 @@
---
name: Enhancement Request
description: Suggest an enhancement to the Kubespray project
labels: kind/feature
body:
- type: markdown
attributes:
value: Please only use this template for submitting enhancement requests
- type: textarea
id: what
attributes:
label: What would you like to be added
validations:
required: true
- type: textarea
id: why
attributes:
label: Why is this needed
validations:
required: true

View File

@@ -1,20 +0,0 @@
---
name: Failing Test
about: Report test failures in Kubespray CI jobs
labels: kind/failing-test
---
<!-- Please only use this template for submitting reports about failing tests in Kubespray CI jobs -->
**Which jobs are failing**:
**Which test(s) are failing**:
**Since when has it been failing**:
**Testgrid link**:
**Reason for failure**:
**Anything else we need to know**:

View File

@@ -0,0 +1,41 @@
---
name: Failing Test
description: Report test failures in Kubespray CI jobs
labels: kind/failing-test
body:
- type: markdown
attributes:
value: Please only use this template for submitting reports about failing tests in Kubespray CI jobs
- type: textarea
id: failing_jobs
attributes:
label: Which jobs are failing ?
validations:
required: true
- type: textarea
id: failing_tests
attributes:
label: Which tests are failing ?
validations:
required: true
- type: input
id: since_when
attributes:
label: Since when has it been failing ?
validations:
required: true
- type: textarea
id: failure_reason
attributes:
label: Reason for failure
description: If you don't know and have no guess, just put "Unknown"
validations:
required: true
- type: textarea
id: anything_else
attributes:
label: Anything else we need to know

View File

@@ -1,18 +0,0 @@
---
name: Support Request
about: Support request or question relating to Kubespray
labels: kind/support
---
<!--
STOP -- PLEASE READ!
GitHub is not the right place for support requests.
If you're looking for help, check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubespray) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).
You can also post your question on the [Kubernetes Slack](http://slack.k8s.io/) or the [Discuss Kubernetes](https://discuss.kubernetes.io/) forum.
If the matter is security related, please disclose it privately via https://kubernetes.io/security/.
-->

21
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
labels:
- dependencies
- release-note-none
groups:
molecule:
patterns:
- molecule
- molecule-plugins*
- package-ecosystem: "github-actions"
directory: "/"
labels:
- release-note-none
- ci-short
schedule:
interval: "weekly"

32
.github/workflows/auto-label-os.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Issue labeler
on:
issues:
types: [opened]
permissions:
contents: read
jobs:
label-component:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
- name: Parse issue form
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@b80ae64e3e156e9c111b075bfa04b295d54e8e2e
with:
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
section: os
block-list: |
None
Other
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,55 @@
name: Upgrade Kubespray components with new patches versions - all branches
on:
schedule:
- cron: '22 2 * * *' # every day, 02:22 UTC
workflow_dispatch:
permissions: {}
jobs:
get-releases-branches:
if: github.repository == 'kubernetes-sigs/kubespray'
runs-on: ubuntu-latest
outputs:
branches: ${{ steps.get-branches.outputs.data }}
steps:
- uses: octokit/graphql-action@abaeca7ba4f0325d63b8de7ef943c2418d161b93
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
query: "release-",
orderBy: {
field: ALPHABETICAL,
direction: DESC
}) {
nodes {
name
}
}
}
}
variables: |
owner: ${{ github.repository_owner }}
name: ${{ github.event.repository.name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-versions:
needs: get-releases-branches
strategy:
fail-fast: false
matrix:
branch:
- name: ${{ github.event.repository.default_branch }}
- ${{ fromJSON(needs.get-releases-branches.outputs.branches).repository.refs.nodes }}
uses: ./.github/workflows/upgrade-patch-versions.yml
permissions:
contents: write
pull-requests: write
name: Update patch updates on ${{ matrix.branch.name }}
with:
branch: ${{ matrix.branch.name }}

View File

@@ -0,0 +1,44 @@
on:
workflow_call:
inputs:
branch:
description: Which branch to update with new patch versions
default: master
required: true
type: string
jobs:
update-patch-versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
with:
ref: ${{ inputs.branch }}
- uses: actions/setup-python@v6
with:
python-version: '3.13'
cache: 'pip'
- run: pip install scripts/component_hash_update pre-commit
- run: update-hashes
env:
API_KEY: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v4
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@84ae59a2cdc2258d6fa0732dd66352dddae2a412
with:
commit-message: Patch versions updates
title: Patch versions updates - ${{ inputs.branch }}
labels: bot
branch: component_hash_update/${{ inputs.branch }}
sign-commits: true
body: |
/kind feature
```release-note
NONE
```

4
.gitignore vendored
View File

@@ -3,6 +3,8 @@
**/vagrant_ansible_inventory
*.iml
temp
contrib/offline/container-images
contrib/offline/container-images.tar.gz
contrib/offline/offline-files
contrib/offline/offline-files.tar.gz
.idea
@@ -11,7 +13,7 @@ contrib/offline/offline-files.tar.gz
.cache
*.bak
*.tfstate
*.tfstate.backup
*.tfstate*backup
*.lock.hcl
.terraform/
contrib/terraform/aws/credentials.tfvars

View File

@@ -1,87 +1,66 @@
---
stages:
- build
- unit-tests
- deploy-part1
- moderator
- deploy-part2
- deploy-part3
- deploy-special
- build # build docker image used in most other jobs
- test # unit tests
- deploy-part1 # kubespray runs - common setup
- deploy-extended # kubespray runs - rarer or costlier (to test) setups
variables:
KUBESPRAY_VERSION: v2.21.0
FAILFASTCI_NAMESPACE: 'kargo-ci'
GITLAB_REPOSITORY: 'kargo-ci/kubernetes-sigs-kubespray'
GIT_CONFIG_COUNT: 2
GIT_CONFIG_KEY_0: user.email
GIT_CONFIG_VALUE_0: "ci@kubespray.io"
GIT_CONFIG_KEY_1: user.name
GIT_CONFIG_VALUE_1: "Kubespray CI"
ANSIBLE_FORCE_COLOR: "true"
MAGIC: "ci check this"
TEST_ID: "$CI_PIPELINE_ID-$CI_JOB_ID"
CI_TEST_VARS: "./tests/files/${CI_JOB_NAME}.yml"
CI_TEST_REGISTRY_MIRROR: "./tests/common/_docker_hub_registry_mirror.yml"
CI_TEST_SETTING: "./tests/common/_kubespray_test_settings.yml"
GS_ACCESS_KEY_ID: $GS_KEY
GS_SECRET_ACCESS_KEY: $GS_SECRET
CONTAINER_ENGINE: docker
SSH_USER: root
GCE_PREEMPTIBLE: "false"
ANSIBLE_KEEP_REMOTE_FILES: "1"
ANSIBLE_CONFIG: ./tests/ansible.cfg
ANSIBLE_INVENTORY: ./inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
IDEMPOT_CHECK: "false"
ANSIBLE_REMOTE_USER: kubespray
ANSIBLE_PRIVATE_KEY_FILE: /tmp/id_rsa
ANSIBLE_INVENTORY: /tmp/inventory
ANSIBLE_STDOUT_CALLBACK: "default"
RESET_CHECK: "false"
REMOVE_NODE_CHECK: "false"
UPGRADE_TEST: "false"
MITOGEN_ENABLE: "false"
ANSIBLE_LOG_LEVEL: "-vv"
ANSIBLE_VERBOSITY: 2
RECOVER_CONTROL_PLANE_TEST: "false"
RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:],kube_control_plane[1:]"
TERRAFORM_VERSION: 1.3.7
ANSIBLE_MAJOR_VERSION: "2.11"
RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:]:kube_control_plane[1:]"
OPENTOFU_VERSION: v1.9.1
PIPELINE_IMAGE: "$CI_REGISTRY_IMAGE/pipeline:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}"
before_script:
- ./tests/scripts/rebase.sh
- update-alternatives --install /usr/bin/python python /usr/bin/python3 1
- python -m pip uninstall -y ansible ansible-base ansible-core
- python -m pip install -r tests/requirements-${ANSIBLE_MAJOR_VERSION}.txt
- mkdir -p /.ssh
- mkdir -p cluster-dump $ANSIBLE_INVENTORY
.job: &job
tags:
- packet
- ffci
image: $PIPELINE_IMAGE
artifacts:
when: always
paths:
- cluster-dump/
needs:
- pipeline-image
.testcases: &testcases
<<: *job
retry: 1
before_script:
- update-alternatives --install /usr/bin/python python /usr/bin/python3 1
- ./tests/scripts/rebase.sh
- ./tests/scripts/testcases_prepare.sh
script:
- ./tests/scripts/testcases_run.sh
after_script:
- chronic ./tests/scripts/testcases_cleanup.sh
# For failfast, at least 1 job must be defined in .gitlab-ci.yml
# Premoderated with manual actions
ci-authorized:
.job-moderated:
extends: .job
stage: moderator
script:
- /bin/sh scripts/premoderator.sh
except: ['triggers', 'master']
# Disable ci moderator
only: []
needs:
- pipeline-image
- pre-commit # lint
- vagrant-validate # lint
include:
- .gitlab-ci/build.yml
- .gitlab-ci/lint.yml
- .gitlab-ci/shellcheck.yml
- .gitlab-ci/terraform.yml
- .gitlab-ci/packet.yml
- .gitlab-ci/kubevirt.yml
- .gitlab-ci/vagrant.yml
- .gitlab-ci/molecule.yml

View File

@@ -1,40 +1,30 @@
---
.build:
pipeline-image:
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- image-cache
tags:
- ffci
stage: build
image:
name: moby/buildkit:rootless
entrypoint: [""]
image: moby/buildkit:rootless
variables:
BUILDKITD_FLAGS: --oci-worker-no-process-sandbox
CACHE_IMAGE: $CI_REGISTRY_IMAGE/pipeline:cache
# TODO: remove the override
# currently rebase.sh depends on bash (not available in the kaniko image)
# once we have a simpler rebase (which should be easy if the target branch ref is available as variable
# we'll be able to rebase here as well hopefully
before_script:
- mkdir ~/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > ~/.docker/config.json
pipeline image:
extends: .build
- mkdir -p ~/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)\"}}}" > ~/.docker/config.json
script:
- |
buildctl-daemonless.sh build \
--frontend=dockerfile.v0 \
--local context=. \
--local dockerfile=. \
--opt filename=./pipeline.Dockerfile \
--output type=image,name=$PIPELINE_IMAGE,push=true \
--import-cache type=registry,ref=$CI_REGISTRY_IMAGE/pipeline:cache
rules:
- if: '$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH'
pipeline image and build cache:
extends: .build
script:
- |
buildctl-daemonless.sh build \
--frontend=dockerfile.v0 \
--local context=. \
--local dockerfile=. \
--opt filename=./pipeline.Dockerfile \
--output type=image,name=$PIPELINE_IMAGE,push=true \
--import-cache type=registry,ref=$CI_REGISTRY_IMAGE/pipeline:cache \
--export-cache type=registry,ref=$CI_REGISTRY_IMAGE/pipeline:cache,mode=max
rules:
- if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
--frontend dockerfile.v0 \
--local context=$CI_PROJECT_DIR \
--local dockerfile=$CI_PROJECT_DIR \
--opt filename=pipeline.Dockerfile \
--export-cache type=registry,ref=$CACHE_IMAGE \
--import-cache type=registry,ref=$CACHE_IMAGE \
--output type=image,name=$PIPELINE_IMAGE,push=true

153
.gitlab-ci/kubevirt.yml Normal file
View File

@@ -0,0 +1,153 @@
---
.kubevirt:
extends: .job-moderated
interruptible: true
script:
- ansible-playbook tests/cloud_playbooks/create-kubevirt.yml
-e @"tests/files/${TESTCASE}.yml"
- ./tests/scripts/testcases_run.sh
variables:
ANSIBLE_TIMEOUT: "120"
tags:
- ffci
needs:
- pipeline-image
# TODO: generate testcases matrixes from the files in tests/files/
# this is needed to avoid the need for PR rebasing when a job was added or removed in the target branch
# (currently, a removed job in the target branch breaks the tests, because the
# pipeline definition is parsed by gitlab before the rebase.sh script)
# CI template for PRs
pr:
stage: deploy-part1
rules:
- if: $PR_LABELS =~ /.*ci-short.*/
when: manual
allow_failure: true
- if: $CI_COMMIT_BRANCH =~ /^pr-.*$/
when: on_success
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PIPELINE_SCHEDULE_DESCRIPTION == "daily-ci"
when: on_success
- when: manual
allow_failure: true
extends: .kubevirt
parallel:
matrix:
- TESTCASE:
- almalinux9-crio
- almalinux9-kube-ovn
- debian11-calico-collection
- debian11-macvlan
- debian12-cilium
- debian13-cilium
- fedora39-kube-router
- openeuler24-calico
- rockylinux9-cilium
- ubuntu22-calico-all-in-one
- ubuntu22-calico-all-in-one-upgrade
- ubuntu24-calico-etcd-datastore
- ubuntu24-calico-all-in-one-hardening
- ubuntu24-cilium-sep
- ubuntu24-flannel-collection
- ubuntu24-kube-router-sep
- ubuntu24-kube-router-svc-proxy
- ubuntu24-ha-separate-etcd
- flatcar4081-calico
- fedora40-flannel-crio-collection-scale
# The ubuntu24-calico-all-in-one jobs are meant as early stages to prevent running the full CI if something is horribly broken
ubuntu24-calico-all-in-one:
stage: deploy-part1
extends: .kubevirt
variables:
TESTCASE: ubuntu24-calico-all-in-one
rules:
- if: $CI_COMMIT_BRANCH =~ /^pr-.*$/
when: on_success
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PIPELINE_SCHEDULE_DESCRIPTION == "daily-ci"
when: on_success
- when: manual
allow_failure: true
pr_full:
extends: .kubevirt
stage: deploy-extended
rules:
- if: $PR_LABELS =~ /.*ci-full.*/
when: on_success
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PIPELINE_SCHEDULE_DESCRIPTION == "daily-ci"
when: on_success
# Else run as manual
- when: manual
allow_failure: true
parallel:
matrix:
- TESTCASE:
- almalinux9-calico-ha-ebpf
- almalinux9-calico-nodelocaldns-secondary
- debian11-custom-cni
- debian11-kubelet-csr-approver
- debian12-custom-cni-helm
- fedora39-calico-swap-selinux
- fedora39-crio
- ubuntu24-calico-ha-wireguard
- ubuntu24-flannel-ha
- ubuntu24-flannel-ha-once
# Need an update of the container image to use schema v2
# update: quay.io/kubespray/vm-amazon-linux-2:latest
manual:
extends: pr_full
parallel:
matrix:
- TESTCASE:
- amazon-linux-2-all-in-one
rules:
- when: manual
allow_failure: true
pr_extended:
extends: .kubevirt
stage: deploy-extended
rules:
- if: $PR_LABELS =~ /.*(ci-extended|ci-full).*/
when: on_success
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PIPELINE_SCHEDULE_DESCRIPTION == "daily-ci"
when: on_success
- when: manual
allow_failure: true
parallel:
matrix:
- TESTCASE:
- almalinux9-calico
- almalinux9-calico-remove-node
- almalinux9-docker
- debian11-docker
- debian12-calico
- debian12-docker
- debian13-calico
- rockylinux9-calico
- ubuntu22-all-in-one-docker
- ubuntu24-all-in-one-docker
- ubuntu24-calico-all-in-one
- ubuntu24-calico-etcd-kubeadm
- ubuntu24-flannel
# TODO: migrate to pr-full, fix the broken ones
periodic:
allow_failure: true
extends: .kubevirt
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PIPELINE_SCHEDULE_DESCRIPTION == "daily-ci"
when: on_success
parallel:
matrix:
- TESTCASE:
- debian11-calico-upgrade
- debian11-calico-upgrade-once
- debian12-cilium-svc-proxy
- fedora39-calico-selinux
- fedora40-docker-calico
- ubuntu24-calico-etcd-kubeadm-upgrade-ha
- ubuntu24-calico-ha-recover
- ubuntu24-calico-ha-recover-noquorum

View File

@@ -1,114 +1,26 @@
---
yamllint:
extends: .job
stage: unit-tests
tags: [light]
pre-commit:
stage: test
tags:
- ffci
image: 'ghcr.io/pre-commit-ci/runner-image@sha256:fe01a6ec51b298412990b88627c3973b1146c7304f930f469bafa29ba60bcde9'
variables:
LANG: C.UTF-8
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
ANSIBLE_STDOUT_CALLBACK: default
script:
- yamllint --strict .
except: ['triggers', 'master']
- pre-commit run --all-files --show-diff-on-failure
cache:
key: pre-commit-2
paths:
- ${PRE_COMMIT_HOME}
when: 'always'
needs: []
vagrant-validate:
extends: .job
stage: unit-tests
tags: [light]
stage: test
tags: [ffci]
variables:
VAGRANT_VERSION: 2.3.4
VAGRANT_VERSION: 2.3.7
script:
- ./tests/scripts/vagrant-validate.sh
except: ['triggers', 'master']
ansible-lint:
extends: .job
stage: unit-tests
tags: [light]
script:
- ansible-lint -v
except: ['triggers', 'master']
syntax-check:
extends: .job
stage: unit-tests
tags: [light]
variables:
ANSIBLE_INVENTORY: inventory/local-tests.cfg
ANSIBLE_REMOTE_USER: root
ANSIBLE_BECOME: "true"
ANSIBLE_BECOME_USER: root
ANSIBLE_VERBOSITY: "3"
script:
- ansible-playbook --syntax-check cluster.yml
- ansible-playbook --syntax-check playbooks/cluster.yml
- ansible-playbook --syntax-check upgrade-cluster.yml
- ansible-playbook --syntax-check playbooks/upgrade_cluster.yml
- ansible-playbook --syntax-check reset.yml
- ansible-playbook --syntax-check playbooks/reset.yml
- ansible-playbook --syntax-check extra_playbooks/upgrade-only-k8s.yml
except: ['triggers', 'master']
collection-build-install-sanity-check:
extends: .job
stage: unit-tests
tags: [light]
variables:
ANSIBLE_COLLECTIONS_PATH: "./ansible_collections"
script:
- ansible-galaxy collection build
- ansible-galaxy collection install kubernetes_sigs-kubespray-$(grep "^version:" galaxy.yml | awk '{print $2}').tar.gz
- ansible-galaxy collection list $(egrep -i '(name:\s+|namespace:\s+)' galaxy.yml | awk '{print $2}' | tr '\n' '.' | sed 's|\.$||g') | grep "^kubernetes_sigs.kubespray"
- test -f ansible_collections/kubernetes_sigs/kubespray/playbooks/cluster.yml
- test -f ansible_collections/kubernetes_sigs/kubespray/playbooks/reset.yml
except: ['triggers', 'master']
tox-inventory-builder:
stage: unit-tests
tags: [light]
extends: .job
before_script:
- ./tests/scripts/rebase.sh
- apt-get update && apt-get install -y python3-pip
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10
- python -m pip uninstall -y ansible ansible-base ansible-core
- python -m pip install -r tests/requirements.txt
script:
- pip3 install tox
- cd contrib/inventory_builder && tox
except: ['triggers', 'master']
markdownlint:
stage: unit-tests
tags: [light]
image: node
before_script:
- npm install -g markdownlint-cli@0.22.0
script:
- markdownlint $(find . -name '*.md' | grep -vF './.git') --ignore docs/_sidebar.md --ignore contrib/dind/README.md
check-readme-versions:
stage: unit-tests
tags: [light]
image: python:3
script:
- tests/scripts/check_readme_versions.sh
check-galaxy-version:
stage: unit-tests
tags: [light]
image: python:3
script:
- tests/scripts/check_galaxy_version.sh
check-typo:
stage: unit-tests
tags: [light]
image: python:3
script:
- tests/scripts/check_typo.sh
ci-matrix:
stage: unit-tests
tags: [light]
image: python:3
script:
- tests/scripts/md-table/test.sh
- ./tests/scripts/vagrant-validate.sh

View File

@@ -1,86 +1,55 @@
---
.molecule:
tags: [c3.small.x86]
only: [/^pr-.*$/]
except: ['triggers']
image: $PIPELINE_IMAGE
services: []
tags: [ffci]
rules: # run on ci-short as well
- if: $CI_COMMIT_BRANCH =~ /^pr-.*$/
when: on_success
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PIPELINE_SCHEDULE_DESCRIPTION == "daily-ci"
when: on_success
- when: manual
allow_failure: true
stage: deploy-part1
before_script:
- tests/scripts/rebase.sh
- apt-get update && apt-get install -y python3-pip
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10
- python -m pip uninstall -y ansible ansible-base ansible-core
- python -m pip install -r tests/requirements.txt
- ./tests/scripts/vagrant_clean.sh
image: $PIPELINE_IMAGE
needs:
- pipeline-image
script:
- ./tests/scripts/molecule_run.sh
- ./tests/scripts/molecule_run.sh
after_script:
- chronic ./tests/scripts/molecule_logs.sh
- rm -fr molecule_logs
- mkdir -p molecule_logs
- find ~/.cache/molecule/ \( -name '*.out' -o -name '*.err' \) -type f | xargs tar -uf molecule_logs/molecule.tar
- gzip molecule_logs/molecule.tar
artifacts:
when: always
paths:
- molecule_logs/
- molecule_logs/
# CI template for periodic CI jobs
# Enabled when PERIODIC_CI_ENABLED var is set
.molecule_periodic:
only:
variables:
- $PERIODIC_CI_ENABLED
allow_failure: true
molecule:
extends: .molecule
script:
- ./tests/scripts/molecule_run.sh -i $ROLE
parallel:
matrix:
- ROLE:
- container-engine/cri-dockerd
- container-engine/containerd
- container-engine/cri-o
- container-engine/gvisor
- container-engine/youki
- adduser
- bastion-ssh-config
- bootstrap_os
molecule_full:
extends: .molecule_periodic
molecule_no_container_engines:
extends: .molecule
script:
- ./tests/scripts/molecule_run.sh -e container-engine
when: on_success
molecule_docker:
extends: .molecule
script:
- ./tests/scripts/molecule_run.sh -i container-engine/cri-dockerd
when: on_success
molecule_containerd:
extends: .molecule
script:
- ./tests/scripts/molecule_run.sh -i container-engine/containerd
when: on_success
molecule_cri-o:
extends: .molecule
stage: deploy-part2
script:
- ./tests/scripts/molecule_run.sh -i container-engine/cri-o
when: on_success
# Stage 3 container engines don't get as much attention so allow them to fail
molecule_kata:
extends: .molecule
stage: deploy-part3
allow_failure: true
script:
- ./tests/scripts/molecule_run.sh -i container-engine/kata-containers
when: on_success
molecule_gvisor:
extends: .molecule
stage: deploy-part3
allow_failure: true
script:
- ./tests/scripts/molecule_run.sh -i container-engine/gvisor
when: on_success
molecule_youki:
extends: .molecule
stage: deploy-part3
allow_failure: true
script:
- ./tests/scripts/molecule_run.sh -i container-engine/youki
when: on_success
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PIPELINE_SCHEDULE_DESCRIPTION == "daily-ci"
when: on_success
- when: manual
allow_failure: true
extends: molecule
parallel:
matrix:
- ROLE:
# FIXME : tests below are perma-failing
- container-engine/kata-containers

View File

@@ -1,325 +0,0 @@
---
.packet:
extends: .testcases
variables:
ANSIBLE_TIMEOUT: "120"
CI_PLATFORM: packet
SSH_USER: kubespray
tags:
- packet
except: [triggers]
# CI template for PRs
.packet_pr:
only: [/^pr-.*$/]
extends: .packet
# CI template for periodic CI jobs
# Enabled when PERIODIC_CI_ENABLED var is set
.packet_periodic:
only:
variables:
- $PERIODIC_CI_ENABLED
allow_failure: true
extends: .packet
# The ubuntu20-calico-aio jobs are meant as early stages to prevent running the full CI if something is horribly broken
packet_ubuntu20-calico-aio:
stage: deploy-part1
extends: .packet_pr
when: on_success
variables:
RESET_CHECK: "true"
packet_ubuntu20-calico-aio-ansible-2_11:
stage: deploy-part1
extends: .packet_periodic
when: on_success
variables:
ANSIBLE_MAJOR_VERSION: "2.11"
RESET_CHECK: "true"
# ### PR JOBS PART2
packet_ubuntu18-aio-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_ubuntu20-aio-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_ubuntu20-calico-aio-hardening:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_ubuntu18-calico-aio:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_ubuntu22-aio-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_ubuntu22-calico-aio:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_centos7-flannel-addons-ha:
extends: .packet_pr
stage: deploy-part2
when: on_success
packet_almalinux8-crio:
extends: .packet_pr
stage: deploy-part2
when: on_success
packet_ubuntu18-crio:
extends: .packet_pr
stage: deploy-part2
when: manual
packet_fedora35-crio:
extends: .packet_pr
stage: deploy-part2
when: manual
packet_ubuntu16-flannel-ha:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_debian10-cilium-svc-proxy:
stage: deploy-part2
extends: .packet_periodic
when: on_success
packet_debian10-calico:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_debian10-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_debian11-calico:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_debian11-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_centos7-calico-ha-once-localhost:
stage: deploy-part2
extends: .packet_pr
when: on_success
variables:
# This will instruct Docker not to start over TLS.
DOCKER_TLS_CERTDIR: ""
services:
- docker:19.03.9-dind
packet_almalinux8-kube-ovn:
stage: deploy-part2
extends: .packet_periodic
when: on_success
packet_almalinux8-calico:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_rockylinux8-calico:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_rockylinux9-calico:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_rockylinux9-cilium:
stage: deploy-part2
extends: .packet_pr
when: on_success
variables:
RESET_CHECK: "true"
packet_almalinux8-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_fedora36-docker-weave:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_opensuse-docker-cilium:
stage: deploy-part2
extends: .packet_pr
when: manual
# ### MANUAL JOBS
packet_ubuntu16-docker-weave-sep:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_ubuntu18-cilium-sep:
stage: deploy-special
extends: .packet_pr
when: manual
packet_ubuntu18-flannel-ha:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_ubuntu18-flannel-ha-once:
stage: deploy-part2
extends: .packet_pr
when: manual
# Calico HA eBPF
packet_almalinux8-calico-ha-ebpf:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_debian10-macvlan:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_centos7-calico-ha:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_centos7-multus-calico:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_fedora36-docker-calico:
stage: deploy-part2
extends: .packet_periodic
when: on_success
variables:
RESET_CHECK: "true"
packet_fedora35-calico-selinux:
stage: deploy-part2
extends: .packet_periodic
when: on_success
packet_fedora35-calico-swap-selinux:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_amazon-linux-2-aio:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_almalinux8-calico-nodelocaldns-secondary:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_fedora36-kube-ovn:
stage: deploy-part2
extends: .packet_periodic
when: on_success
packet_debian11-custom-cni:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_debian11-kubelet-csr-approver:
stage: deploy-part2
extends: .packet_pr
when: manual
# ### PR JOBS PART3
# Long jobs (45min+)
packet_centos7-weave-upgrade-ha:
stage: deploy-part3
extends: .packet_periodic
when: on_success
variables:
UPGRADE_TEST: basic
packet_ubuntu20-calico-etcd-kubeadm-upgrade-ha:
stage: deploy-part3
extends: .packet_periodic
when: on_success
variables:
UPGRADE_TEST: basic
# Calico HA Wireguard
packet_ubuntu20-calico-ha-wireguard:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_debian11-calico-upgrade:
stage: deploy-part3
extends: .packet_pr
when: on_success
variables:
UPGRADE_TEST: graceful
packet_almalinux8-calico-remove-node:
stage: deploy-part3
extends: .packet_pr
when: on_success
variables:
REMOVE_NODE_CHECK: "true"
REMOVE_NODE_NAME: "instance-3"
packet_ubuntu20-calico-etcd-kubeadm:
stage: deploy-part3
extends: .packet_pr
when: on_success
packet_debian11-calico-upgrade-once:
stage: deploy-part3
extends: .packet_periodic
when: on_success
variables:
UPGRADE_TEST: graceful
packet_ubuntu18-calico-ha-recover:
stage: deploy-part3
extends: .packet_periodic
when: on_success
variables:
RECOVER_CONTROL_PLANE_TEST: "true"
RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:],kube_control_plane[1:]"
packet_ubuntu18-calico-ha-recover-noquorum:
stage: deploy-part3
extends: .packet_periodic
when: on_success
variables:
RECOVER_CONTROL_PLANE_TEST: "true"
RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[1:],kube_control_plane[1:]"

View File

@@ -1,16 +0,0 @@
---
shellcheck:
extends: .job
stage: unit-tests
tags: [light]
variables:
SHELLCHECK_VERSION: v0.7.1
before_script:
- ./tests/scripts/rebase.sh
- curl --silent --location "https://github.com/koalaman/shellcheck/releases/download/"${SHELLCHECK_VERSION}"/shellcheck-"${SHELLCHECK_VERSION}".linux.x86_64.tar.xz" | tar -xJv
- cp shellcheck-"${SHELLCHECK_VERSION}"/shellcheck /usr/bin/
- shellcheck --version
script:
# Run shellcheck for all *.sh
- find . -name '*.sh' -not -path './.git/*' | xargs shellcheck --severity error
except: ['triggers', 'master']

View File

@@ -2,142 +2,67 @@
# Tests for contrib/terraform/
.terraform_install:
extends: .job
needs:
- pipeline-image
variables:
TF_VAR_public_key_path: "${ANSIBLE_PRIVATE_KEY_FILE}.pub"
TF_VAR_ssh_private_key_path: $ANSIBLE_PRIVATE_KEY_FILE
CLUSTER: $CI_COMMIT_REF_NAME
TERRAFORM_STATE_ROOT: $CI_PROJECT_DIR
stage: deploy-part1
before_script:
- update-alternatives --install /usr/bin/python python /usr/bin/python3 1
- ./tests/scripts/rebase.sh
- ./tests/scripts/testcases_prepare.sh
- ./tests/scripts/terraform_install.sh
# Set Ansible config
- cp ansible.cfg ~/.ansible.cfg
# Prepare inventory
- mkdir -p cluster-dump $ANSIBLE_INVENTORY
- ./tests/scripts/opentofu_install.sh
- cp contrib/terraform/$PROVIDER/sample-inventory/cluster.tfvars .
- ln -s contrib/terraform/$PROVIDER/hosts
- terraform -chdir="contrib/terraform/$PROVIDER" init
# Copy SSH keypair
- mkdir -p ~/.ssh
- echo "$PACKET_PRIVATE_KEY" | base64 -d > ~/.ssh/id_rsa
- chmod 400 ~/.ssh/id_rsa
- echo "$PACKET_PUBLIC_KEY" | base64 -d > ~/.ssh/id_rsa.pub
- mkdir -p contrib/terraform/$PROVIDER/group_vars
# Random subnet to avoid routing conflicts
- export TF_VAR_subnet_cidr="10.$(( $RANDOM % 256 )).$(( $RANDOM % 256 )).0/24"
- ln -rs -t $ANSIBLE_INVENTORY contrib/terraform/$PROVIDER/hosts
- tofu -chdir="contrib/terraform/$PROVIDER" init
.terraform_validate:
terraform_validate:
extends: .terraform_install
stage: unit-tests
tags: [light]
tags: [ffci]
only: ['master', /^pr-.*$/]
script:
- terraform -chdir="contrib/terraform/$PROVIDER" validate
- terraform -chdir="contrib/terraform/$PROVIDER" fmt -check -diff
- tofu -chdir="contrib/terraform/$PROVIDER" validate
- tofu -chdir="contrib/terraform/$PROVIDER" fmt -check -diff
stage: test
needs:
- pipeline-image
parallel:
matrix:
- PROVIDER:
- openstack
- aws
- exoscale
- hetzner
- vsphere
- upcloud
- nifcloud
.terraform_apply:
extends: .terraform_install
tags: [light]
stage: deploy-part3
tags: [ffci]
stage: deploy-extended
when: manual
only: [/^pr-.*$/]
artifacts:
when: always
paths:
- cluster-dump/
variables:
ANSIBLE_INVENTORY_UNPARSED_FAILED: "true"
ANSIBLE_INVENTORY: hosts
CI_PLATFORM: tf
TF_VAR_ssh_user: $SSH_USER
ANSIBLE_REMOTE_USER: ubuntu # the openstack terraform module does not handle custom user correctly
ANSIBLE_SSH_RETRIES: 15
TF_VAR_ssh_user: $ANSIBLE_REMOTE_USER
TF_VAR_cluster_name: $CI_JOB_ID
script:
# Set Ansible config
- cp ansible.cfg ~/.ansible.cfg
- ssh-keygen -N '' -f $ANSIBLE_PRIVATE_KEY_FILE -t rsa
- mkdir -p contrib/terraform/$PROVIDER/group_vars
# Random subnet to avoid routing conflicts
- export TF_VAR_subnet_cidr="10.$(( $RANDOM % 256 )).$(( $RANDOM % 256 )).0/24"
- tofu -chdir="contrib/terraform/$PROVIDER" apply -auto-approve -parallelism=1
- tests/scripts/testcases_run.sh
after_script:
# Cleanup regardless of exit code
- chronic ./tests/scripts/testcases_cleanup.sh
tf-validate-openstack:
extends: .terraform_validate
variables:
TF_VERSION: $TERRAFORM_VERSION
PROVIDER: openstack
CLUSTER: $CI_COMMIT_REF_NAME
tf-validate-equinix:
extends: .terraform_validate
variables:
TF_VERSION: $TERRAFORM_VERSION
PROVIDER: equinix
CLUSTER: $CI_COMMIT_REF_NAME
tf-validate-aws:
extends: .terraform_validate
variables:
TF_VERSION: $TERRAFORM_VERSION
PROVIDER: aws
CLUSTER: $CI_COMMIT_REF_NAME
tf-validate-exoscale:
extends: .terraform_validate
variables:
TF_VERSION: $TERRAFORM_VERSION
PROVIDER: exoscale
tf-validate-hetzner:
extends: .terraform_validate
variables:
TF_VERSION: $TERRAFORM_VERSION
PROVIDER: hetzner
tf-validate-vsphere:
extends: .terraform_validate
variables:
TF_VERSION: $TERRAFORM_VERSION
PROVIDER: vsphere
CLUSTER: $CI_COMMIT_REF_NAME
tf-validate-upcloud:
extends: .terraform_validate
variables:
TF_VERSION: $TERRAFORM_VERSION
PROVIDER: upcloud
CLUSTER: $CI_COMMIT_REF_NAME
# tf-packet-ubuntu16-default:
# extends: .terraform_apply
# variables:
# TF_VERSION: $TERRAFORM_VERSION
# PROVIDER: packet
# CLUSTER: $CI_COMMIT_REF_NAME
# TF_VAR_number_of_k8s_masters: "1"
# TF_VAR_number_of_k8s_nodes: "1"
# TF_VAR_plan_k8s_masters: t1.small.x86
# TF_VAR_plan_k8s_nodes: t1.small.x86
# TF_VAR_metro: ny
# TF_VAR_public_key_path: ""
# TF_VAR_operating_system: ubuntu_16_04
#
# tf-packet-ubuntu18-default:
# extends: .terraform_apply
# variables:
# TF_VERSION: $TERRAFORM_VERSION
# PROVIDER: packet
# CLUSTER: $CI_COMMIT_REF_NAME
# TF_VAR_number_of_k8s_masters: "1"
# TF_VAR_number_of_k8s_nodes: "1"
# TF_VAR_plan_k8s_masters: t1.small.x86
# TF_VAR_plan_k8s_nodes: t1.small.x86
# TF_VAR_metro: am
# TF_VAR_public_key_path: ""
# TF_VAR_operating_system: ubuntu_18_04
.ovh_variables: &ovh_variables
OS_AUTH_URL: https://auth.cloud.ovh.net/v3
OS_PROJECT_ID: 8d3cd5d737d74227ace462dee0b903fe
OS_PROJECT_NAME: "9361447987648822"
OS_USER_DOMAIN_NAME: Default
OS_PROJECT_DOMAIN_ID: default
OS_USERNAME: 8XuhBMfkKVrk
OS_REGION_NAME: UK1
OS_INTERFACE: public
OS_IDENTITY_API_VERSION: "3"
- tofu -chdir="contrib/terraform/$PROVIDER" destroy -auto-approve
# Elastx is generously donating resources for Kubespray on Openstack CI
# Contacts: @gix @bl0m1
@@ -154,8 +79,7 @@ tf-validate-upcloud:
TF_VAR_router_id: "ab95917c-41fb-4881-b507-3a6dfe9403df"
tf-elastx_cleanup:
stage: unit-tests
tags: [light]
tags: [ffci]
image: python
variables:
<<: *elastx_variables
@@ -163,19 +87,17 @@ tf-elastx_cleanup:
- pip install -r scripts/openstack-cleanup/requirements.txt
script:
- ./scripts/openstack-cleanup/main.py
allow_failure: true
tf-elastx_ubuntu18-calico:
tf-elastx_ubuntu20-calico:
extends: .terraform_apply
stage: deploy-part3
stage: deploy-part1
when: on_success
allow_failure: true
variables:
<<: *elastx_variables
TF_VERSION: $TERRAFORM_VERSION
PROVIDER: openstack
CLUSTER: $CI_COMMIT_REF_NAME
ANSIBLE_TIMEOUT: "60"
SSH_USER: ubuntu
TF_VAR_number_of_k8s_masters: "1"
TF_VAR_number_of_k8s_masters_no_floating_ip: "0"
TF_VAR_number_of_k8s_masters_no_floating_ip_no_etcd: "0"
@@ -194,48 +116,5 @@ tf-elastx_ubuntu18-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-18.04-server-latest
TF_VAR_image: ubuntu-20.04-server-latest
TF_VAR_k8s_allowed_remote_ips: '["0.0.0.0/0"]'
# OVH voucher expired, commenting job until things are sorted out
# tf-ovh_cleanup:
# stage: unit-tests
# tags: [light]
# image: python
# environment: ovh
# variables:
# <<: *ovh_variables
# before_script:
# - pip install -r scripts/openstack-cleanup/requirements.txt
# script:
# - ./scripts/openstack-cleanup/main.py
# tf-ovh_ubuntu18-calico:
# extends: .terraform_apply
# when: on_success
# environment: ovh
# variables:
# <<: *ovh_variables
# TF_VERSION: $TERRAFORM_VERSION
# PROVIDER: openstack
# CLUSTER: $CI_COMMIT_REF_NAME
# ANSIBLE_TIMEOUT: "60"
# SSH_USER: ubuntu
# TF_VAR_number_of_k8s_masters: "0"
# TF_VAR_number_of_k8s_masters_no_floating_ip: "1"
# TF_VAR_number_of_k8s_masters_no_floating_ip_no_etcd: "0"
# TF_VAR_number_of_etcd: "0"
# TF_VAR_number_of_k8s_nodes: "0"
# TF_VAR_number_of_k8s_nodes_no_floating_ip: "1"
# TF_VAR_number_of_gfs_nodes_no_floating_ip: "0"
# TF_VAR_number_of_bastions: "0"
# TF_VAR_number_of_k8s_masters_no_etcd: "0"
# TF_VAR_use_neutron: "0"
# TF_VAR_floatingip_pool: "Ext-Net"
# TF_VAR_external_net: "6011fbc9-4cbf-46a4-8452-6890a340b60b"
# TF_VAR_network_name: "Ext-Net"
# TF_VAR_flavor_k8s_master: "defa64c3-bd46-43b4-858a-d93bbae0a229" # s1-8
# TF_VAR_flavor_k8s_node: "defa64c3-bd46-43b4-858a-d93bbae0a229" # s1-8
# TF_VAR_image: "Ubuntu 18.04"
# TF_VAR_k8s_allowed_remote_ips: '["0.0.0.0/0"]'

View File

@@ -1,72 +1,49 @@
---
.vagrant:
extends: .testcases
vagrant:
extends: .job-moderated
variables:
CI_PLATFORM: "vagrant"
SSH_USER: "vagrant"
VAGRANT_DEFAULT_PROVIDER: "libvirt"
KUBESPRAY_VAGRANT_CONFIG: tests/files/${CI_JOB_NAME}.rb
tags: [c3.small.x86]
only: [/^pr-.*$/]
except: ['triggers']
image: $PIPELINE_IMAGE
KUBESPRAY_VAGRANT_CONFIG: tests/files/${TESTCASE}.rb
DOCKER_NAME: vagrant
VAGRANT_ANSIBLE_TAGS: facts
VAGRANT_HOME: "$CI_PROJECT_DIR/.vagrant.d"
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
tags: [ffci-vm-large]
image: quay.io/kubespray/vm-kubespray-ci:v13
services: []
before_script:
- apt-get update && apt-get install -y python3-pip
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10
- python -m pip uninstall -y ansible ansible-base ansible-core
- python -m pip install -r tests/requirements.txt
- echo $USER
- python3 -m venv citest
- source citest/bin/activate
- vagrant plugin expunge --reinstall --force --no-tty
- vagrant plugin install vagrant-libvirt
- pip install --no-compile --no-cache-dir pip -U
- pip install --no-compile --no-cache-dir -r $CI_PROJECT_DIR/requirements.txt
- pip install --no-compile --no-cache-dir -r $CI_PROJECT_DIR/tests/requirements.txt
- ./tests/scripts/vagrant_clean.sh
script:
- vagrant up
- ./tests/scripts/testcases_run.sh
after_script:
- chronic ./tests/scripts/testcases_cleanup.sh
allow_failure: true
vagrant_ubuntu18-calico-dual-stack:
stage: deploy-part2
extends: .vagrant
when: on_success
vagrant_ubuntu18-flannel:
stage: deploy-part2
extends: .vagrant
when: on_success
vagrant_ubuntu18-weave-medium:
stage: deploy-part2
extends: .vagrant
when: manual
vagrant_ubuntu20-flannel:
stage: deploy-part2
extends: .vagrant
when: on_success
allow_failure: false
vagrant_ubuntu20-flannel-collection:
stage: deploy-part2
extends: .vagrant
when: on_success
vagrant_ubuntu16-kube-router-sep:
stage: deploy-part2
extends: .vagrant
when: manual
# Service proxy test fails connectivity testing
vagrant_ubuntu16-kube-router-svc-proxy:
stage: deploy-part2
extends: .vagrant
when: manual
vagrant_fedora35-kube-router:
stage: deploy-part2
extends: .vagrant
when: on_success
vagrant_centos7-kube-router:
stage: deploy-part2
extends: .vagrant
when: manual
- vagrant destroy -f
cache:
key: $CI_JOB_NAME_SLUG
paths:
- .vagrant.d/boxes
- .cache/pip
policy: pull-push # TODO: change to "pull" when not on main
stage: deploy-extended
rules:
- if: $PR_LABELS =~ /.*(ci-extended|ci-full).*/
when: on_success
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PIPELINE_SCHEDULE_DESCRIPTION == "daily-ci"
when: on_success
- when: manual
allow_failure: true
parallel:
matrix:
- TESTCASE:
- ubuntu24-calico-dual-stack
- ubuntu24-calico-ipv6only-stack

View File

@@ -1,3 +0,0 @@
---
MD013: false
MD029: false

4
.md_style.rb Normal file
View File

@@ -0,0 +1,4 @@
all
exclude_rule 'MD013'
exclude_rule 'MD029'
rule 'MD007', :indent => 2

1
.mdlrc Normal file
View File

@@ -0,0 +1 @@
style "#{File.dirname(__FILE__)}/.md_style.rb"

View File

@@ -1,8 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
@@ -16,56 +15,96 @@ repos:
- id: trailing-whitespace
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.27.1
rev: v1.37.1
hooks:
- id: yamllint
args: [--strict]
- repo: https://github.com/markdownlint/markdownlint
rev: v0.11.0
hooks:
- id: markdownlint
args: [ -r, "~MD013,~MD029" ]
exclude: "^.git"
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
args: [ --severity, "error" ]
args: ["--severity=error"]
exclude: "^.git"
files: "\\.sh$"
- repo: local
- repo: https://github.com/ansible/ansible-lint
rev: v25.11.0
hooks:
- id: ansible-lint
name: ansible-lint
entry: ansible-lint -v
language: python
pass_filenames: false
additional_dependencies:
- .[community]
- jmespath==1.0.1
- netaddr==1.3.0
- distlib
- id: ansible-syntax-check
name: ansible-syntax-check
entry: env ANSIBLE_INVENTORY=inventory/local-tests.cfg ANSIBLE_REMOTE_USER=root ANSIBLE_BECOME="true" ANSIBLE_BECOME_USER=root ANSIBLE_VERBOSITY="3" ansible-playbook --syntax-check
language: python
files: "^cluster.yml|^upgrade-cluster.yml|^reset.yml|^extra_playbooks/upgrade-only-k8s.yml"
- repo: https://github.com/golangci/misspell
rev: v0.7.0
hooks:
- id: misspell
exclude: "OWNERS_ALIASES$"
- id: tox-inventory-builder
name: tox-inventory-builder
entry: bash -c "cd contrib/inventory_builder && tox"
- repo: local
hooks:
- id: collection-build-install
name: Build and install kubernetes-sigs.kubespray Ansible collection
language: python
additional_dependencies:
- ansible-core>=2.16.4
- distlib
entry: tests/scripts/collection-build-install.sh
pass_filenames: false
- id: check-readme-versions
name: check-readme-versions
entry: tests/scripts/check_readme_versions.sh
- id: generate-docs-sidebar
name: generate-docs-sidebar
entry: scripts/gen_docs_sidebar.sh
language: script
pass_filenames: false
- id: ci-matrix
name: ci-matrix
entry: tests/scripts/md-table/test.sh
language: script
entry: tests/scripts/md-table/main.py
language: python
pass_filenames: false
additional_dependencies:
- jinja2
- pathlib
- pyaml
- id: check-galaxy-version
name: Verify correct version for galaxy.yml
entry: scripts/galaxy_version.py
language: python
pass_filenames: false
additional_dependencies:
- ruamel.yaml
- id: jinja-syntax-check
name: jinja-syntax-check
entry: tests/scripts/check-templates.py
language: python
types:
- jinja
additional_dependencies:
- jinja2
- id: propagate-ansible-variables
name: Update static files referencing default kubespray values
language: python
additional_dependencies:
- ansible-core>=2.16.4
entry: scripts/propagate_ansible_variables.yml
pass_filenames: false
- id: check-checksums-sorted
name: Check that our checksums are correctly sorted by version
entry: scripts/assert-sorted-checksums.yml
language: python
pass_filenames: false
additional_dependencies:
- ansible
- repo: https://github.com/markdownlint/markdownlint
rev: v0.12.0
hooks:
- id: markdownlint
exclude: "^.github|(^docs/_sidebar\\.md$)"

View File

@@ -3,9 +3,10 @@ extends: default
ignore: |
.git/
.github/
# Generated file
tests/files/custom_cni/cilium.yaml
# https://ansible.readthedocs.io/projects/lint/rules/yaml/
rules:
braces:
min-spaces-inside: 0
@@ -13,9 +14,15 @@ rules:
brackets:
min-spaces-inside: 0
max-spaces-inside: 1
comments:
min-spaces-from-content: 1
# https://github.com/adrienverge/yamllint/issues/384
comments-indentation: false
indentation:
spaces: 2
indent-sequences: consistent
line-length: disable
new-line-at-end-of-file: disable
truthy: disable
octal-values:
forbid-implicit-octal: true # yamllint defaults to false
forbid-explicit-octal: true # yamllint defaults to false

1
CHANGELOG.md Normal file
View File

@@ -0,0 +1 @@
# See our release notes on [GitHub](https://github.com/kubernetes-sigs/kubespray/releases)

View File

@@ -12,6 +12,7 @@ To install development dependencies you can set up a python virtual env with the
virtualenv venv
source venv/bin/activate
pip install -r tests/requirements.txt
ansible-galaxy install -r tests/requirements.yml
```
#### Linting
@@ -39,7 +40,7 @@ Vagrant with VirtualBox or libvirt driver helps you to quickly spin test cluster
2. The [repo owners](OWNERS) will respond to your issue promptly.
3. Fork the desired repo, develop and test your code changes.
4. Install [pre-commit](https://pre-commit.com) and install it in your development repo.
5. Addess any pre-commit validation failures.
5. Address any pre-commit validation failures.
6. Sign the CNCF CLA (<https://git.k8s.io/community/CLA.md#the-contributor-license-agreement>)
7. Submit a pull request.
8. Work with the reviewers on their suggestions.

View File

@@ -1,41 +1,50 @@
# Use imutable image tags rather than mutable tags (like ubuntu:22.04)
FROM ubuntu:jammy-20230308
# syntax=docker/dockerfile:1
# Use immutable image tags rather than mutable tags (like ubuntu:22.04)
FROM ubuntu:22.04@sha256:149d67e29f765f4db62aa52161009e99e389544e25a8f43c8c89d4a445a7ca37
# Some tools like yamllint need this
# Pip needs this as well at the moment to install ansible
# (and potentially other packages)
# (and potentially other packages)
# See: https://github.com/pypa/pip/issues/10219
ENV LANG=C.UTF-8 \
DEBIAN_FRONTEND=noninteractive \
PYTHONDONTWRITEBYTECODE=1
WORKDIR /kubespray
COPY *yml .
# hadolint ignore=DL3008
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get update -q \
&& apt-get install -yq --no-install-recommends \
curl \
python3 \
python3-pip \
sshpass \
vim \
rsync \
openssh-client \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/log/*
RUN --mount=type=bind,source=requirements.txt,target=requirements.txt \
--mount=type=cache,sharing=locked,id=pipcache,mode=0777,target=/root/.cache/pip \
pip install --no-compile --no-cache-dir -r requirements.txt \
&& find /usr -type d -name '*__pycache__' -prune -exec rm -rf {} \;
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN OS_ARCHITECTURE=$(dpkg --print-architecture) \
&& curl -L "https://dl.k8s.io/release/v1.34.2/bin/linux/${OS_ARCHITECTURE}/kubectl" -o /usr/local/bin/kubectl \
&& echo "$(curl -L "https://dl.k8s.io/release/v1.34.2/bin/linux/${OS_ARCHITECTURE}/kubectl.sha256")" /usr/local/bin/kubectl | sha256sum --check \
&& chmod a+x /usr/local/bin/kubectl
COPY *.yml ./
COPY *.cfg ./
COPY roles ./roles
COPY contrib ./contrib
COPY inventory ./inventory
COPY library ./library
COPY extra_playbooks ./extra_playbooks
RUN apt update -q \
&& apt install -yq --no-install-recommends \
curl \
python3 \
python3-pip \
sshpass \
vim \
rsync \
openssh-client \
&& pip install --no-compile --no-cache-dir \
ansible==5.7.1 \
ansible-core==2.12.5 \
cryptography==3.4.8 \
jinja2==3.1.2 \
netaddr==0.8.0 \
jmespath==1.0.1 \
MarkupSafe==2.1.2 \
ruamel.yaml==0.17.21 \
&& KUBE_VERSION=$(sed -n 's/^kube_version: //p' roles/kubespray-defaults/defaults/main.yaml) \
&& curl -L https://dl.k8s.io/release/$KUBE_VERSION/bin/linux/$(dpkg --print-architecture)/kubectl -o /usr/local/bin/kubectl \
&& echo $(curl -L https://dl.k8s.io/release/$KUBE_VERSION/bin/linux/$(dpkg --print-architecture)/kubectl.sha256) /usr/local/bin/kubectl | sha256sum --check \
&& chmod a+x /usr/local/bin/kubectl \
&& rm -rf /var/lib/apt/lists/* /var/log/* \
&& find / -type d -name '*__pycache__' -prune -exec rm -rf {} \;
COPY playbooks ./playbooks
COPY plugins ./plugins

View File

@@ -1,7 +0,0 @@
mitogen:
@echo Mitogen support is deprecated.
@echo Please run the following command manually:
@echo ansible-playbook -c local mitogen.yml -vv
clean:
rm -rf dist/
rm *.retry

View File

@@ -1,30 +1,26 @@
aliases:
kubespray-approvers:
- mattymo
- chadswen
- mirwan
- miouge1
- luckysb
- floryut
- oomichi
- cristicalin
- liupeng0518
- yankay
- mzaian
kubespray-reviewers:
- holmsten
- bozzo
- eppo
- oomichi
- jayonlau
- cristicalin
- liupeng0518
- yankay
- cyclinder
- mzaian
- mrfreezeex
kubespray-emeritus_approvers:
- riverzhang
- atoms
- ant31
- mzaian
- tico88612
- vannten
- yankay
kubespray-reviewers:
- cyclinder
- erikjiang
- mzaian
- tico88612
- vannten
- yankay
kubespray-emeritus_approvers:
- atoms
- chadswen
- cristicalin
- floryut
- liupeng0518
- luckysb
- mattymo
- miouge1
- oomichi
- riverzhang
- woopstar

253
README.md
View File

@@ -5,7 +5,7 @@
If you have questions, check the documentation at [kubespray.io](https://kubespray.io) and join us on the [kubernetes slack](https://kubernetes.slack.com), channel **\#kubespray**.
You can get your invite [here](http://slack.k8s.io/)
- Can be deployed on **[AWS](docs/aws.md), GCE, [Azure](docs/azure.md), [OpenStack](docs/openstack.md), [vSphere](docs/vsphere.md), [Equinix Metal](docs/equinix-metal.md) (bare metal), Oracle Cloud Infrastructure (Experimental), or Baremetal**
- Can be deployed on **[AWS](docs/cloud_providers/aws.md), GCE, [Azure](docs/cloud_providers/azure.md), [OpenStack](docs/cloud_controllers/openstack.md), [vSphere](docs/cloud_controllers/vsphere.md), [Equinix Metal](docs/cloud_providers/equinix-metal.md) (bare metal), Oracle Cloud Infrastructure (Experimental), or Baremetal**
- **Highly available** cluster
- **Composable** (Choice of the network plugin for instance)
- Supports most popular **Linux distributions**
@@ -15,78 +15,27 @@ You can get your invite [here](http://slack.k8s.io/)
Below are several ways to use Kubespray to deploy a Kubernetes cluster.
### Ansible
### Docker
#### Usage
Install Ansible according to [Ansible installation guide](/docs/ansible.md#installing-ansible)
then run the following steps:
Ensure you have installed Docker then
```ShellSession
# Copy ``inventory/sample`` as ``inventory/mycluster``
cp -rfp inventory/sample inventory/mycluster
# Update Ansible inventory file with inventory builder
declare -a IPS=(10.10.1.3 10.10.1.4 10.10.1.5)
CONFIG_FILE=inventory/mycluster/hosts.yaml python3 contrib/inventory_builder/inventory.py ${IPS[@]}
# Review and change parameters under ``inventory/mycluster/group_vars``
cat inventory/mycluster/group_vars/all/all.yml
cat inventory/mycluster/group_vars/k8s_cluster/k8s-cluster.yml
# Clean up old Kubernete cluster with Ansible Playbook - run the playbook as root
# The option `--become` is required, as for example cleaning up SSL keys in /etc/,
# uninstalling old packages and interacting with various systemd daemons.
# Without --become the playbook will fail to run!
# And be mind it will remove the current kubernetes cluster (if it's running)!
ansible-playbook -i inventory/mycluster/hosts.yaml --become --become-user=root reset.yml
# Deploy Kubespray with Ansible Playbook - run the playbook as root
# The option `--become` is required, as for example writing SSL keys in /etc/,
# installing packages and interacting with various systemd daemons.
# Without --become the playbook will fail to run!
ansible-playbook -i inventory/mycluster/hosts.yaml --become --become-user=root cluster.yml
```
Note: When Ansible is already installed via system packages on the control node,
Python packages installed via `sudo pip install -r requirements.txt` will go to
a different directory tree (e.g. `/usr/local/lib/python2.7/dist-packages` on
Ubuntu) from Ansible's (e.g. `/usr/lib/python2.7/dist-packages/ansible` still on
Ubuntu). As a consequence, the `ansible-playbook` command will fail with:
```raw
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
```
This likely indicates that a task depends on a module present in ``requirements.txt``.
One way of addressing this is to uninstall the system Ansible package then
reinstall Ansible via ``pip``, but this not always possible and one must
take care regarding package versions.
A workaround consists of setting the `ANSIBLE_LIBRARY`
and `ANSIBLE_MODULE_UTILS` environment variables respectively to
the `ansible/modules` and `ansible/module_utils` subdirectories of the ``pip``
installation location, which is the ``Location`` shown by running
`pip show [package]` before executing `ansible-playbook`.
A simple way to ensure you get all the correct version of Ansible is to use
the [pre-built docker image from Quay](https://quay.io/repository/kubespray/kubespray?tab=tags).
You will then need to use [bind mounts](https://docs.docker.com/storage/bind-mounts/)
to access the inventory and SSH key in the container, like this:
```ShellSession
git checkout v2.21.0
docker pull quay.io/kubespray/kubespray:v2.21.0
docker run --rm -it --mount type=bind,source="$(pwd)"/inventory/sample,dst=/inventory \
--mount type=bind,source="${HOME}"/.ssh/id_rsa,dst=/root/.ssh/id_rsa \
quay.io/kubespray/kubespray:v2.21.0 bash
quay.io/kubespray/kubespray:v2.29.0 bash
# Inside the container you may now run the kubespray playbooks:
ansible-playbook -i /inventory/inventory.ini --private-key /root/.ssh/id_rsa cluster.yml
```
### Ansible
#### Usage
See [Getting started](/docs/getting_started/getting-started.md)
#### Collection
See [here](docs/ansible_collection.md) if you wish to use this repository as an Ansible collection
See [here](docs/ansible/ansible_collection.md) if you wish to use this repository as an Ansible collection
### Vagrant
@@ -99,7 +48,7 @@ python -V && pip -V
If this returns the version of the software, you're good to go. If not, download and install Python from here <https://www.python.org/downloads/source/>
Install Ansible according to [Ansible installation guide](/docs/ansible.md#installing-ansible)
Install Ansible according to [Ansible installation guide](/docs/ansible/ansible.md#installing-ansible)
then run the following step:
```ShellSession
@@ -109,102 +58,101 @@ vagrant up
## Documents
- [Requirements](#requirements)
- [Kubespray vs ...](docs/comparisons.md)
- [Getting started](docs/getting-started.md)
- [Setting up your first cluster](docs/setting-up-your-first-cluster.md)
- [Ansible inventory and tags](docs/ansible.md)
- [Integration with existing ansible repo](docs/integration.md)
- [Deployment data variables](docs/vars.md)
- [DNS stack](docs/dns-stack.md)
- [HA mode](docs/ha-mode.md)
- [Kubespray vs ...](docs/getting_started/comparisons.md)
- [Getting started](docs/getting_started/getting-started.md)
- [Setting up your first cluster](docs/getting_started/setting-up-your-first-cluster.md)
- [Ansible inventory and tags](docs/ansible/ansible.md)
- [Integration with existing ansible repo](docs/operations/integration.md)
- [Deployment data variables](docs/ansible/vars.md)
- [DNS stack](docs/advanced/dns-stack.md)
- [HA mode](docs/operations/ha-mode.md)
- [Network plugins](#network-plugins)
- [Vagrant install](docs/vagrant.md)
- [Flatcar Container Linux bootstrap](docs/flatcar.md)
- [Fedora CoreOS bootstrap](docs/fcos.md)
- [Debian Jessie setup](docs/debian.md)
- [openSUSE setup](docs/opensuse.md)
- [Downloaded artifacts](docs/downloads.md)
- [Cloud providers](docs/cloud.md)
- [OpenStack](docs/openstack.md)
- [AWS](docs/aws.md)
- [Azure](docs/azure.md)
- [vSphere](docs/vsphere.md)
- [Equinix Metal](docs/equinix-metal.md)
- [Large deployments](docs/large-deployments.md)
- [Adding/replacing a node](docs/nodes.md)
- [Upgrades basics](docs/upgrades.md)
- [Air-Gap installation](docs/offline-environment.md)
- [NTP](docs/ntp.md)
- [Hardening](docs/hardening.md)
- [Mirror](docs/mirror.md)
- [Roadmap](docs/roadmap.md)
- [Vagrant install](docs/developers/vagrant.md)
- [Flatcar Container Linux bootstrap](docs/operating_systems/flatcar.md)
- [Fedora CoreOS bootstrap](docs/operating_systems/fcos.md)
- [openSUSE setup](docs/operating_systems/opensuse.md)
- [Downloaded artifacts](docs/advanced/downloads.md)
- [Equinix Metal](docs/cloud_providers/equinix-metal.md)
- [OpenStack](docs/cloud_controllers/openstack.md)
- [vSphere](docs/cloud_controllers/vsphere.md)
- [Large deployments](docs/operations/large-deployments.md)
- [Adding/replacing a node](docs/operations/nodes.md)
- [Upgrades basics](docs/operations/upgrades.md)
- [Air-Gap installation](docs/operations/offline-environment.md)
- [NTP](docs/advanced/ntp.md)
- [Hardening](docs/operations/hardening.md)
- [Mirror](docs/operations/mirror.md)
- [Roadmap](docs/roadmap/roadmap.md)
## Supported Linux Distributions
- **Flatcar Container Linux by Kinvolk**
- **Debian** Bullseye, Buster
- **Ubuntu** 16.04, 18.04, 20.04, 22.04
- **CentOS/RHEL** 7, [8, 9](docs/centos.md#centos-8)
- **Fedora** 35, 36
- **Fedora CoreOS** (see [fcos Note](docs/fcos.md))
- **Debian** Bookworm, Bullseye, Trixie
- **Ubuntu** 22.04, 24.04
- **CentOS/RHEL** [8, 9](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** 7, [8, 9](docs/centos.md#centos-8)
- **Alma Linux** [8, 9](docs/centos.md#centos-8)
- **Rocky Linux** [8, 9](docs/centos.md#centos-8)
- **Kylin Linux Advanced Server V10** (experimental: see [kylin linux notes](docs/kylinlinux.md))
- **Amazon Linux 2** (experimental: see [amazon linux notes](docs/amazonlinux.md))
- **UOS Linux** (experimental: see [uos linux notes](docs/uoslinux.md))
- **openEuler** (experimental: see [openEuler notes](docs/openeuler.md))
- **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)
- **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))
- **openEuler** (experimental: see [openEuler notes](docs/operating_systems/openeuler.md))
Note: Upstart/SysV init based OS types are not supported.
Note:
- Upstart/SysV init based OS types are not supported.
- [Kernel requirements](docs/operations/kernel-requirements.md) (please read if the OS kernel version is < 4.19).
## Supported Components
<!-- BEGIN ANSIBLE MANAGED BLOCK -->
- Core
- [kubernetes](https://github.com/kubernetes/kubernetes) v1.26.5
- [etcd](https://github.com/etcd-io/etcd) v3.5.6
- [docker](https://www.docker.com/) v20.10 (see note)
- [containerd](https://containerd.io/) v1.7.1
- [cri-o](http://cri-o.io/) v1.24 (experimental: see [CRI-O Note](docs/cri-o.md). Only on fedora, ubuntu and centos based OS)
- [kubernetes](https://github.com/kubernetes/kubernetes) 1.34.2
- [etcd](https://github.com/etcd-io/etcd) 3.5.25
- [docker](https://www.docker.com/) 28.3
- [containerd](https://containerd.io/) 2.1.5
- [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) v1.2.0
- [calico](https://github.com/projectcalico/calico) v3.25.1
- [cilium](https://github.com/cilium/cilium) v1.13.0
- [flannel](https://github.com/flannel-io/flannel) v0.21.4
- [kube-ovn](https://github.com/alauda/kube-ovn) v1.10.7
- [kube-router](https://github.com/cloudnativelabs/kube-router) v1.5.1
- [multus](https://github.com/k8snetworkplumbingwg/multus-cni) v3.8
- [weave](https://github.com/weaveworks/weave) v2.8.1
- [kube-vip](https://github.com/kube-vip/kube-vip) v0.5.12
- [cni-plugins](https://github.com/containernetworking/plugins) 1.8.0
- [calico](https://github.com/projectcalico/calico) 3.30.5
- [cilium](https://github.com/cilium/cilium) 1.18.4
- [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
- Application
- [cert-manager](https://github.com/jetstack/cert-manager) v1.11.1
- [coredns](https://github.com/coredns/coredns) v1.9.3
- [ingress-nginx](https://github.com/kubernetes/ingress-nginx) v1.7.1
- [krew](https://github.com/kubernetes-sigs/krew) v0.4.3
- [argocd](https://argoproj.github.io/) v2.7.2
- [helm](https://helm.sh/) v3.12.0
- [metallb](https://metallb.universe.tf/) v0.13.9
- [registry](https://github.com/distribution/distribution) v2.8.1
- [cert-manager](https://github.com/jetstack/cert-manager) 1.15.3
- [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
- [metallb](https://metallb.universe.tf/) 0.13.9
- [registry](https://github.com/distribution/distribution) 2.8.1
- Storage Plugin
- [cephfs-provisioner](https://github.com/kubernetes-incubator/external-storage) v2.1.0-k8s1.11
- [rbd-provisioner](https://github.com/kubernetes-incubator/external-storage) v2.1.1-k8s1.11
- [aws-ebs-csi-plugin](https://github.com/kubernetes-sigs/aws-ebs-csi-driver) v0.5.0
- [azure-csi-plugin](https://github.com/kubernetes-sigs/azuredisk-csi-driver) v1.10.0
- [cinder-csi-plugin](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md) v1.22.0
- [gcp-pd-csi-plugin](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver) v1.4.0
- [local-path-provisioner](https://github.com/rancher/local-path-provisioner) v0.0.23
- [local-volume-provisioner](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner) v2.5.0
- [aws-ebs-csi-plugin](https://github.com/kubernetes-sigs/aws-ebs-csi-driver) 0.5.0
- [azure-csi-plugin](https://github.com/kubernetes-sigs/azuredisk-csi-driver) 1.10.0
- [cinder-csi-plugin](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md) 1.30.0
- [gcp-pd-csi-plugin](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver) 1.9.2
- [local-path-provisioner](https://github.com/rancher/local-path-provisioner) 0.0.32
- [local-volume-provisioner](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner) 2.5.0
- [node-feature-discovery](https://github.com/kubernetes-sigs/node-feature-discovery) 0.16.4
<!-- END ANSIBLE MANAGED BLOCK -->
## Container Runtime Notes
- Supported Docker versions are 18.09, 19.03 and 20.10. The *recommended* Docker version is 20.10. `Kubelet` might break on docker's non-standard version numbering (it no longer uses semantic versioning). To ensure auto-updates don't break your cluster look into e.g. the YUM ``versionlock`` plugin or ``apt pin``).
- The cri-o version should be aligned with the respective kubernetes version (i.e. kube_version=1.20.x, crio_version=1.20)
## Requirements
- **Minimum required version of Kubernetes is v1.24**
- **Ansible v2.11+, Jinja 2.11+ and python-netaddr is installed on the machine that will run Ansible commands**
- The target servers must have **access to the Internet** in order to pull docker images. Otherwise, additional configuration is required (See [Offline Environment](docs/offline-environment.md))
- **Minimum required version of Kubernetes is v1.30**
- **Ansible v2.14+, Jinja 2.11+ and python-netaddr is installed on the machine that will run Ansible commands**
- The target servers must have **access to the Internet** in order to pull docker images. Otherwise, additional configuration is required (See [Offline Environment](docs/operations/offline-environment.md))
- The target servers are configured to allow **IPv4 forwarding**.
- If using IPv6 for pods and services, the target servers are configured to allow **IPv6 forwarding**.
- The **firewalls are not managed**, you'll need to implement your own rules the way you used to.
@@ -216,50 +164,47 @@ Note: Upstart/SysV init based OS types are not supported.
Hardware:
These limits are safeguarded by Kubespray. Actual requirements for your workload can differ. For a sizing guide go to the [Building Large Clusters](https://kubernetes.io/docs/setup/cluster-large/#size-of-master-and-master-components) guide.
- Master
- Memory: 1500 MB
- Node
- Memory: 1024 MB
- Control Plane
- Memory: 2 GB
- Worker Node
- Memory: 1 GB
## Network Plugins
You can choose among ten network plugins. (default: `calico`, except Vagrant uses `flannel`)
- [flannel](docs/flannel.md): gre/vxlan (layer 2) networking.
- [flannel](docs/CNI/flannel.md): gre/vxlan (layer 2) networking.
- [Calico](https://docs.projectcalico.org/latest/introduction/) is a networking and network policy provider. Calico supports a flexible set of networking options
- [Calico](https://docs.tigera.io/calico/latest/about/) is a networking and network policy provider. Calico supports a flexible set of networking options
designed to give you the most efficient networking across a range of situations, including non-overlay
and overlay networks, with or without BGP. Calico uses the same engine to enforce network policy for hosts,
pods, and (if using Istio and Envoy) applications at the service mesh layer.
- [cilium](http://docs.cilium.io/en/latest/): layer 3/4 networking (as well as layer 7 to protect and secure application protocols), supports dynamic insertion of BPF bytecode into the Linux kernel to implement security services, networking and visibility logic.
- [weave](docs/weave.md): Weave is a lightweight container overlay network that doesn't require an external K/V database cluster.
(Please refer to `weave` [troubleshooting documentation](https://www.weave.works/docs/net/latest/troubleshooting/)).
- [kube-ovn](docs/CNI/kube-ovn.md): Kube-OVN integrates the OVN-based Network Virtualization with Kubernetes. It offers an advanced Container Network Fabric for Enterprises.
- [kube-ovn](docs/kube-ovn.md): Kube-OVN integrates the OVN-based Network Virtualization with Kubernetes. It offers an advanced Container Network Fabric for Enterprises.
- [kube-router](docs/kube-router.md): Kube-router is a L3 CNI for Kubernetes networking aiming to provide operational
- [kube-router](docs/CNI/kube-router.md): Kube-router is a L3 CNI for Kubernetes networking aiming to provide operational
simplicity and high performance: it uses IPVS to provide Kube Services Proxy (if setup to replace kube-proxy),
iptables for network policies, and BGP for ods L3 networking (with optionally BGP peering with out-of-cluster BGP peers).
It can also optionally advertise routes to Kubernetes cluster Pods CIDRs, ClusterIPs, ExternalIPs and LoadBalancerIPs.
- [macvlan](docs/macvlan.md): Macvlan is a Linux network driver. Pods have their own unique Mac and Ip address, connected directly the physical (layer 2) network.
- [macvlan](docs/CNI/macvlan.md): Macvlan is a Linux network driver. Pods have their own unique Mac and Ip address, connected directly the physical (layer 2) network.
- [multus](docs/multus.md): Multus is a meta CNI plugin that provides multiple network interface support to pods. For each interface Multus delegates CNI calls to secondary CNI plugins such as Calico, macvlan, etc.
- [multus](docs/CNI/multus.md): Multus is a meta CNI plugin that provides multiple network interface support to pods. For each interface Multus delegates CNI calls to secondary CNI plugins such as Calico, macvlan, etc.
- [custom_cni](roles/network-plugin/custom_cni/) : You can specify some manifests that will be applied to the clusters to bring you own CNI and use non-supported ones by Kubespray.
See `tests/files/custom_cni/README.md` and `tests/files/custom_cni/values.yaml`for an example with a CNI provided by a Helm Chart.
The network plugin to use is defined by the variable `kube_network_plugin`. There is also an
option to leverage built-in cloud provider networking instead.
See also [Network checker](docs/netcheck.md).
See also [Network checker](docs/advanced/netcheck.md).
## Ingress Plugins
- [nginx](https://kubernetes.github.io/ingress-nginx): the NGINX Ingress Controller.
- [metallb](docs/metallb.md): the MetalLB bare-metal service LoadBalancer provider.
- [metallb](docs/ingress/metallb.md): the MetalLB bare-metal service LoadBalancer provider.
## Community docs and resources
@@ -280,4 +225,4 @@ See also [Network checker](docs/netcheck.md).
CI/end-to-end tests sponsored by: [CNCF](https://cncf.io), [Equinix Metal](https://metal.equinix.com/), [OVHcloud](https://www.ovhcloud.com/), [ELASTX](https://elastx.se/).
See the [test matrix](docs/test_cases.md) for details.
See the [test matrix](docs/developers/test_cases.md) for details.

View File

@@ -3,17 +3,19 @@
The Kubespray Project is released on an as-needed basis. The process is as follows:
1. An issue is proposing a new release with a changelog since the last release. Please see [a good sample issue](https://github.com/kubernetes-sigs/kubespray/issues/8325)
2. At least one of the [approvers](OWNERS_ALIASES) must approve this release
3. The `kube_version_min_required` variable is set to `n-1`
4. Remove hashes for [EOL versions](https://github.com/kubernetes/website/blob/main/content/en/releases/patch-releases.md) of kubernetes from `*_checksums` variables.
5. Create the release note with [Kubernetes Release Notes Generator](https://github.com/kubernetes/release/blob/master/cmd/release-notes/README.md). See the following `Release note creation` section for the details.
6. An approver creates [new release in GitHub](https://github.com/kubernetes-sigs/kubespray/releases/new) using a version and tag name like `vX.Y.Z` and attaching the release notes
7. An approver creates a release branch in the form `release-X.Y`
8. The corresponding version of [quay.io/kubespray/kubespray:vX.Y.Z](https://quay.io/repository/kubespray/kubespray) and [quay.io/kubespray/vagrant:vX.Y.Z](https://quay.io/repository/kubespray/vagrant) container images are built and tagged. See the following `Container image creation` section for the details.
9. The `KUBESPRAY_VERSION` variable is updated in `.gitlab-ci.yml`
10. The release issue is closed
11. An announcement email is sent to `dev@kubernetes.io` with the subject `[ANNOUNCE] Kubespray $VERSION is released`
12. The topic of the #kubespray channel is updated with `vX.Y.Z is released! | ...`
1. At least one of the [approvers](OWNERS_ALIASES) must approve this release
1. (Only for major releases) The `kube_version_min_required` variable is set to `n-1`
1. (Only for major releases) Remove hashes for [EOL versions](https://github.com/kubernetes/website/blob/main/content/en/releases/patch-releases.md) of kubernetes from `*_checksums` variables.
1. Create the release note with [Kubernetes Release Notes Generator](https://github.com/kubernetes/release/blob/master/cmd/release-notes/README.md). See the following `Release note creation` section for the details.
1. An approver creates [new release in GitHub](https://github.com/kubernetes-sigs/kubespray/releases/new) using a version and tag name like `vX.Y.Z` and attaching the release notes
1. (Only for major releases) An approver creates a release branch in the form `release-X.Y`
1. (For major releases) On the `master` branch: bump the version in `galaxy.yml` to the next expected major release (X.y.0 with y = Y + 1), make a Pull Request.
1. (For minor releases) On the `release-X.Y` branch: bump the version in `galaxy.yml` to the next expected minor release (X.Y.z with z = Z + 1), make a Pull Request.
1. The corresponding version of [quay.io/kubespray/kubespray:vX.Y.Z](https://quay.io/repository/kubespray/kubespray) and [quay.io/kubespray/vagrant:vX.Y.Z](https://quay.io/repository/kubespray/vagrant) container images are built and tagged. See the following `Container image creation` section for the details.
1. The release issue is closed
1. An announcement email is sent to `dev@kubernetes.io` with the subject `[ANNOUNCE] Kubespray $VERSION is released`
1. The topic of the #kubespray channel is updated with `vX.Y.Z is released! | ...`
1. Create/Update Issue for upgradeing kubernetes and [k8s-conformance](https://github.com/cncf/k8s-conformance)
## Major/minor releases and milestones
@@ -43,7 +45,7 @@ The Kubespray Project is released on an as-needed basis. The process is as follo
* Minor releases can change components' versions, but not the major `kube_version`.
Greater `kube_version` requires a new major or minor release. For example, if Kubespray v2.0.0
is bound to `kube_version: 1.4.x`, `calico_version: 0.22.0`, `etcd_version: v3.0.6`,
is bound to `kube_version: 1.4.x`, `calico_version: 0.22.0`, `etcd_version: 3.0.6`,
then Kubespray v2.1.0 may be bound to only minor changes to `kube_version`, like v1.5.1
and *any* changes to other components, like etcd v4, or calico 1.2.3.
And Kubespray v3.x.x shall be bound to `kube_version: 2.x.x` respectively.

View File

@@ -9,7 +9,7 @@
#
# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE
# INSTRUCTIONS AT https://kubernetes.io/security/
mattymo
floryut
oomichi
cristicalin
ant31
VannTen
yankay

150
Vagrantfile vendored
View File

@@ -1,16 +1,17 @@
# -*- mode: ruby -*-
# # vi: set ft=ruby :
# For help on using kubespray with vagrant, check out docs/vagrant.md
# For help on using kubespray with vagrant, check out docs/developers/vagrant.md
require 'fileutils'
require 'ipaddr'
require 'socket'
Vagrant.require_version ">= 2.0.0"
CONFIG = File.join(File.dirname(__FILE__), ENV['KUBESPRAY_VAGRANT_CONFIG'] || 'vagrant/config.rb')
FLATCAR_URL_TEMPLATE = "https://%s.release.flatcar-linux.net/amd64-usr/current/flatcar_production_vagrant.json"
FEDORA35_MIRROR = "https://download.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/x86_64/images/Fedora-Cloud-Base-Vagrant-35-1.2.x86_64.vagrant-libvirt.box"
# Uniq disk UUID for libvirt
DISK_UUID = Time.now.utc.to_i
@@ -20,24 +21,27 @@ SUPPORTED_OS = {
"flatcar-beta" => {box: "flatcar-beta", user: "core", box_url: FLATCAR_URL_TEMPLATE % ["beta"]},
"flatcar-alpha" => {box: "flatcar-alpha", user: "core", box_url: FLATCAR_URL_TEMPLATE % ["alpha"]},
"flatcar-edge" => {box: "flatcar-edge", user: "core", box_url: FLATCAR_URL_TEMPLATE % ["edge"]},
"ubuntu1604" => {box: "generic/ubuntu1604", user: "vagrant"},
"ubuntu1804" => {box: "generic/ubuntu1804", user: "vagrant"},
"ubuntu2004" => {box: "generic/ubuntu2004", user: "vagrant"},
"centos" => {box: "centos/7", user: "vagrant"},
"centos-bento" => {box: "bento/centos-7.6", user: "vagrant"},
"ubuntu2204" => {box: "generic/ubuntu2204", user: "vagrant"},
"ubuntu2404" => {box: "bento/ubuntu-24.04", user: "vagrant"},
"centos8" => {box: "centos/8", user: "vagrant"},
"centos8-bento" => {box: "bento/centos-8", user: "vagrant"},
"almalinux8" => {box: "almalinux/8", user: "vagrant"},
"almalinux8-bento" => {box: "bento/almalinux-8", user: "vagrant"},
"rockylinux8" => {box: "generic/rocky8", user: "vagrant"},
"fedora35" => {box: "fedora/35-cloud-base", user: "vagrant", box_url: FEDORA35_MIRROR},
"fedora36" => {box: "fedora/36-cloud-base", user: "vagrant"},
"opensuse" => {box: "opensuse/Leap-15.4.x86_64", user: "vagrant"},
"almalinux9" => {box: "almalinux/9", user: "vagrant"},
"rockylinux8" => {box: "rockylinux/8", user: "vagrant"},
"rockylinux9" => {box: "rockylinux/9", user: "vagrant"},
"fedora39" => {box: "fedora/39-cloud-base", user: "vagrant"},
"fedora40" => {box: "fedora/40-cloud-base", user: "vagrant"},
"fedora39-arm64" => {box: "bento/fedora-39-arm64", user: "vagrant"},
"fedora40-arm64" => {box: "bento/fedora-40", user: "vagrant"},
"opensuse" => {box: "opensuse/Leap-15.6.x86_64", user: "vagrant"},
"opensuse-tumbleweed" => {box: "opensuse/Tumbleweed.x86_64", user: "vagrant"},
"oraclelinux" => {box: "generic/oracle7", user: "vagrant"},
"oraclelinux8" => {box: "generic/oracle8", user: "vagrant"},
"rhel7" => {box: "generic/rhel7", user: "vagrant"},
"rhel8" => {box: "generic/rhel8", user: "vagrant"},
"debian11" => {box: "debian/bullseye64", user: "vagrant"},
"debian12" => {box: "debian/bookworm64", user: "vagrant"},
}
if File.exist?(CONFIG)
@@ -54,18 +58,29 @@ $shared_folders ||= {}
$forwarded_ports ||= {}
$subnet ||= "172.18.8"
$subnet_ipv6 ||= "fd3c:b398:0698:0756"
$os ||= "ubuntu1804"
$os ||= "ubuntu2004"
$network_plugin ||= "flannel"
$inventories ||= []
# Setting multi_networking to true will install Multus: https://github.com/k8snetworkplumbingwg/multus-cni
$multi_networking ||= "False"
$download_run_once ||= "True"
$download_force_cache ||= "False"
# Modify those to have separate groups (for instance, to test separate etcd:)
# first_control_plane = 1
# first_etcd = 4
# control_plane_instances = 3
# etcd_instances = 3
$first_node ||= 1
$first_control_plane ||= 1
$first_etcd ||= 1
# The first three nodes are etcd servers
$etcd_instances ||= [$num_instances, 3].min
# The first two nodes are kube masters
$kube_master_instances ||= [$num_instances, 2].min
$control_plane_instances ||= [$num_instances, 2].min
# All nodes are kube nodes
$kube_node_instances ||= $num_instances
$kube_node_instances ||= $num_instances - $first_node + 1
# The following only works when using the libvirt provider
$kube_node_instances_with_disks ||= false
$kube_node_instances_with_disks_size ||= "20G"
@@ -79,10 +94,40 @@ $libvirt_nested ||= false
$ansible_verbosity ||= false
$ansible_tags ||= ENV['VAGRANT_ANSIBLE_TAGS'] || ""
$vagrant_dir ||= File.join(File.dirname(__FILE__), ".vagrant")
$playbook ||= "cluster.yml"
$extra_vars ||= {}
host_vars = {}
def collect_networks(subnet, subnet_ipv6)
Socket.getifaddrs.filter_map do |iface|
next unless iface&.netmask&.ip_address && iface.addr
is_ipv6 = iface.addr.ipv6?
ip = IPAddr.new(iface.addr.ip_address.split('%').first)
ip_test = is_ipv6 ? IPAddr.new("#{subnet_ipv6}::0") : IPAddr.new("#{subnet}.0")
prefix = IPAddr.new(iface.netmask.ip_address).to_i.to_s(2).count('1')
network = ip.mask(prefix)
[IPAddr.new("#{network}/#{prefix}"), ip_test]
end
end
def subnet_in_use?(network_ips)
network_ips.any? { |net, test_ip| net.include?(test_ip) && test_ip != net }
end
network_ips = collect_networks($subnet, $subnet_ipv6)
if subnet_in_use?(network_ips)
puts "Invalid subnet provided, subnet is already in use: #{$subnet}.0"
puts "Subnets in use: #{network_ips.inspect}"
exit 1
end
# throw error if os is not supported
if ! SUPPORTED_OS.key?($os)
puts "Unsupported OS: #{$os}"
@@ -91,19 +136,6 @@ if ! SUPPORTED_OS.key?($os)
end
$box = SUPPORTED_OS[$os][:box]
# if $inventory is not set, try to use example
$inventory = "inventory/sample" if ! $inventory
$inventory = File.absolute_path($inventory, File.dirname(__FILE__))
# if $inventory has a hosts.ini file use it, otherwise copy over
# vars etc to where vagrant expects dynamic inventory to be
if ! File.exist?(File.join(File.dirname($inventory), "hosts.ini"))
$vagrant_ansible = File.join(File.dirname(__FILE__), ".vagrant", "provisioners", "ansible")
FileUtils.mkdir_p($vagrant_ansible) if ! File.exist?($vagrant_ansible)
$vagrant_inventory = File.join($vagrant_ansible,"inventory")
FileUtils.rm_f($vagrant_inventory)
FileUtils.ln_s($inventory, $vagrant_inventory)
end
if Vagrant.has_plugin?("vagrant-proxyconf")
$no_proxy = ENV['NO_PROXY'] || ENV['no_proxy'] || "127.0.0.1,localhost"
@@ -184,6 +216,14 @@ Vagrant.configure("2") do |config|
lv.storage :file, :device => "hd#{driverletters[d]}", :path => "disk-#{i}-#{d}-#{DISK_UUID}.disk", :size => $kube_node_instances_with_disks_size, :bus => "scsi"
end
end
node.vm.provider :virtualbox do |vb|
# always make /dev/sd{a/b/c} so that CI can ensure that
# virtualbox and libvirt will have the same devices to use for OSDs
(1..$kube_node_instances_with_disks_number).each do |d|
vb.customize ['createhd', '--filename', "disk-#{i}-#{driverletters[d]}-#{DISK_UUID}.disk", '--size', $kube_node_instances_with_disks_size] # 10GB disk
vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', d, '--device', 0, '--type', 'hdd', '--medium', "disk-#{i}-#{driverletters[d]}-#{DISK_UUID}.disk", '--nonrotational', 'on', '--mtype', 'normal']
end
end
end
if $expose_docker_tcp
@@ -194,7 +234,7 @@ Vagrant.configure("2") do |config|
node.vm.network "forwarded_port", guest: guest, host: host, auto_correct: true
end
if ["rhel7","rhel8"].include? $os
if ["rhel8"].include? $os
# Vagrant synced_folder rsync options cannot be used for RHEL boxes as Rsync package cannot
# be installed until the host is registered with a valid Red Hat support subscription
node.vm.synced_folder ".", "/vagrant", disabled: false
@@ -209,24 +249,47 @@ Vagrant.configure("2") do |config|
end
ip = "#{$subnet}.#{i+100}"
node.vm.network :private_network, ip: ip,
ip6 = "#{$subnet_ipv6}::#{i+100}"
node.vm.network :private_network,
:ip => ip,
:libvirt__guest_ipv6 => 'yes',
:libvirt__ipv6_address => "#{$subnet_ipv6}::#{i+100}",
:libvirt__ipv6_address => ip6,
:libvirt__ipv6_prefix => "64",
:libvirt__forward_mode => "none",
:libvirt__dhcp_enabled => false
# libvirt__ipv6_address does not work as intended, the address is obtained with the desired prefix, but auto-generated(like fd3c:b398:698:756:5054:ff:fe48:c61e/64)
# add default route for detect ansible_default_ipv6
# TODO: fix libvirt__ipv6 or use $subnet in shell
config.vm.provision "shell", inline: "ip -6 r a fd3c:b398:698:756::/64 dev eth1;ip -6 r add default via fd3c:b398:0698:0756::1 dev eth1 || true"
# Disable swap for each vm
node.vm.provision "shell", inline: "swapoff -a"
# ubuntu1804 and ubuntu2004 have IPv6 explicitly disabled. This undoes that.
if ["ubuntu1804", "ubuntu2004"].include? $os
# ubuntu2004 and ubuntu2204 have IPv6 explicitly disabled. This undoes that.
if ["ubuntu2004", "ubuntu2204"].include? $os
node.vm.provision "shell", inline: "rm -f /etc/modprobe.d/local.conf"
node.vm.provision "shell", inline: "sed -i '/net.ipv6.conf.all.disable_ipv6/d' /etc/sysctl.d/99-sysctl.conf /etc/sysctl.conf"
end
# Hack for fedora39/40 to get the IP address of the second interface
if ["fedora39", "fedora40", "fedora39-arm64", "fedora40-arm64"].include? $os
config.vm.provision "shell", inline: <<-SHELL
nmcli conn modify 'Wired connection 2' ipv4.addresses $(cat /etc/sysconfig/network-scripts/ifcfg-eth1 | grep IPADDR | cut -d "=" -f2)/24
nmcli conn modify 'Wired connection 2' ipv4.method manual
service NetworkManager restart
SHELL
end
# Rockylinux boxes needs UEFI
if ["rockylinux8", "rockylinux9"].include? $os
config.vm.provider "libvirt" do |domain|
domain.loader = "/usr/share/OVMF/x64/OVMF_CODE.fd"
end
end
# Disable firewalld on oraclelinux/redhat vms
if ["oraclelinux","oraclelinux8","rhel7","rhel8"].include? $os
if ["oraclelinux","oraclelinux8", "rhel8","rockylinux8"].include? $os
node.vm.provision "shell", inline: "systemctl stop firewalld; systemctl disable firewalld"
end
@@ -248,7 +311,9 @@ Vagrant.configure("2") do |config|
"kubectl_localhost": "True",
"local_path_provisioner_enabled": "#{$local_path_provisioner_enabled}",
"local_path_provisioner_claim_root": "#{$local_path_provisioner_claim_root}",
"ansible_ssh_user": SUPPORTED_OS[$os][:user]
"ansible_ssh_user": SUPPORTED_OS[$os][:user],
"ansible_ssh_private_key_file": File.join(Dir.home, ".vagrant.d", "insecure_private_key"),
"unsafe_show_logs": "True"
}
# Only execute the Ansible provisioner once, when all the machines are up and ready.
@@ -256,23 +321,24 @@ Vagrant.configure("2") do |config|
if i == $num_instances
node.vm.provision "ansible" do |ansible|
ansible.playbook = $playbook
ansible.compatibility_mode = "2.0"
ansible.verbose = $ansible_verbosity
$ansible_inventory_path = File.join( $inventory, "hosts.ini")
if File.exist?($ansible_inventory_path)
ansible.inventory_path = $ansible_inventory_path
end
ansible.become = true
ansible.limit = "all,localhost"
ansible.host_key_checking = false
ansible.raw_arguments = ["--forks=#{$num_instances}", "--flush-cache", "-e ansible_become_pass=vagrant"]
ansible.raw_arguments = ["--forks=#{$num_instances}",
"--flush-cache",
"-e ansible_become_pass=vagrant"] +
$inventories.map {|inv| ["-i", inv]}.flatten
ansible.host_vars = host_vars
ansible.extra_vars = $extra_vars
if $ansible_tags != ""
ansible.tags = [$ansible_tags]
end
ansible.groups = {
"etcd" => ["#{$instance_name_prefix}-[1:#{$etcd_instances}]"],
"kube_control_plane" => ["#{$instance_name_prefix}-[1:#{$kube_master_instances}]"],
"kube_node" => ["#{$instance_name_prefix}-[1:#{$kube_node_instances}]"],
"etcd" => ["#{$instance_name_prefix}-[#{$first_etcd}:#{$etcd_instances + $first_etcd - 1}]"],
"kube_control_plane" => ["#{$instance_name_prefix}-[#{$first_control_plane}:#{$control_plane_instances + $first_control_plane - 1}]"],
"kube_node" => ["#{$instance_name_prefix}-[#{$first_node}:#{$kube_node_instances + $first_node - 1}]"],
"k8s_cluster:children" => ["kube_control_plane", "kube_node"],
}
end

View File

@@ -1,6 +1,6 @@
[ssh_connection]
pipelining=True
ansible_ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o ConnectionAttempts=100 -o UserKnownHostsFile=/dev/null
ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o ConnectionAttempts=100 -o UserKnownHostsFile=/dev/null
#control_path = ~/.ssh/ansible-%%r@%%h:%%p
[defaults]
# https://github.com/ansible/ansible/issues/56930 (to ignore group names with - and .)
@@ -11,10 +11,11 @@ gathering = smart
fact_caching = jsonfile
fact_caching_connection = /tmp
fact_caching_timeout = 86400
timeout = 300
stdout_callback = default
display_skipped_hosts = no
library = ./library
callbacks_enabled = profile_tasks,ara_default
callbacks_enabled = profile_tasks
roles_path = roles:$VIRTUAL_ENV/usr/local/share/kubespray/roles:$VIRTUAL_ENV/usr/local/share/ansible/roles:/usr/share/kubespray/roles
deprecation_warnings=False
inventory_ignore_extensions = ~, .orig, .bak, .ini, .cfg, .retry, .pyc, .pyo, .creds, .gpg

View File

@@ -39,7 +39,7 @@ class SearchEC2Tags(object):
hosts[group] = []
tag_key = "kubespray-role"
tag_value = ["*"+group+"*"]
region = os.environ['REGION']
region = os.environ['AWS_REGION']
ec2 = boto3.resource('ec2', region)
filters = [{'Name': 'tag:'+tag_key, 'Values': tag_value}, {'Name': 'instance-state-name', 'Values': ['running']}]
@@ -67,6 +67,11 @@ class SearchEC2Tags(object):
if node_labels_tag:
ansible_host['node_labels'] = dict([ label.strip().split('=') for label in node_labels_tag[0]['Value'].split(',') ])
##Set when instance actually has node_taints
node_taints_tag = list(filter(lambda t: t['Key'] == 'kubespray-node-taints', instance.tags))
if node_taints_tag:
ansible_host['node_taints'] = list([ taint.strip() for taint in node_taints_tag[0]['Value'].split(',') ])
hosts[group].append(dns_name)
hosts['_meta']['hostvars'][dns_name] = ansible_host

View File

@@ -49,7 +49,7 @@ If you need to delete all resources from a resource group, simply call:
## Installing Ansible and the dependencies
Install Ansible according to [Ansible installation guide](/docs/ansible.md#installing-ansible)
Install Ansible according to [Ansible installation guide](/docs/ansible/ansible.md#installing-ansible)
## Generating an inventory for kubespray

View File

@@ -1,5 +1,6 @@
---
- hosts: localhost
gather_facts: False
- name: Generate Azure inventory
hosts: localhost
gather_facts: false
roles:
- generate-inventory

View File

@@ -1,5 +1,6 @@
---
- hosts: localhost
gather_facts: False
- name: Generate Azure inventory
hosts: localhost
gather_facts: false
roles:
- generate-inventory_2

View File

@@ -1,5 +1,6 @@
---
- hosts: localhost
gather_facts: False
- name: Generate Azure templates
hosts: localhost
gather_facts: false
roles:
- generate-templates

View File

@@ -1,6 +1,6 @@
---
- name: Query Azure VMs # noqa 301
- name: Query Azure VMs
command: azure vm list-ip-address --json {{ azure_resource_group }}
register: vm_list_cmd
@@ -12,4 +12,4 @@
template:
src: inventory.j2
dest: "{{ playbook_dir }}/inventory"
mode: 0644
mode: "0644"

View File

@@ -1,14 +1,14 @@
---
- name: Query Azure VMs IPs # noqa 301
- name: Query Azure VMs IPs
command: az vm list-ip-addresses -o json --resource-group {{ azure_resource_group }}
register: vm_ip_list_cmd
- name: Query Azure VMs Roles # noqa 301
- name: Query Azure VMs Roles
command: az vm list -o json --resource-group {{ azure_resource_group }}
register: vm_list_cmd
- name: Query Azure Load Balancer Public IP # noqa 301
- name: Query Azure Load Balancer Public IP
command: az network public-ip show -o json -g {{ azure_resource_group }} -n kubernetes-api-pubip
register: lb_pubip_cmd
@@ -22,10 +22,10 @@
template:
src: inventory.j2
dest: "{{ playbook_dir }}/inventory"
mode: 0644
mode: "0644"
- name: Generate Load Balancer variables
template:
src: loadbalancer_vars.j2
dest: "{{ playbook_dir }}/loadbalancer_vars.yml"
mode: 0644
mode: "0644"

View File

@@ -24,14 +24,14 @@ bastionIPAddressName: bastion-pubip
disablePasswordAuthentication: true
sshKeyPath: "/home/{{admin_username}}/.ssh/authorized_keys"
sshKeyPath: "/home/{{ admin_username }}/.ssh/authorized_keys"
imageReference:
publisher: "OpenLogic"
offer: "CentOS"
sku: "7.5"
version: "latest"
imageReferenceJson: "{{imageReference|to_json}}"
imageReferenceJson: "{{ imageReference | to_json }}"
storageAccountName: "sa{{nameSuffix | replace('-', '')}}"
storageAccountName: "sa{{ nameSuffix | replace('-', '') }}"
storageAccountType: "{{ azure_storage_account_type | default('Standard_LRS') }}"

View File

@@ -8,13 +8,13 @@
path: "{{ base_dir }}"
state: directory
recurse: true
mode: 0755
mode: "0755"
- name: Store json files in base_dir
template:
src: "{{ item }}"
dest: "{{ base_dir }}/{{ item }}"
mode: 0644
mode: "0644"
with_items:
- network.json
- storage.json

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

@@ -1,177 +0,0 @@
# Kubespray DIND experimental setup
This ansible playbook creates local docker containers
to serve as Kubernetes "nodes", which in turn will run
"normal" Kubernetes docker containers, a mode usually
called DIND (Docker-IN-Docker).
The playbook has two roles:
- dind-host: creates the "nodes" as containers in localhost, with
appropriate settings for DIND (privileged, volume mapping for dind
storage, etc).
- dind-cluster: customizes each node container to have required
system packages installed, and some utils (swapoff, lsattr)
symlinked to /bin/true to ease mimicking a real node.
This playbook has been test with Ubuntu 16.04 as host and ubuntu:16.04
as docker images (note that dind-cluster has specific customization
for these images).
The playbook also creates a `/tmp/kubespray.dind.inventory_builder.sh`
helper (wraps up running `contrib/inventory_builder/inventory.py` with
node containers IPs and prefix).
## Deploying
See below for a complete successful run:
1. Create the node containers
```shell
# From the kubespray root dir
cd contrib/dind
pip install -r requirements.txt
ansible-playbook -i hosts dind-cluster.yaml
# Back to kubespray root
cd ../..
```
NOTE: if the playbook run fails with something like below error
message, you may need to specifically set `ansible_python_interpreter`,
see `./hosts` file for an example expanded localhost entry.
```shell
failed: [localhost] (item=kube-node1) => {"changed": false, "item": "kube-node1", "msg": "Failed to import docker or docker-py - No module named requests.exceptions. Try `pip install docker` or `pip install docker-py` (Python 2.6)"}
```
2. Customize kubespray-dind.yaml
Note that there's coupling between above created node containers
and `kubespray-dind.yaml` settings, in particular regarding selected `node_distro`
(as set in `group_vars/all/all.yaml`), and docker settings.
```shell
$EDITOR contrib/dind/kubespray-dind.yaml
```
3. Prepare the inventory and run the playbook
```shell
INVENTORY_DIR=inventory/local-dind
mkdir -p ${INVENTORY_DIR}
rm -f ${INVENTORY_DIR}/hosts.ini
CONFIG_FILE=${INVENTORY_DIR}/hosts.ini /tmp/kubespray.dind.inventory_builder.sh
ansible-playbook --become -e ansible_ssh_user=debian -i ${INVENTORY_DIR}/hosts.ini cluster.yml --extra-vars @contrib/dind/kubespray-dind.yaml
```
NOTE: You could also test other distros without editing files by
passing `--extra-vars` as per below commandline,
replacing `DISTRO` by either `debian`, `ubuntu`, `centos`, `fedora`:
```shell
cd contrib/dind
ansible-playbook -i hosts dind-cluster.yaml --extra-vars node_distro=DISTRO
cd ../..
CONFIG_FILE=inventory/local-dind/hosts.ini /tmp/kubespray.dind.inventory_builder.sh
ansible-playbook --become -e ansible_ssh_user=DISTRO -i inventory/local-dind/hosts.ini cluster.yml --extra-vars @contrib/dind/kubespray-dind.yaml --extra-vars bootstrap_os=DISTRO
```
## Resulting deployment
See below to get an idea on how a completed deployment looks like,
from the host where you ran kubespray playbooks.
### node_distro: debian
Running from an Ubuntu Xenial host:
```shell
$ uname -a
Linux ip-xx-xx-xx-xx 4.4.0-1069-aws #79-Ubuntu SMP Mon Sep 24
15:01:41 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1835dd183b75 debian:9.5 "sh -c 'apt-get -qy …" 43 minutes ago Up 43 minutes kube-node5
30b0af8d2924 debian:9.5 "sh -c 'apt-get -qy …" 43 minutes ago Up 43 minutes kube-node4
3e0d1510c62f debian:9.5 "sh -c 'apt-get -qy …" 43 minutes ago Up 43 minutes kube-node3
738993566f94 debian:9.5 "sh -c 'apt-get -qy …" 44 minutes ago Up 44 minutes kube-node2
c581ef662ed2 debian:9.5 "sh -c 'apt-get -qy …" 44 minutes ago Up 44 minutes kube-node1
$ docker exec kube-node1 kubectl get node
NAME STATUS ROLES AGE VERSION
kube-node1 Ready master,node 18m v1.12.1
kube-node2 Ready master,node 17m v1.12.1
kube-node3 Ready node 17m v1.12.1
kube-node4 Ready node 17m v1.12.1
kube-node5 Ready node 17m v1.12.1
$ docker exec kube-node1 kubectl get pod --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
default netchecker-agent-67489 1/1 Running 0 2m51s
default netchecker-agent-6qq6s 1/1 Running 0 2m51s
default netchecker-agent-fsw92 1/1 Running 0 2m51s
default netchecker-agent-fw6tl 1/1 Running 0 2m51s
default netchecker-agent-hostnet-8f2zb 1/1 Running 0 3m
default netchecker-agent-hostnet-gq7ml 1/1 Running 0 3m
default netchecker-agent-hostnet-jfkgv 1/1 Running 0 3m
default netchecker-agent-hostnet-kwfwx 1/1 Running 0 3m
default netchecker-agent-hostnet-r46nm 1/1 Running 0 3m
default netchecker-agent-lxdrn 1/1 Running 0 2m51s
default netchecker-server-864bd4c897-9vstl 1/1 Running 0 2m40s
default sh-68fcc6db45-qf55h 1/1 Running 1 12m
kube-system coredns-7598f59475-6vknq 1/1 Running 0 14m
kube-system coredns-7598f59475-l5q5x 1/1 Running 0 14m
kube-system kube-apiserver-kube-node1 1/1 Running 0 17m
kube-system kube-apiserver-kube-node2 1/1 Running 0 18m
kube-system kube-controller-manager-kube-node1 1/1 Running 0 18m
kube-system kube-controller-manager-kube-node2 1/1 Running 0 18m
kube-system kube-proxy-5xx9d 1/1 Running 0 17m
kube-system kube-proxy-cdqq4 1/1 Running 0 17m
kube-system kube-proxy-n64ls 1/1 Running 0 17m
kube-system kube-proxy-pswmj 1/1 Running 0 18m
kube-system kube-proxy-x89qw 1/1 Running 0 18m
kube-system kube-scheduler-kube-node1 1/1 Running 4 17m
kube-system kube-scheduler-kube-node2 1/1 Running 4 18m
kube-system kubernetes-dashboard-5db4d9f45f-548rl 1/1 Running 0 14m
kube-system nginx-proxy-kube-node3 1/1 Running 4 17m
kube-system nginx-proxy-kube-node4 1/1 Running 4 17m
kube-system nginx-proxy-kube-node5 1/1 Running 4 17m
kube-system weave-net-42bfr 2/2 Running 0 16m
kube-system weave-net-6gt8m 2/2 Running 0 16m
kube-system weave-net-88nnc 2/2 Running 0 16m
kube-system weave-net-shckr 2/2 Running 0 16m
kube-system weave-net-xr46t 2/2 Running 0 16m
$ docker exec kube-node1 curl -s http://localhost:31081/api/v1/connectivity_check
{"Message":"All 10 pods successfully reported back to the server","Absent":null,"Outdated":null}
```
## Using ./run-test-distros.sh
You can use `./run-test-distros.sh` to run a set of tests via DIND,
and excerpt from this script, to get an idea:
```shell
# The SPEC file(s) must have two arrays as e.g.
# DISTROS=(debian centos)
# EXTRAS=(
# 'kube_network_plugin=calico'
# 'kube_network_plugin=flannel'
# 'kube_network_plugin=weave'
# )
# that will be tested in a "combinatory" way (e.g. from above there'll be
# be 6 test runs), creating a sequenced <spec_filename>-nn.out with each output.
#
# Each $EXTRAS element will be whitespace split, and passed as --extra-vars
# to main kubespray ansible-playbook run.
```
See e.g. `test-some_distros-most_CNIs.env` and
`test-some_distros-kube_router_combo.env` in particular for a richer
set of CNI specific `--extra-vars` combo.

View File

@@ -1,9 +0,0 @@
---
- hosts: localhost
gather_facts: False
roles:
- { role: dind-host }
- hosts: containers
roles:
- { role: dind-cluster }

View File

@@ -1,3 +0,0 @@
---
# See distro.yaml for supported node_distro images
node_distro: debian

View File

@@ -1,41 +0,0 @@
---
distro_settings:
debian: &DEBIAN
image: "debian:9.5"
user: "debian"
pid1_exe: /lib/systemd/systemd
init: |
sh -c "apt-get -qy update && apt-get -qy install systemd-sysv dbus && exec /sbin/init"
raw_setup: apt-get -qy update && apt-get -qy install dbus python sudo iproute2
raw_setup_done: test -x /usr/bin/sudo
agetty_svc: getty@*
ssh_service: ssh
extra_packages: []
ubuntu:
<<: *DEBIAN
image: "ubuntu:16.04"
user: "ubuntu"
init: |
/sbin/init
centos: &CENTOS
image: "centos:7"
user: "centos"
pid1_exe: /usr/lib/systemd/systemd
init: |
/sbin/init
raw_setup: yum -qy install policycoreutils dbus python sudo iproute iptables
raw_setup_done: test -x /usr/bin/sudo
agetty_svc: getty@* serial-getty@*
ssh_service: sshd
extra_packages: []
fedora:
<<: *CENTOS
image: "fedora:latest"
user: "fedora"
raw_setup: yum -qy install policycoreutils dbus python sudo iproute iptables; mkdir -p /etc/modules-load.d
extra_packages:
- hostname
- procps
- findutils
- kmod
- iputils

View File

@@ -1,15 +0,0 @@
[local]
# If you created a virtualenv for ansible, you may need to specify running the
# python binary from there instead:
#localhost ansible_connection=local ansible_python_interpreter=/home/user/kubespray/.venv/bin/python
localhost ansible_connection=local
[containers]
kube-node1
kube-node2
kube-node3
kube-node4
kube-node5
[containers:vars]
ansible_connection=docker

View File

@@ -1,22 +0,0 @@
---
# kubespray-dind.yaml: minimal kubespray ansible playbook usable for DIND
# See contrib/dind/README.md
kube_api_anonymous_auth: true
kubelet_fail_swap_on: false
# Docker nodes need to have been created with same "node_distro: debian"
# at contrib/dind/group_vars/all/all.yaml
bootstrap_os: debian
docker_version: latest
docker_storage_options: -s overlay2 --storage-opt overlay2.override_kernel_check=true -g /dind/docker
dns_mode: coredns
deploy_netchecker: True
netcheck_agent_image_repo: quay.io/l23network/k8s-netchecker-agent
netcheck_server_image_repo: quay.io/l23network/k8s-netchecker-server
netcheck_agent_image_tag: v1.0
netcheck_server_image_tag: v1.0

View File

@@ -1 +0,0 @@
docker

View File

@@ -1,73 +0,0 @@
---
- name: set_fact distro_setup
set_fact:
distro_setup: "{{ distro_settings[node_distro] }}"
- name: set_fact other distro settings
set_fact:
distro_user: "{{ distro_setup['user'] }}"
distro_ssh_service: "{{ distro_setup['ssh_service'] }}"
distro_extra_packages: "{{ distro_setup['extra_packages'] }}"
- name: Null-ify some linux tools to ease DIND
file:
src: "/bin/true"
dest: "{{ item }}"
state: link
force: yes
with_items:
# DIND box may have swap enable, don't bother
- /sbin/swapoff
# /etc/hosts handling would fail on trying to copy file attributes on edit,
# void it by successfully returning nil output
- /usr/bin/lsattr
# disable selinux-isms, sp needed if running on non-Selinux host
- /usr/sbin/semodule
- name: Void installing dpkg docs and man pages on Debian based distros
copy:
content: |
# Delete locales
path-exclude=/usr/share/locale/*
# Delete man pages
path-exclude=/usr/share/man/*
# Delete docs
path-exclude=/usr/share/doc/*
path-include=/usr/share/doc/*/copyright
dest: /etc/dpkg/dpkg.cfg.d/01_nodoc
mode: 0644
when:
- ansible_os_family == 'Debian'
- name: Install system packages to better match a full-fledge node
package:
name: "{{ item }}"
state: present
with_items: "{{ distro_extra_packages + [ 'rsyslog', 'openssh-server' ] }}"
- name: Start needed services
service:
name: "{{ item }}"
state: started
with_items:
- rsyslog
- "{{ distro_ssh_service }}"
- name: Create distro user "{{ distro_user }}"
user:
name: "{{ distro_user }}"
uid: 1000
# groups: sudo
append: yes
- name: Allow password-less sudo to "{{ distro_user }}"
copy:
content: "{{ distro_user }} ALL=(ALL) NOPASSWD:ALL"
dest: "/etc/sudoers.d/{{ distro_user }}"
mode: 0640
- name: Add my pubkey to "{{ distro_user }}" user authorized keys
authorized_key:
user: "{{ distro_user }}"
state: present
key: "{{ lookup('file', lookup('env','HOME') + '/.ssh/id_rsa.pub') }}"

View File

@@ -1,88 +0,0 @@
---
- name: set_fact distro_setup
set_fact:
distro_setup: "{{ distro_settings[node_distro] }}"
- name: set_fact other distro settings
set_fact:
distro_image: "{{ distro_setup['image'] }}"
distro_init: "{{ distro_setup['init'] }}"
distro_pid1_exe: "{{ distro_setup['pid1_exe'] }}"
distro_raw_setup: "{{ distro_setup['raw_setup'] }}"
distro_raw_setup_done: "{{ distro_setup['raw_setup_done'] }}"
distro_agetty_svc: "{{ distro_setup['agetty_svc'] }}"
- name: Create dind node containers from "containers" inventory section
docker_container:
image: "{{ distro_image }}"
name: "{{ item }}"
state: started
hostname: "{{ item }}"
command: "{{ distro_init }}"
# recreate: yes
privileged: true
tmpfs:
- /sys/module/nf_conntrack/parameters
volumes:
- /boot:/boot
- /lib/modules:/lib/modules
- "{{ item }}:/dind/docker"
register: containers
with_items: "{{ groups.containers }}"
tags:
- addresses
- name: Gather list of containers IPs
set_fact:
addresses: "{{ containers.results | map(attribute='ansible_facts') | map(attribute='docker_container') | map(attribute='NetworkSettings') | map(attribute='IPAddress') | list }}"
tags:
- addresses
- name: Create inventory_builder helper already set with the list of node containers' IPs
template:
src: inventory_builder.sh.j2
dest: /tmp/kubespray.dind.inventory_builder.sh
mode: 0755
tags:
- addresses
- name: Install needed packages into node containers via raw, need to wait for possible systemd packages to finish installing
raw: |
# agetty processes churn a lot of cpu time failing on inexistent ttys, early STOP them, to rip them in below task
pkill -STOP agetty || true
{{ distro_raw_setup_done }} && echo SKIPPED && exit 0
until [ "$(readlink /proc/1/exe)" = "{{ distro_pid1_exe }}" ] ; do sleep 1; done
{{ distro_raw_setup }}
delegate_to: "{{ item._ansible_item_label|default(item.item) }}"
with_items: "{{ containers.results }}"
register: result
changed_when: result.stdout.find("SKIPPED") < 0
- name: Remove gettys from node containers
raw: |
until test -S /var/run/dbus/system_bus_socket; do sleep 1; done
systemctl disable {{ distro_agetty_svc }}
systemctl stop {{ distro_agetty_svc }}
delegate_to: "{{ item._ansible_item_label|default(item.item) }}"
with_items: "{{ containers.results }}"
changed_when: false
# Running systemd-machine-id-setup doesn't create a unique id for each node container on Debian,
# handle manually
- name: Re-create unique machine-id (as we may just get what comes in the docker image), needed by some CNIs for mac address seeding (notably weave) # noqa 301
raw: |
echo {{ item | hash('sha1') }} > /etc/machine-id.new
mv -b /etc/machine-id.new /etc/machine-id
cmp /etc/machine-id /etc/machine-id~ || true
systemctl daemon-reload
delegate_to: "{{ item._ansible_item_label|default(item.item) }}"
with_items: "{{ containers.results }}"
- name: Early hack image install to adapt for DIND
# noqa 302 - this task uses the raw module intentionally
raw: |
rm -fv /usr/bin/udevadm /usr/sbin/udevadm
delegate_to: "{{ item._ansible_item_label|default(item.item) }}"
with_items: "{{ containers.results }}"
register: result
changed_when: result.stdout.find("removed") >= 0

View File

@@ -1,3 +0,0 @@
#!/bin/bash
# NOTE: if you change HOST_PREFIX, you also need to edit ./hosts [containers] section
HOST_PREFIX=kube-node python3 contrib/inventory_builder/inventory.py {% for ip in addresses %} {{ ip }} {% endfor %}

View File

@@ -1,93 +0,0 @@
#!/bin/bash
# Q&D test'em all: creates full DIND kubespray deploys
# for each distro, verifying it via netchecker.
info() {
local msg="$*"
local date="$(date -Isec)"
echo "INFO: [$date] $msg"
}
pass_or_fail() {
local rc="$?"
local msg="$*"
local date="$(date -Isec)"
[ $rc -eq 0 ] && echo "PASS: [$date] $msg" || echo "FAIL: [$date] $msg"
return $rc
}
test_distro() {
local distro=${1:?};shift
local extra="${*:-}"
local prefix="${distro[${extra}]}"
ansible-playbook -i hosts dind-cluster.yaml -e node_distro=$distro
pass_or_fail "$prefix: dind-nodes" || return 1
(cd ../..
INVENTORY_DIR=inventory/local-dind
mkdir -p ${INVENTORY_DIR}
rm -f ${INVENTORY_DIR}/hosts.ini
CONFIG_FILE=${INVENTORY_DIR}/hosts.ini /tmp/kubespray.dind.inventory_builder.sh
# expand $extra with -e in front of each word
extra_args=""; for extra_arg in $extra; do extra_args="$extra_args -e $extra_arg"; done
ansible-playbook --become -e ansible_ssh_user=$distro -i \
${INVENTORY_DIR}/hosts.ini cluster.yml \
-e @contrib/dind/kubespray-dind.yaml -e bootstrap_os=$distro ${extra_args}
pass_or_fail "$prefix: kubespray"
) || return 1
local node0=${NODES[0]}
docker exec ${node0} kubectl get pod --all-namespaces
pass_or_fail "$prefix: kube-api" || return 1
let retries=60
while ((retries--)); do
# Some CNI may set NodePort on "main" node interface address (thus no localhost NodePort)
# e.g. kube-router: https://github.com/cloudnativelabs/kube-router/pull/217
docker exec ${node0} curl -m2 -s http://${NETCHECKER_HOST:?}:31081/api/v1/connectivity_check | grep successfully && break
sleep 2
done
[ $retries -ge 0 ]
pass_or_fail "$prefix: netcheck" || return 1
}
NODES=($(egrep ^kube_node hosts))
NETCHECKER_HOST=localhost
: ${OUTPUT_DIR:=./out}
mkdir -p ${OUTPUT_DIR}
# The SPEC file(s) must have two arrays as e.g.
# DISTROS=(debian centos)
# EXTRAS=(
# 'kube_network_plugin=calico'
# 'kube_network_plugin=flannel'
# 'kube_network_plugin=weave'
# )
# that will be tested in a "combinatory" way (e.g. from above there'll be
# be 6 test runs), creating a sequenced <spec_filename>-nn.out with each output.
#
# Each $EXTRAS element will be whitespace split, and passed as --extra-vars
# to main kubespray ansible-playbook run.
SPECS=${*:?Missing SPEC files, e.g. test-most_distros-some_CNIs.env}
for spec in ${SPECS}; do
unset DISTROS EXTRAS
echo "Loading file=${spec} ..."
. ${spec} || continue
: ${DISTROS:?} || continue
echo "DISTROS:" "${DISTROS[@]}"
echo "EXTRAS->"
printf " %s\n" "${EXTRAS[@]}"
let n=1
for distro in "${DISTROS[@]}"; do
for extra in "${EXTRAS[@]:-NULL}"; do
# Magic value to let this for run once:
[[ ${extra} == NULL ]] && unset extra
docker rm -f "${NODES[@]}"
printf -v file_out "%s/%s-%02d.out" ${OUTPUT_DIR} ${spec} $((n++))
{
info "${distro}[${extra}] START: file_out=${file_out}"
time test_distro ${distro} ${extra}
} |& tee ${file_out}
# sleeping for the sake of the human to verify if they want
sleep 2m
done
done
done
egrep -H '^(....:|real)' $(ls -tr ${OUTPUT_DIR}/*.out)

View File

@@ -1,11 +0,0 @@
# Test spec file: used from ./run-test-distros.sh, will run
# each distro in $DISTROS overloading main kubespray ansible-playbook run
# Get all DISTROS from distro.yaml (shame no yaml parsing, but nuff anyway)
# DISTROS="${*:-$(egrep -o '^ \w+' group_vars/all/distro.yaml|paste -s)}"
DISTROS=(debian ubuntu centos fedora)
# Each line below will be added as --extra-vars to main playbook run
EXTRAS=(
'kube_network_plugin=calico'
'kube_network_plugin=weave'
)

View File

@@ -1,6 +0,0 @@
DISTROS=(debian centos)
NETCHECKER_HOST=${NODES[0]}
EXTRAS=(
'kube_network_plugin=kube-router {"kube_router_run_service_proxy":false}'
'kube_network_plugin=kube-router {"kube_router_run_service_proxy":true}'
)

View File

@@ -1,8 +0,0 @@
DISTROS=(debian centos)
EXTRAS=(
'kube_network_plugin=calico {}'
'kube_network_plugin=canal {}'
'kube_network_plugin=cilium {}'
'kube_network_plugin=flannel {}'
'kube_network_plugin=weave {}'
)

View File

@@ -1,480 +0,0 @@
#!/usr/bin/env python3
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Usage: inventory.py ip1 [ip2 ...]
# Examples: inventory.py 10.10.1.3 10.10.1.4 10.10.1.5
#
# Advanced usage:
# Add another host after initial creation: inventory.py 10.10.1.5
# Add range of hosts: inventory.py 10.10.1.3-10.10.1.5
# Add hosts with different ip and access ip:
# inventory.py 10.0.0.1,192.168.10.1 10.0.0.2,192.168.10.2 10.0.0.3,192.168.1.3
# Add hosts with a specific hostname, ip, and optional access ip:
# inventory.py first,10.0.0.1,192.168.10.1 second,10.0.0.2 last,10.0.0.3
# Delete a host: inventory.py -10.10.1.3
# Delete a host by id: inventory.py -node1
#
# Load a YAML or JSON file with inventory data: inventory.py load hosts.yaml
# YAML file should be in the following format:
# group1:
# host1:
# ip: X.X.X.X
# var: val
# group2:
# host2:
# ip: X.X.X.X
from collections import OrderedDict
from ipaddress import ip_address
from ruamel.yaml import YAML
import os
import re
import subprocess
import sys
ROLES = ['all', 'kube_control_plane', 'kube_node', 'etcd', 'k8s_cluster',
'calico_rr']
PROTECTED_NAMES = ROLES
AVAILABLE_COMMANDS = ['help', 'print_cfg', 'print_ips', 'print_hostnames',
'load', 'add']
_boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True,
'0': False, 'no': False, 'false': False, 'off': False}
yaml = YAML()
yaml.Representer.add_representer(OrderedDict, yaml.Representer.represent_dict)
def get_var_as_bool(name, default):
value = os.environ.get(name, '')
return _boolean_states.get(value.lower(), default)
# Configurable as shell vars start
CONFIG_FILE = os.environ.get("CONFIG_FILE", "./inventory/sample/hosts.yaml")
# Remove the reference of KUBE_MASTERS after some deprecation cycles.
KUBE_CONTROL_HOSTS = int(os.environ.get("KUBE_CONTROL_HOSTS",
os.environ.get("KUBE_MASTERS", 2)))
# Reconfigures cluster distribution at scale
SCALE_THRESHOLD = int(os.environ.get("SCALE_THRESHOLD", 50))
MASSIVE_SCALE_THRESHOLD = int(os.environ.get("MASSIVE_SCALE_THRESHOLD", 200))
DEBUG = get_var_as_bool("DEBUG", True)
HOST_PREFIX = os.environ.get("HOST_PREFIX", "node")
USE_REAL_HOSTNAME = get_var_as_bool("USE_REAL_HOSTNAME", False)
# Configurable as shell vars end
class KubesprayInventory(object):
def __init__(self, changed_hosts=None, config_file=None):
self.config_file = config_file
self.yaml_config = {}
loadPreviousConfig = False
printHostnames = False
# See whether there are any commands to process
if changed_hosts and changed_hosts[0] in AVAILABLE_COMMANDS:
if changed_hosts[0] == "add":
loadPreviousConfig = True
changed_hosts = changed_hosts[1:]
elif changed_hosts[0] == "print_hostnames":
loadPreviousConfig = True
printHostnames = True
else:
self.parse_command(changed_hosts[0], changed_hosts[1:])
sys.exit(0)
# If the user wants to remove a node, we need to load the config anyway
if changed_hosts and changed_hosts[0][0] == "-":
loadPreviousConfig = True
if self.config_file and loadPreviousConfig: # Load previous YAML file
try:
self.hosts_file = open(config_file, 'r')
self.yaml_config = yaml.load(self.hosts_file)
except OSError as e:
# I am assuming we are catching "cannot open file" exceptions
print(e)
sys.exit(1)
if printHostnames:
self.print_hostnames()
sys.exit(0)
self.ensure_required_groups(ROLES)
if changed_hosts:
changed_hosts = self.range2ips(changed_hosts)
self.hosts = self.build_hostnames(changed_hosts,
loadPreviousConfig)
self.purge_invalid_hosts(self.hosts.keys(), PROTECTED_NAMES)
self.set_all(self.hosts)
self.set_k8s_cluster()
etcd_hosts_count = 3 if len(self.hosts.keys()) >= 3 else 1
self.set_etcd(list(self.hosts.keys())[:etcd_hosts_count])
if len(self.hosts) >= SCALE_THRESHOLD:
self.set_kube_control_plane(list(self.hosts.keys())[
etcd_hosts_count:(etcd_hosts_count + KUBE_CONTROL_HOSTS)])
else:
self.set_kube_control_plane(
list(self.hosts.keys())[:KUBE_CONTROL_HOSTS])
self.set_kube_node(self.hosts.keys())
if len(self.hosts) >= SCALE_THRESHOLD:
self.set_calico_rr(list(self.hosts.keys())[:etcd_hosts_count])
else: # Show help if no options
self.show_help()
sys.exit(0)
self.write_config(self.config_file)
def write_config(self, config_file):
if config_file:
with open(self.config_file, 'w') as f:
yaml.dump(self.yaml_config, f)
else:
print("WARNING: Unable to save config. Make sure you set "
"CONFIG_FILE env var.")
def debug(self, msg):
if DEBUG:
print("DEBUG: {0}".format(msg))
def get_ip_from_opts(self, optstring):
if 'ip' in optstring:
return optstring['ip']
else:
raise ValueError("IP parameter not found in options")
def ensure_required_groups(self, groups):
for group in groups:
if group == 'all':
self.debug("Adding group {0}".format(group))
if group not in self.yaml_config:
all_dict = OrderedDict([('hosts', OrderedDict({})),
('children', OrderedDict({}))])
self.yaml_config = {'all': all_dict}
else:
self.debug("Adding group {0}".format(group))
if group not in self.yaml_config['all']['children']:
self.yaml_config['all']['children'][group] = {'hosts': {}}
def get_host_id(self, host):
'''Returns integer host ID (without padding) from a given hostname.'''
try:
short_hostname = host.split('.')[0]
return int(re.findall("\\d+$", short_hostname)[-1])
except IndexError:
raise ValueError("Host name must end in an integer")
# Keeps already specified hosts,
# and adds or removes the hosts provided as an argument
def build_hostnames(self, changed_hosts, loadPreviousConfig=False):
existing_hosts = OrderedDict()
highest_host_id = 0
# Load already existing hosts from the YAML
if loadPreviousConfig:
try:
for host in self.yaml_config['all']['hosts']:
# Read configuration of an existing host
hostConfig = self.yaml_config['all']['hosts'][host]
existing_hosts[host] = hostConfig
# If the existing host seems
# to have been created automatically, detect its ID
if host.startswith(HOST_PREFIX):
host_id = self.get_host_id(host)
if host_id > highest_host_id:
highest_host_id = host_id
except Exception as e:
# I am assuming we are catching automatically
# created hosts without IDs
print(e)
sys.exit(1)
# FIXME(mattymo): Fix condition where delete then add reuses highest id
next_host_id = highest_host_id + 1
next_host = ""
all_hosts = existing_hosts.copy()
for host in changed_hosts:
# Delete the host from config the hostname/IP has a "-" prefix
if host[0] == "-":
realhost = host[1:]
if self.exists_hostname(all_hosts, realhost):
self.debug("Marked {0} for deletion.".format(realhost))
all_hosts.pop(realhost)
elif self.exists_ip(all_hosts, realhost):
self.debug("Marked {0} for deletion.".format(realhost))
self.delete_host_by_ip(all_hosts, realhost)
# Host/Argument starts with a digit,
# then we assume its an IP address
elif host[0].isdigit():
if ',' in host:
ip, access_ip = host.split(',')
else:
ip = host
access_ip = host
if self.exists_hostname(all_hosts, host):
self.debug("Skipping existing host {0}.".format(host))
continue
elif self.exists_ip(all_hosts, ip):
self.debug("Skipping existing host {0}.".format(ip))
continue
if USE_REAL_HOSTNAME:
cmd = ("ssh -oStrictHostKeyChecking=no "
+ access_ip + " 'hostname -s'")
next_host = subprocess.check_output(cmd, shell=True)
next_host = next_host.strip().decode('ascii')
else:
# Generates a hostname because we have only an IP address
next_host = "{0}{1}".format(HOST_PREFIX, next_host_id)
next_host_id += 1
# Uses automatically generated node name
# in case we dont provide it.
all_hosts[next_host] = {'ansible_host': access_ip,
'ip': ip,
'access_ip': access_ip}
# Host/Argument starts with a letter, then we assume its a hostname
elif host[0].isalpha():
if ',' in host:
try:
hostname, ip, access_ip = host.split(',')
except Exception:
hostname, ip = host.split(',')
access_ip = ip
if self.exists_hostname(all_hosts, host):
self.debug("Skipping existing host {0}.".format(host))
continue
elif self.exists_ip(all_hosts, ip):
self.debug("Skipping existing host {0}.".format(ip))
continue
all_hosts[hostname] = {'ansible_host': access_ip,
'ip': ip,
'access_ip': access_ip}
return all_hosts
# Expand IP ranges into individual addresses
def range2ips(self, hosts):
reworked_hosts = []
def ips(start_address, end_address):
try:
# Python 3.x
start = int(ip_address(start_address))
end = int(ip_address(end_address))
except Exception:
# Python 2.7
start = int(ip_address(str(start_address)))
end = int(ip_address(str(end_address)))
return [ip_address(ip).exploded for ip in range(start, end + 1)]
for host in hosts:
if '-' in host and not (host.startswith('-') or host[0].isalpha()):
start, end = host.strip().split('-')
try:
reworked_hosts.extend(ips(start, end))
except ValueError:
raise Exception("Range of ip_addresses isn't valid")
else:
reworked_hosts.append(host)
return reworked_hosts
def exists_hostname(self, existing_hosts, hostname):
return hostname in existing_hosts.keys()
def exists_ip(self, existing_hosts, ip):
for host_opts in existing_hosts.values():
if ip == self.get_ip_from_opts(host_opts):
return True
return False
def delete_host_by_ip(self, existing_hosts, ip):
for hostname, host_opts in existing_hosts.items():
if ip == self.get_ip_from_opts(host_opts):
del existing_hosts[hostname]
return
raise ValueError("Unable to find host by IP: {0}".format(ip))
def purge_invalid_hosts(self, hostnames, protected_names=[]):
for role in self.yaml_config['all']['children']:
if role != 'k8s_cluster' and self.yaml_config['all']['children'][role]['hosts']: # noqa
all_hosts = self.yaml_config['all']['children'][role]['hosts'].copy() # noqa
for host in all_hosts.keys():
if host not in hostnames and host not in protected_names:
self.debug(
"Host {0} removed from role {1}".format(host, role)) # noqa
del self.yaml_config['all']['children'][role]['hosts'][host] # noqa
# purge from all
if self.yaml_config['all']['hosts']:
all_hosts = self.yaml_config['all']['hosts'].copy()
for host in all_hosts.keys():
if host not in hostnames and host not in protected_names:
self.debug("Host {0} removed from role all".format(host))
del self.yaml_config['all']['hosts'][host]
def add_host_to_group(self, group, host, opts=""):
self.debug("adding host {0} to group {1}".format(host, group))
if group == 'all':
if self.yaml_config['all']['hosts'] is None:
self.yaml_config['all']['hosts'] = {host: None}
self.yaml_config['all']['hosts'][host] = opts
elif group != 'k8s_cluster:children':
if self.yaml_config['all']['children'][group]['hosts'] is None:
self.yaml_config['all']['children'][group]['hosts'] = {
host: None}
else:
self.yaml_config['all']['children'][group]['hosts'][host] = None # noqa
def set_kube_control_plane(self, hosts):
for host in hosts:
self.add_host_to_group('kube_control_plane', host)
def set_all(self, hosts):
for host, opts in hosts.items():
self.add_host_to_group('all', host, opts)
def set_k8s_cluster(self):
k8s_cluster = {'children': {'kube_control_plane': None,
'kube_node': None}}
self.yaml_config['all']['children']['k8s_cluster'] = k8s_cluster
def set_calico_rr(self, hosts):
for host in hosts:
if host in self.yaml_config['all']['children']['kube_control_plane']: # noqa
self.debug("Not adding {0} to calico_rr group because it "
"conflicts with kube_control_plane "
"group".format(host))
continue
if host in self.yaml_config['all']['children']['kube_node']:
self.debug("Not adding {0} to calico_rr group because it "
"conflicts with kube_node group".format(host))
continue
self.add_host_to_group('calico_rr', host)
def set_kube_node(self, hosts):
for host in hosts:
if len(self.yaml_config['all']['hosts']) >= SCALE_THRESHOLD:
if host in self.yaml_config['all']['children']['etcd']['hosts']: # noqa
self.debug("Not adding {0} to kube_node group because of "
"scale deployment and host is in etcd "
"group.".format(host))
continue
if len(self.yaml_config['all']['hosts']) >= MASSIVE_SCALE_THRESHOLD: # noqa
if host in self.yaml_config['all']['children']['kube_control_plane']['hosts']: # noqa
self.debug("Not adding {0} to kube_node group because of "
"scale deployment and host is in "
"kube_control_plane group.".format(host))
continue
self.add_host_to_group('kube_node', host)
def set_etcd(self, hosts):
for host in hosts:
self.add_host_to_group('etcd', host)
def load_file(self, files=None):
'''Directly loads JSON to inventory.'''
if not files:
raise Exception("No input file specified.")
import json
for filename in list(files):
# Try JSON
try:
with open(filename, 'r') as f:
data = json.load(f)
except ValueError:
raise Exception("Cannot read %s as JSON, or CSV", filename)
self.ensure_required_groups(ROLES)
self.set_k8s_cluster()
for group, hosts in data.items():
self.ensure_required_groups([group])
for host, opts in hosts.items():
optstring = {'ansible_host': opts['ip'],
'ip': opts['ip'],
'access_ip': opts['ip']}
self.add_host_to_group('all', host, optstring)
self.add_host_to_group(group, host)
self.write_config(self.config_file)
def parse_command(self, command, args=None):
if command == 'help':
self.show_help()
elif command == 'print_cfg':
self.print_config()
elif command == 'print_ips':
self.print_ips()
elif command == 'print_hostnames':
self.print_hostnames()
elif command == 'load':
self.load_file(args)
else:
raise Exception("Invalid command specified.")
def show_help(self):
help_text = '''Usage: inventory.py ip1 [ip2 ...]
Examples: inventory.py 10.10.1.3 10.10.1.4 10.10.1.5
Available commands:
help - Display this message
print_cfg - Write inventory file to stdout
print_ips - Write a space-delimited list of IPs from "all" group
print_hostnames - Write a space-delimited list of Hostnames from "all" group
add - Adds specified hosts into an already existing inventory
Advanced usage:
Create new or overwrite old inventory file: inventory.py 10.10.1.5
Add another host after initial creation: inventory.py add 10.10.1.6
Add range of hosts: inventory.py 10.10.1.3-10.10.1.5
Add hosts with different ip and access ip: inventory.py 10.0.0.1,192.168.10.1 10.0.0.2,192.168.10.2 10.0.0.3,192.168.10.3
Add hosts with a specific hostname, ip, and optional access ip: first,10.0.0.1,192.168.10.1 second,10.0.0.2 last,10.0.0.3
Delete a host: inventory.py -10.10.1.3
Delete a host by id: inventory.py -node1
Configurable env vars:
DEBUG Enable debug printing. Default: True
CONFIG_FILE File to write config to Default: ./inventory/sample/hosts.yaml
HOST_PREFIX Host prefix for generated hosts. Default: node
KUBE_CONTROL_HOSTS Set the number of kube-control-planes. Default: 2
SCALE_THRESHOLD Separate ETCD role if # of nodes >= 50
MASSIVE_SCALE_THRESHOLD Separate K8s control-plane and ETCD if # of nodes >= 200
''' # noqa
print(help_text)
def print_config(self):
yaml.dump(self.yaml_config, sys.stdout)
def print_hostnames(self):
print(' '.join(self.yaml_config['all']['hosts'].keys()))
def print_ips(self):
ips = []
for host, opts in self.yaml_config['all']['hosts'].items():
ips.append(self.get_ip_from_opts(opts))
print(' '.join(ips))
def main(argv=None):
if not argv:
argv = sys.argv[1:]
KubesprayInventory(argv, CONFIG_FILE)
return 0
if __name__ == "__main__":
sys.exit(main())

View File

@@ -1,3 +0,0 @@
configparser>=3.3.0
ipaddress
ruamel.yaml>=0.15.88

View File

@@ -1,3 +0,0 @@
[metadata]
name = kubespray-inventory-builder
version = 0.1

View File

@@ -1,29 +0,0 @@
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools
# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
except ImportError:
pass
setuptools.setup(
setup_requires=[],
pbr=False)

View File

@@ -1,3 +0,0 @@
hacking>=0.10.2
mock>=1.3.0
pytest>=2.8.0

View File

@@ -1,595 +0,0 @@
# Copyright 2016 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import inventory
from io import StringIO
import unittest
from unittest import mock
from collections import OrderedDict
import sys
path = "./contrib/inventory_builder/"
if path not in sys.path:
sys.path.append(path)
import inventory # noqa
class TestInventoryPrintHostnames(unittest.TestCase):
@mock.patch('ruamel.yaml.YAML.load')
def test_print_hostnames(self, load_mock):
mock_io = mock.mock_open(read_data='')
load_mock.return_value = OrderedDict({'all': {'hosts': {
'node1': {'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'},
'node2': {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'}}}})
with mock.patch('builtins.open', mock_io):
with self.assertRaises(SystemExit) as cm:
with mock.patch('sys.stdout', new_callable=StringIO) as stdout:
inventory.KubesprayInventory(
changed_hosts=["print_hostnames"],
config_file="file")
self.assertEqual("node1 node2\n", stdout.getvalue())
self.assertEqual(cm.exception.code, 0)
class TestInventory(unittest.TestCase):
@mock.patch('inventory.sys')
def setUp(self, sys_mock):
sys_mock.exit = mock.Mock()
super(TestInventory, self).setUp()
self.data = ['10.90.3.2', '10.90.3.3', '10.90.3.4']
self.inv = inventory.KubesprayInventory()
def test_get_ip_from_opts(self):
optstring = {'ansible_host': '10.90.3.2',
'ip': '10.90.3.2',
'access_ip': '10.90.3.2'}
expected = "10.90.3.2"
result = self.inv.get_ip_from_opts(optstring)
self.assertEqual(expected, result)
def test_get_ip_from_opts_invalid(self):
optstring = "notanaddr=value something random!chars:D"
self.assertRaisesRegex(ValueError, "IP parameter not found",
self.inv.get_ip_from_opts, optstring)
def test_ensure_required_groups(self):
groups = ['group1', 'group2']
self.inv.ensure_required_groups(groups)
for group in groups:
self.assertIn(group, self.inv.yaml_config['all']['children'])
def test_get_host_id(self):
hostnames = ['node99', 'no99de01', '01node01', 'node1.domain',
'node3.xyz123.aaa']
expected = [99, 1, 1, 1, 3]
for hostname, expected in zip(hostnames, expected):
result = self.inv.get_host_id(hostname)
self.assertEqual(expected, result)
def test_get_host_id_invalid(self):
bad_hostnames = ['node', 'no99de', '01node', 'node.111111']
for hostname in bad_hostnames:
self.assertRaisesRegex(ValueError, "Host name must end in an",
self.inv.get_host_id, hostname)
def test_build_hostnames_add_duplicate(self):
changed_hosts = ['10.90.0.2']
expected = OrderedDict([('node3',
{'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'})])
self.inv.yaml_config['all']['hosts'] = expected
result = self.inv.build_hostnames(changed_hosts, True)
self.assertEqual(expected, result)
def test_build_hostnames_add_two(self):
changed_hosts = ['10.90.0.2', '10.90.0.3']
expected = OrderedDict([
('node1', {'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'}),
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'})])
self.inv.yaml_config['all']['hosts'] = OrderedDict()
result = self.inv.build_hostnames(changed_hosts)
self.assertEqual(expected, result)
def test_build_hostnames_add_three(self):
changed_hosts = ['10.90.0.2', '10.90.0.3', '10.90.0.4']
expected = OrderedDict([
('node1', {'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'}),
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'}),
('node3', {'ansible_host': '10.90.0.4',
'ip': '10.90.0.4',
'access_ip': '10.90.0.4'})])
result = self.inv.build_hostnames(changed_hosts)
self.assertEqual(expected, result)
def test_build_hostnames_add_one(self):
changed_hosts = ['10.90.0.2']
expected = OrderedDict([('node1',
{'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'})])
result = self.inv.build_hostnames(changed_hosts)
self.assertEqual(expected, result)
def test_build_hostnames_delete_first(self):
changed_hosts = ['-10.90.0.2']
existing_hosts = OrderedDict([
('node1', {'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'}),
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'})])
self.inv.yaml_config['all']['hosts'] = existing_hosts
expected = OrderedDict([
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'})])
result = self.inv.build_hostnames(changed_hosts, True)
self.assertEqual(expected, result)
def test_build_hostnames_delete_by_hostname(self):
changed_hosts = ['-node1']
existing_hosts = OrderedDict([
('node1', {'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'}),
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'})])
self.inv.yaml_config['all']['hosts'] = existing_hosts
expected = OrderedDict([
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'})])
result = self.inv.build_hostnames(changed_hosts, True)
self.assertEqual(expected, result)
def test_exists_hostname_positive(self):
hostname = 'node1'
expected = True
existing_hosts = OrderedDict([
('node1', {'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'}),
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'})])
result = self.inv.exists_hostname(existing_hosts, hostname)
self.assertEqual(expected, result)
def test_exists_hostname_negative(self):
hostname = 'node99'
expected = False
existing_hosts = OrderedDict([
('node1', {'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'}),
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'})])
result = self.inv.exists_hostname(existing_hosts, hostname)
self.assertEqual(expected, result)
def test_exists_ip_positive(self):
ip = '10.90.0.2'
expected = True
existing_hosts = OrderedDict([
('node1', {'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'}),
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'})])
result = self.inv.exists_ip(existing_hosts, ip)
self.assertEqual(expected, result)
def test_exists_ip_negative(self):
ip = '10.90.0.200'
expected = False
existing_hosts = OrderedDict([
('node1', {'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'}),
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'})])
result = self.inv.exists_ip(existing_hosts, ip)
self.assertEqual(expected, result)
def test_delete_host_by_ip_positive(self):
ip = '10.90.0.2'
expected = OrderedDict([
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'})])
existing_hosts = OrderedDict([
('node1', {'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'}),
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'})])
self.inv.delete_host_by_ip(existing_hosts, ip)
self.assertEqual(expected, existing_hosts)
def test_delete_host_by_ip_negative(self):
ip = '10.90.0.200'
existing_hosts = OrderedDict([
('node1', {'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'}),
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'})])
self.assertRaisesRegex(ValueError, "Unable to find host",
self.inv.delete_host_by_ip, existing_hosts, ip)
def test_purge_invalid_hosts(self):
proper_hostnames = ['node1', 'node2']
bad_host = 'doesnotbelong2'
existing_hosts = OrderedDict([
('node1', {'ansible_host': '10.90.0.2',
'ip': '10.90.0.2',
'access_ip': '10.90.0.2'}),
('node2', {'ansible_host': '10.90.0.3',
'ip': '10.90.0.3',
'access_ip': '10.90.0.3'}),
('doesnotbelong2', {'whateveropts=ilike'})])
self.inv.yaml_config['all']['hosts'] = existing_hosts
self.inv.purge_invalid_hosts(proper_hostnames)
self.assertNotIn(
bad_host, self.inv.yaml_config['all']['hosts'].keys())
def test_add_host_to_group(self):
group = 'etcd'
host = 'node1'
opts = {'ip': '10.90.0.2'}
self.inv.add_host_to_group(group, host, opts)
self.assertEqual(
self.inv.yaml_config['all']['children'][group]['hosts'].get(host),
None)
def test_set_kube_control_plane(self):
group = 'kube_control_plane'
host = 'node1'
self.inv.set_kube_control_plane([host])
self.assertIn(
host, self.inv.yaml_config['all']['children'][group]['hosts'])
def test_set_all(self):
hosts = OrderedDict([
('node1', 'opt1'),
('node2', 'opt2')])
self.inv.set_all(hosts)
for host, opt in hosts.items():
self.assertEqual(
self.inv.yaml_config['all']['hosts'].get(host), opt)
def test_set_k8s_cluster(self):
group = 'k8s_cluster'
expected_hosts = ['kube_node', 'kube_control_plane']
self.inv.set_k8s_cluster()
for host in expected_hosts:
self.assertIn(
host,
self.inv.yaml_config['all']['children'][group]['children'])
def test_set_kube_node(self):
group = 'kube_node'
host = 'node1'
self.inv.set_kube_node([host])
self.assertIn(
host, self.inv.yaml_config['all']['children'][group]['hosts'])
def test_set_etcd(self):
group = 'etcd'
host = 'node1'
self.inv.set_etcd([host])
self.assertIn(
host, self.inv.yaml_config['all']['children'][group]['hosts'])
def test_scale_scenario_one(self):
num_nodes = 50
hosts = OrderedDict()
for hostid in range(1, num_nodes+1):
hosts["node" + str(hostid)] = ""
self.inv.set_all(hosts)
self.inv.set_etcd(list(hosts.keys())[0:3])
self.inv.set_kube_control_plane(list(hosts.keys())[0:2])
self.inv.set_kube_node(hosts.keys())
for h in range(3):
self.assertFalse(
list(hosts.keys())[h] in
self.inv.yaml_config['all']['children']['kube_node']['hosts'])
def test_scale_scenario_two(self):
num_nodes = 500
hosts = OrderedDict()
for hostid in range(1, num_nodes+1):
hosts["node" + str(hostid)] = ""
self.inv.set_all(hosts)
self.inv.set_etcd(list(hosts.keys())[0:3])
self.inv.set_kube_control_plane(list(hosts.keys())[3:5])
self.inv.set_kube_node(hosts.keys())
for h in range(5):
self.assertFalse(
list(hosts.keys())[h] in
self.inv.yaml_config['all']['children']['kube_node']['hosts'])
def test_range2ips_range(self):
changed_hosts = ['10.90.0.2', '10.90.0.4-10.90.0.6', '10.90.0.8']
expected = ['10.90.0.2',
'10.90.0.4',
'10.90.0.5',
'10.90.0.6',
'10.90.0.8']
result = self.inv.range2ips(changed_hosts)
self.assertEqual(expected, result)
def test_range2ips_incorrect_range(self):
host_range = ['10.90.0.4-a.9b.c.e']
self.assertRaisesRegex(Exception, "Range of ip_addresses isn't valid",
self.inv.range2ips, host_range)
def test_build_hostnames_create_with_one_different_ips(self):
changed_hosts = ['10.90.0.2,192.168.0.2']
expected = OrderedDict([('node1',
{'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'})])
result = self.inv.build_hostnames(changed_hosts)
self.assertEqual(expected, result)
def test_build_hostnames_create_with_two_different_ips(self):
changed_hosts = ['10.90.0.2,192.168.0.2', '10.90.0.3,192.168.0.3']
expected = OrderedDict([
('node1', {'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'}),
('node2', {'ansible_host': '192.168.0.3',
'ip': '10.90.0.3',
'access_ip': '192.168.0.3'})])
result = self.inv.build_hostnames(changed_hosts)
self.assertEqual(expected, result)
def test_build_hostnames_create_with_three_different_ips(self):
changed_hosts = ['10.90.0.2,192.168.0.2',
'10.90.0.3,192.168.0.3',
'10.90.0.4,192.168.0.4']
expected = OrderedDict([
('node1', {'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'}),
('node2', {'ansible_host': '192.168.0.3',
'ip': '10.90.0.3',
'access_ip': '192.168.0.3'}),
('node3', {'ansible_host': '192.168.0.4',
'ip': '10.90.0.4',
'access_ip': '192.168.0.4'})])
result = self.inv.build_hostnames(changed_hosts)
self.assertEqual(expected, result)
def test_build_hostnames_overwrite_one_with_different_ips(self):
changed_hosts = ['10.90.0.2,192.168.0.2']
expected = OrderedDict([('node1',
{'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'})])
existing = OrderedDict([('node5',
{'ansible_host': '192.168.0.5',
'ip': '10.90.0.5',
'access_ip': '192.168.0.5'})])
self.inv.yaml_config['all']['hosts'] = existing
result = self.inv.build_hostnames(changed_hosts)
self.assertEqual(expected, result)
def test_build_hostnames_overwrite_three_with_different_ips(self):
changed_hosts = ['10.90.0.2,192.168.0.2']
expected = OrderedDict([('node1',
{'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'})])
existing = OrderedDict([
('node3', {'ansible_host': '192.168.0.3',
'ip': '10.90.0.3',
'access_ip': '192.168.0.3'}),
('node4', {'ansible_host': '192.168.0.4',
'ip': '10.90.0.4',
'access_ip': '192.168.0.4'}),
('node5', {'ansible_host': '192.168.0.5',
'ip': '10.90.0.5',
'access_ip': '192.168.0.5'})])
self.inv.yaml_config['all']['hosts'] = existing
result = self.inv.build_hostnames(changed_hosts)
self.assertEqual(expected, result)
def test_build_hostnames_different_ips_add_duplicate(self):
changed_hosts = ['10.90.0.2,192.168.0.2']
expected = OrderedDict([('node3',
{'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'})])
existing = expected
self.inv.yaml_config['all']['hosts'] = existing
result = self.inv.build_hostnames(changed_hosts, True)
self.assertEqual(expected, result)
def test_build_hostnames_add_two_different_ips_into_one_existing(self):
changed_hosts = ['10.90.0.3,192.168.0.3', '10.90.0.4,192.168.0.4']
expected = OrderedDict([
('node2', {'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'}),
('node3', {'ansible_host': '192.168.0.3',
'ip': '10.90.0.3',
'access_ip': '192.168.0.3'}),
('node4', {'ansible_host': '192.168.0.4',
'ip': '10.90.0.4',
'access_ip': '192.168.0.4'})])
existing = OrderedDict([
('node2', {'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'})])
self.inv.yaml_config['all']['hosts'] = existing
result = self.inv.build_hostnames(changed_hosts, True)
self.assertEqual(expected, result)
def test_build_hostnames_add_two_different_ips_into_two_existing(self):
changed_hosts = ['10.90.0.4,192.168.0.4', '10.90.0.5,192.168.0.5']
expected = OrderedDict([
('node2', {'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'}),
('node3', {'ansible_host': '192.168.0.3',
'ip': '10.90.0.3',
'access_ip': '192.168.0.3'}),
('node4', {'ansible_host': '192.168.0.4',
'ip': '10.90.0.4',
'access_ip': '192.168.0.4'}),
('node5', {'ansible_host': '192.168.0.5',
'ip': '10.90.0.5',
'access_ip': '192.168.0.5'})])
existing = OrderedDict([
('node2', {'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'}),
('node3', {'ansible_host': '192.168.0.3',
'ip': '10.90.0.3',
'access_ip': '192.168.0.3'})])
self.inv.yaml_config['all']['hosts'] = existing
result = self.inv.build_hostnames(changed_hosts, True)
self.assertEqual(expected, result)
def test_build_hostnames_add_two_different_ips_into_three_existing(self):
changed_hosts = ['10.90.0.5,192.168.0.5', '10.90.0.6,192.168.0.6']
expected = OrderedDict([
('node2', {'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'}),
('node3', {'ansible_host': '192.168.0.3',
'ip': '10.90.0.3',
'access_ip': '192.168.0.3'}),
('node4', {'ansible_host': '192.168.0.4',
'ip': '10.90.0.4',
'access_ip': '192.168.0.4'}),
('node5', {'ansible_host': '192.168.0.5',
'ip': '10.90.0.5',
'access_ip': '192.168.0.5'}),
('node6', {'ansible_host': '192.168.0.6',
'ip': '10.90.0.6',
'access_ip': '192.168.0.6'})])
existing = OrderedDict([
('node2', {'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'}),
('node3', {'ansible_host': '192.168.0.3',
'ip': '10.90.0.3',
'access_ip': '192.168.0.3'}),
('node4', {'ansible_host': '192.168.0.4',
'ip': '10.90.0.4',
'access_ip': '192.168.0.4'})])
self.inv.yaml_config['all']['hosts'] = existing
result = self.inv.build_hostnames(changed_hosts, True)
self.assertEqual(expected, result)
# Add two IP addresses into a config that has
# three already defined IP addresses. One of the IP addresses
# is a duplicate.
def test_build_hostnames_add_two_duplicate_one_overlap(self):
changed_hosts = ['10.90.0.4,192.168.0.4', '10.90.0.5,192.168.0.5']
expected = OrderedDict([
('node2', {'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'}),
('node3', {'ansible_host': '192.168.0.3',
'ip': '10.90.0.3',
'access_ip': '192.168.0.3'}),
('node4', {'ansible_host': '192.168.0.4',
'ip': '10.90.0.4',
'access_ip': '192.168.0.4'}),
('node5', {'ansible_host': '192.168.0.5',
'ip': '10.90.0.5',
'access_ip': '192.168.0.5'})])
existing = OrderedDict([
('node2', {'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'}),
('node3', {'ansible_host': '192.168.0.3',
'ip': '10.90.0.3',
'access_ip': '192.168.0.3'}),
('node4', {'ansible_host': '192.168.0.4',
'ip': '10.90.0.4',
'access_ip': '192.168.0.4'})])
self.inv.yaml_config['all']['hosts'] = existing
result = self.inv.build_hostnames(changed_hosts, True)
self.assertEqual(expected, result)
# Add two duplicate IP addresses into a config that has
# three already defined IP addresses
def test_build_hostnames_add_two_duplicate_two_overlap(self):
changed_hosts = ['10.90.0.3,192.168.0.3', '10.90.0.4,192.168.0.4']
expected = OrderedDict([
('node2', {'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'}),
('node3', {'ansible_host': '192.168.0.3',
'ip': '10.90.0.3',
'access_ip': '192.168.0.3'}),
('node4', {'ansible_host': '192.168.0.4',
'ip': '10.90.0.4',
'access_ip': '192.168.0.4'})])
existing = OrderedDict([
('node2', {'ansible_host': '192.168.0.2',
'ip': '10.90.0.2',
'access_ip': '192.168.0.2'}),
('node3', {'ansible_host': '192.168.0.3',
'ip': '10.90.0.3',
'access_ip': '192.168.0.3'}),
('node4', {'ansible_host': '192.168.0.4',
'ip': '10.90.0.4',
'access_ip': '192.168.0.4'})])
self.inv.yaml_config['all']['hosts'] = existing
result = self.inv.build_hostnames(changed_hosts, True)
self.assertEqual(expected, result)

View File

@@ -1,28 +0,0 @@
[tox]
minversion = 1.6
skipsdist = True
envlist = pep8, py33
[testenv]
whitelist_externals = py.test
usedevelop = True
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
setenv = VIRTUAL_ENV={envdir}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
commands = pytest -vv #{posargs:./tests}
[testenv:pep8]
usedevelop = False
whitelist_externals = bash
commands =
bash -c "find {toxinidir}/* -type f -name '*.py' -print0 | xargs -0 flake8"
[testenv:venv]
commands = {posargs}
[flake8]
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg

View File

@@ -1,11 +0,0 @@
# Kubespray on KVM Virtual Machines hypervisor preparation
A simple playbook to ensure your system has the right settings to enable Kubespray
deployment on VMs.
This playbook does not create Virtual Machines, nor does it run Kubespray itself.
## User creation
If you want to create a user for running Kubespray deployment, you should specify
both `k8s_deployment_user` and `k8s_deployment_user_pkey_path`.

View File

@@ -1,2 +0,0 @@
#k8s_deployment_user: kubespray
#k8s_deployment_user_pkey_path: /tmp/ssh_rsa

View File

@@ -1,8 +0,0 @@
---
- hosts: localhost
gather_facts: False
become: yes
vars:
- bootstrap_os: none
roles:
- kvm-setup

View File

@@ -1,30 +0,0 @@
---
- name: Install required packages
package:
name: "{{ item }}"
state: present
with_items:
- bind-utils
- ntp
when: ansible_os_family == "RedHat"
- name: Install required packages
apt:
upgrade: yes
update_cache: yes
cache_valid_time: 3600
name: "{{ item }}"
state: present
install_recommends: no
with_items:
- dnsutils
- ntp
when: ansible_os_family == "Debian"
# Create deployment user if required
- include: user.yml
when: k8s_deployment_user is defined
# Set proper sysctl values
- include: sysctl.yml

View File

@@ -1,46 +0,0 @@
---
- name: Load br_netfilter module
modprobe:
name: br_netfilter
state: present
register: br_netfilter
- name: Add br_netfilter into /etc/modules
lineinfile:
dest: /etc/modules
state: present
line: 'br_netfilter'
when: br_netfilter is defined and ansible_os_family == 'Debian'
- name: Add br_netfilter into /etc/modules-load.d/kubespray.conf
copy:
dest: /etc/modules-load.d/kubespray.conf
content: |-
### This file is managed by Ansible
br-netfilter
owner: root
group: root
mode: 0644
when: br_netfilter is defined
- name: Enable net.ipv4.ip_forward in sysctl
sysctl:
name: net.ipv4.ip_forward
value: 1
sysctl_file: "{{ sysctl_file_path }}"
state: present
reload: yes
- name: Set bridge-nf-call-{arptables,iptables} to 0
sysctl:
name: "{{ item }}"
state: present
value: 0
sysctl_file: "{{ sysctl_file_path }}"
reload: yes
with_items:
- net.bridge.bridge-nf-call-arptables
- net.bridge.bridge-nf-call-ip6tables
- net.bridge.bridge-nf-call-iptables
when: br_netfilter is defined

View File

@@ -1,47 +0,0 @@
---
- name: Create user {{ k8s_deployment_user }}
user:
name: "{{ k8s_deployment_user }}"
groups: adm
shell: /bin/bash
- name: Ensure that .ssh exists
file:
path: "/home/{{ k8s_deployment_user }}/.ssh"
state: directory
owner: "{{ k8s_deployment_user }}"
group: "{{ k8s_deployment_user }}"
mode: 0700
- name: Configure sudo for deployment user
copy:
content: |
%{{ k8s_deployment_user }} ALL=(ALL) NOPASSWD: ALL
dest: "/etc/sudoers.d/55-k8s-deployment"
owner: root
group: root
mode: 0644
- name: Write private SSH key
copy:
src: "{{ k8s_deployment_user_pkey_path }}"
dest: "/home/{{ k8s_deployment_user }}/.ssh/id_rsa"
mode: 0400
owner: "{{ k8s_deployment_user }}"
group: "{{ k8s_deployment_user }}"
when: k8s_deployment_user_pkey_path is defined
- name: Write public SSH key
shell: "ssh-keygen -y -f /home/{{ k8s_deployment_user }}/.ssh/id_rsa \
> /home/{{ k8s_deployment_user }}/.ssh/authorized_keys"
args:
creates: "/home/{{ k8s_deployment_user }}/.ssh/authorized_keys"
when: k8s_deployment_user_pkey_path is defined
- name: Fix ssh-pub-key permissions
file:
path: "/home/{{ k8s_deployment_user }}/.ssh/authorized_keys"
mode: 0600
owner: "{{ k8s_deployment_user }}"
group: "{{ k8s_deployment_user }}"
when: k8s_deployment_user_pkey_path is defined

View File

@@ -1,15 +0,0 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kubernetes-dashboard
labels:
k8s-app: kubernetes-dashboard
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: kubernetes-dashboard
namespace: kube-system

View File

@@ -1,49 +0,0 @@
---
- name: Check ansible version
import_playbook: ansible_version.yml
- hosts: localhost
strategy: linear
vars:
mitogen_version: 0.3.2
mitogen_url: https://github.com/mitogen-hq/mitogen/archive/refs/tags/v{{ mitogen_version }}.tar.gz
ansible_connection: local
tasks:
- name: Create mitogen plugin dir
file:
path: "{{ item }}"
state: directory
mode: 0755
become: false
loop:
- "{{ playbook_dir }}/plugins/mitogen"
- "{{ playbook_dir }}/dist"
- name: download mitogen release
get_url:
url: "{{ mitogen_url }}"
dest: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.tar.gz"
validate_certs: true
- name: extract archive
unarchive:
src: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.tar.gz"
dest: "{{ playbook_dir }}/dist/"
- name: copy plugin
synchronize:
src: "{{ playbook_dir }}/dist/mitogen-{{ mitogen_version }}/"
dest: "{{ playbook_dir }}/plugins/mitogen"
- name: add strategy to ansible.cfg
ini_file:
path: ansible.cfg
mode: 0644
section: "{{ item.section | d('defaults') }}"
option: "{{ item.option }}"
value: "{{ item.value }}"
with_items:
- option: strategy
value: mitogen_linear
- option: strategy_plugins
value: plugins/mitogen/ansible_mitogen/plugins/strategy

View File

@@ -1,92 +0,0 @@
# Deploying a Kubespray Kubernetes Cluster with GlusterFS
You can either deploy using Ansible on its own by supplying your own inventory file or by using Terraform to create the VMs and then providing a dynamic inventory to Ansible. The following two sections are self-contained, you don't need to go through one to use the other. So, if you want to provision with Terraform, you can skip the **Using an Ansible inventory** section, and if you want to provision with a pre-built ansible inventory, you can neglect the **Using Terraform and Ansible** section.
## Using an Ansible inventory
In the same directory of this ReadMe file you should find a file named `inventory.example` which contains an example setup. Please note that, additionally to the Kubernetes nodes/masters, we define a set of machines for GlusterFS and we add them to the group `[gfs-cluster]`, which in turn is added to the larger `[network-storage]` group as a child group.
Change that file to reflect your local setup (adding more machines or removing them and setting the adequate ip numbers), and save it to `inventory/sample/k8s_gfs_inventory`. Make sure that the settings on `inventory/sample/group_vars/all.yml` make sense with your deployment. Then execute change to the kubespray root folder, and execute (supposing that the machines are all using ubuntu):
```shell
ansible-playbook -b --become-user=root -i inventory/sample/k8s_gfs_inventory --user=ubuntu ./cluster.yml
```
This will provision your Kubernetes cluster. Then, to provision and configure the GlusterFS cluster, from the same directory execute:
```shell
ansible-playbook -b --become-user=root -i inventory/sample/k8s_gfs_inventory --user=ubuntu ./contrib/network-storage/glusterfs/glusterfs.yml
```
If your machines are not using Ubuntu, you need to change the `--user=ubuntu` to the correct user. Alternatively, if your Kubernetes machines are using one OS and your GlusterFS a different one, you can instead specify the `ansible_ssh_user=<correct-user>` variable in the inventory file that you just created, for each machine/VM:
```shell
k8s-master-1 ansible_ssh_host=192.168.0.147 ip=192.168.0.147 ansible_ssh_user=core
k8s-master-node-1 ansible_ssh_host=192.168.0.148 ip=192.168.0.148 ansible_ssh_user=core
k8s-master-node-2 ansible_ssh_host=192.168.0.146 ip=192.168.0.146 ansible_ssh_user=core
```
## Using Terraform and Ansible
First step is to fill in a `my-kubespray-gluster-cluster.tfvars` file with the specification desired for your cluster. An example with all required variables would look like:
```ini
cluster_name = "cluster1"
number_of_k8s_masters = "1"
number_of_k8s_masters_no_floating_ip = "2"
number_of_k8s_nodes_no_floating_ip = "0"
number_of_k8s_nodes = "0"
public_key_path = "~/.ssh/my-desired-key.pub"
image = "Ubuntu 16.04"
ssh_user = "ubuntu"
flavor_k8s_node = "node-flavor-id-in-your-openstack"
flavor_k8s_master = "master-flavor-id-in-your-openstack"
network_name = "k8s-network"
floatingip_pool = "net_external"
# GlusterFS variables
flavor_gfs_node = "gluster-flavor-id-in-your-openstack"
image_gfs = "Ubuntu 16.04"
number_of_gfs_nodes_no_floating_ip = "3"
gfs_volume_size_in_gb = "50"
ssh_user_gfs = "ubuntu"
```
As explained in the general terraform/openstack guide, you need to source your OpenStack credentials file, add your ssh-key to the ssh-agent and setup environment variables for terraform:
```shell
$ source ~/.stackrc
$ eval $(ssh-agent -s)
$ ssh-add ~/.ssh/my-desired-key
$ echo Setting up Terraform creds && \
export TF_VAR_username=${OS_USERNAME} && \
export TF_VAR_password=${OS_PASSWORD} && \
export TF_VAR_tenant=${OS_TENANT_NAME} && \
export TF_VAR_auth_url=${OS_AUTH_URL}
```
Then, standing on the kubespray directory (root base of the Git checkout), issue the following terraform command to create the VMs for the cluster:
```shell
terraform apply -state=contrib/terraform/openstack/terraform.tfstate -var-file=my-kubespray-gluster-cluster.tfvars contrib/terraform/openstack
```
This will create both your Kubernetes and Gluster VMs. Make sure that the ansible file `contrib/terraform/openstack/group_vars/all.yml` includes any ansible variable that you want to setup (like, for instance, the type of machine for bootstrapping).
Then, provision your Kubernetes (kubespray) cluster with the following ansible call:
```shell
ansible-playbook -b --become-user=root -i contrib/terraform/openstack/hosts ./cluster.yml
```
Finally, provision the glusterfs nodes and add the Persistent Volume setup for GlusterFS in Kubernetes through the following ansible call:
```shell
ansible-playbook -b --become-user=root -i contrib/terraform/openstack/hosts ./contrib/network-storage/glusterfs/glusterfs.yml
```
If you need to destroy the cluster, you can run:
```shell
terraform destroy -state=contrib/terraform/openstack/terraform.tfstate -var-file=my-kubespray-gluster-cluster.tfvars contrib/terraform/openstack
```

View File

@@ -1,24 +0,0 @@
---
- hosts: gfs-cluster
gather_facts: false
vars:
ansible_ssh_pipelining: false
roles:
- { role: bootstrap-os, tags: bootstrap-os}
- hosts: all
gather_facts: true
- hosts: gfs-cluster
vars:
ansible_ssh_pipelining: true
roles:
- { role: glusterfs/server }
- hosts: k8s_cluster
roles:
- { role: glusterfs/client }
- hosts: kube_control_plane[0]
roles:
- { role: kubernetes-pv }

View File

@@ -1 +0,0 @@
../../../inventory/local/group_vars

View File

@@ -1,43 +0,0 @@
# ## Configure 'ip' variable to bind kubernetes services on a
# ## different ip than the default iface
# node1 ansible_ssh_host=95.54.0.12 # ip=10.3.0.1
# node2 ansible_ssh_host=95.54.0.13 # ip=10.3.0.2
# node3 ansible_ssh_host=95.54.0.14 # ip=10.3.0.3
# node4 ansible_ssh_host=95.54.0.15 # ip=10.3.0.4
# node5 ansible_ssh_host=95.54.0.16 # ip=10.3.0.5
# node6 ansible_ssh_host=95.54.0.17 # ip=10.3.0.6
#
# ## GlusterFS nodes
# ## Set disk_volume_device_1 to desired device for gluster brick, if different to /dev/vdb (default).
# ## As in the previous case, you can set ip to give direct communication on internal IPs
# gfs_node1 ansible_ssh_host=95.54.0.18 # disk_volume_device_1=/dev/vdc ip=10.3.0.7
# gfs_node2 ansible_ssh_host=95.54.0.19 # disk_volume_device_1=/dev/vdc ip=10.3.0.8
# gfs_node3 ansible_ssh_host=95.54.0.20 # disk_volume_device_1=/dev/vdc ip=10.3.0.9
# [kube_control_plane]
# node1
# node2
# [etcd]
# node1
# node2
# node3
# [kube_node]
# node2
# node3
# node4
# node5
# node6
# [k8s_cluster:children]
# kube_node
# kube_control_plane
# [gfs-cluster]
# gfs_node1
# gfs_node2
# gfs_node3
# [network-storage:children]
# gfs-cluster

View File

@@ -1 +0,0 @@
../../../../roles/bootstrap-os

View File

@@ -1,50 +0,0 @@
# Ansible Role: GlusterFS
[![Build Status](https://travis-ci.org/geerlingguy/ansible-role-glusterfs.svg?branch=master)](https://travis-ci.org/geerlingguy/ansible-role-glusterfs)
Installs and configures GlusterFS on Linux.
## Requirements
For GlusterFS to connect between servers, TCP ports `24007`, `24008`, and `24009`/`49152`+ (that port, plus an additional incremented port for each additional server in the cluster; the latter if GlusterFS is version 3.4+), and TCP/UDP port `111` must be open. You can open these using whatever firewall you wish (this can easily be configured using the `geerlingguy.firewall` role).
This role performs basic installation and setup of Gluster, but it does not configure or mount bricks (volumes), since that step is easier to do in a series of plays in your own playbook. Ansible 1.9+ includes the [`gluster_volume`](https://docs.ansible.com/ansible/latest/collections/gluster/gluster/gluster_volume_module.html) module to ease the management of Gluster volumes.
## Role Variables
Available variables are listed below, along with default values (see `defaults/main.yml`):
```yaml
glusterfs_default_release: ""
```
You can specify a `default_release` for apt on Debian/Ubuntu by overriding this variable. This is helpful if you need a different package or version for the main GlusterFS packages (e.g. GlusterFS 3.5.x instead of 3.2.x with the `wheezy-backports` default release on Debian Wheezy).
```yaml
glusterfs_ppa_use: yes
glusterfs_ppa_version: "3.5"
```
For Ubuntu, specify whether to use the official Gluster PPA, and which version of the PPA to use. See Gluster's [Getting Started Guide](https://docs.gluster.org/en/latest/Quick-Start-Guide/Quickstart/) for more info.
## Dependencies
None.
## Example Playbook
```yaml
- hosts: server
roles:
- geerlingguy.glusterfs
```
For a real-world use example, read through [Simple GlusterFS Setup with Ansible](http://www.jeffgeerling.com/blog/simple-glusterfs-setup-ansible), a blog post by this role's author, which is included in Chapter 8 of [Ansible for DevOps](https://www.ansiblefordevops.com/).
## License
MIT / BSD
## Author Information
This role was created in 2015 by [Jeff Geerling](http://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).

View File

@@ -1,11 +0,0 @@
---
# For Ubuntu.
glusterfs_default_release: ""
glusterfs_ppa_use: yes
glusterfs_ppa_version: "4.1"
# Gluster configuration.
gluster_mount_dir: /mnt/gluster
gluster_volume_node_mount_dir: /mnt/xfs-drive-gluster
gluster_brick_dir: "{{ gluster_volume_node_mount_dir }}/brick"
gluster_brick_name: gluster

View File

@@ -1,30 +0,0 @@
---
dependencies: []
galaxy_info:
author: geerlingguy
description: GlusterFS installation for Linux.
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
min_ansible_version: 2.0
platforms:
- name: EL
versions:
- 6
- 7
- name: Ubuntu
versions:
- precise
- trusty
- xenial
- name: Debian
versions:
- wheezy
- jessie
galaxy_tags:
- system
- networking
- cloud
- clustering
- files
- sharing

View File

@@ -1,16 +0,0 @@
---
# This is meant for Ubuntu and RedHat installations, where apparently the glusterfs-client is not used from inside
# hyperkube and needs to be installed as part of the system.
# Setup/install tasks.
- include: setup-RedHat.yml
when: ansible_os_family == 'RedHat' and groups['gfs-cluster'] is defined
- include: setup-Debian.yml
when: ansible_os_family == 'Debian' and groups['gfs-cluster'] is defined
- name: Ensure Gluster mount directories exist.
file: "path={{ item }} state=directory mode=0775"
with_items:
- "{{ gluster_mount_dir }}"
when: ansible_os_family in ["Debian","RedHat"] and groups['gfs-cluster'] is defined

View File

@@ -1,24 +0,0 @@
---
- name: Add PPA for GlusterFS.
apt_repository:
repo: 'ppa:gluster/glusterfs-{{ glusterfs_ppa_version }}'
state: present
update_cache: yes
register: glusterfs_ppa_added
when: glusterfs_ppa_use
- name: Ensure GlusterFS client will reinstall if the PPA was just added. # noqa 503
apt:
name: "{{ item }}"
state: absent
with_items:
- glusterfs-client
when: glusterfs_ppa_added.changed
- name: Ensure GlusterFS client is installed.
apt:
name: "{{ item }}"
state: present
default_release: "{{ glusterfs_default_release }}"
with_items:
- glusterfs-client

View File

@@ -1,10 +0,0 @@
---
- name: Install Prerequisites
package: name={{ item }} state=present
with_items:
- "centos-release-gluster{{ glusterfs_default_release }}"
- name: Install Packages
package: name={{ item }} state=present
with_items:
- glusterfs-client

View File

@@ -1,13 +0,0 @@
---
# For Ubuntu.
glusterfs_default_release: ""
glusterfs_ppa_use: yes
glusterfs_ppa_version: "3.12"
# Gluster configuration.
gluster_mount_dir: /mnt/gluster
gluster_volume_node_mount_dir: /mnt/xfs-drive-gluster
gluster_brick_dir: "{{ gluster_volume_node_mount_dir }}/brick"
gluster_brick_name: gluster
# Default device to mount for xfs formatting, terraform overrides this by setting the variable in the inventory.
disk_volume_device_1: /dev/vdb

View File

@@ -1,30 +0,0 @@
---
dependencies: []
galaxy_info:
author: geerlingguy
description: GlusterFS installation for Linux.
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
min_ansible_version: 2.0
platforms:
- name: EL
versions:
- 6
- 7
- name: Ubuntu
versions:
- precise
- trusty
- xenial
- name: Debian
versions:
- wheezy
- jessie
galaxy_tags:
- system
- networking
- cloud
- clustering
- files
- sharing

View File

@@ -1,94 +0,0 @@
---
# Include variables and define needed variables.
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"
# Install xfs package
- name: install xfs Debian
apt: name=xfsprogs state=present
when: ansible_os_family == "Debian"
- name: install xfs RedHat
package: name=xfsprogs state=present
when: ansible_os_family == "RedHat"
# Format external volumes in xfs
- name: Format volumes in xfs
filesystem: "fstype=xfs dev={{ disk_volume_device_1 }}"
# Mount external volumes
- name: mounting new xfs filesystem
mount: "name={{ gluster_volume_node_mount_dir }} src={{ disk_volume_device_1 }} fstype=xfs state=mounted"
# Setup/install tasks.
- include: setup-RedHat.yml
when: ansible_os_family == 'RedHat'
- include: setup-Debian.yml
when: ansible_os_family == 'Debian'
- name: Ensure GlusterFS is started and enabled at boot.
service: "name={{ glusterfs_daemon }} state=started enabled=yes"
- name: Ensure Gluster brick and mount directories exist.
file: "path={{ item }} state=directory mode=0775"
with_items:
- "{{ gluster_brick_dir }}"
- "{{ gluster_mount_dir }}"
- name: Configure Gluster volume with replicas
gluster_volume:
state: present
name: "{{ gluster_brick_name }}"
brick: "{{ gluster_brick_dir }}"
replicas: "{{ groups['gfs-cluster'] | length }}"
cluster: "{% for item in groups['gfs-cluster'] -%}{{ hostvars[item]['ip']|default(hostvars[item].ansible_default_ipv4['address']) }}{% if not loop.last %},{% endif %}{%- endfor %}"
host: "{{ inventory_hostname }}"
force: yes
run_once: true
when: groups['gfs-cluster']|length > 1
- name: Configure Gluster volume without replicas
gluster_volume:
state: present
name: "{{ gluster_brick_name }}"
brick: "{{ gluster_brick_dir }}"
cluster: "{% for item in groups['gfs-cluster'] -%}{{ hostvars[item]['ip']|default(hostvars[item].ansible_default_ipv4['address']) }}{% if not loop.last %},{% endif %}{%- endfor %}"
host: "{{ inventory_hostname }}"
force: yes
run_once: true
when: groups['gfs-cluster']|length <= 1
- name: Mount glusterfs to retrieve disk size
mount:
name: "{{ gluster_mount_dir }}"
src: "{{ ip|default(ansible_default_ipv4['address']) }}:/gluster"
fstype: glusterfs
opts: "defaults,_netdev"
state: mounted
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
- name: Get Gluster disk size
setup: filter=ansible_mounts
register: mounts_data
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
- name: Set Gluster disk size to variable
set_fact:
gluster_disk_size_gb: "{{ (mounts_data.ansible_facts.ansible_mounts | selectattr('mount', 'equalto', gluster_mount_dir) | map(attribute='size_total') | first | int / (1024*1024*1024)) | int }}"
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
- name: Create file on GlusterFS
template:
dest: "{{ gluster_mount_dir }}/.test-file.txt"
src: test-file.txt
mode: 0644
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
- name: Unmount glusterfs
mount:
name: "{{ gluster_mount_dir }}"
fstype: glusterfs
src: "{{ ip|default(ansible_default_ipv4['address']) }}:/gluster"
state: unmounted
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]

View File

@@ -1,26 +0,0 @@
---
- name: Add PPA for GlusterFS.
apt_repository:
repo: 'ppa:gluster/glusterfs-{{ glusterfs_ppa_version }}'
state: present
update_cache: yes
register: glusterfs_ppa_added
when: glusterfs_ppa_use
- name: Ensure GlusterFS will reinstall if the PPA was just added. # noqa 503
apt:
name: "{{ item }}"
state: absent
with_items:
- glusterfs-server
- glusterfs-client
when: glusterfs_ppa_added.changed
- name: Ensure GlusterFS is installed.
apt:
name: "{{ item }}"
state: present
default_release: "{{ glusterfs_default_release }}"
with_items:
- glusterfs-server
- glusterfs-client

View File

@@ -1,11 +0,0 @@
---
- name: Install Prerequisites
package: name={{ item }} state=present
with_items:
- "centos-release-gluster{{ glusterfs_default_release }}"
- name: Install Packages
package: name={{ item }} state=present
with_items:
- glusterfs-server
- glusterfs-client

View File

@@ -1,2 +0,0 @@
---
glusterfs_daemon: glusterd

View File

@@ -1,2 +0,0 @@
---
glusterfs_daemon: glusterd

View File

@@ -1,23 +0,0 @@
---
- name: Kubernetes Apps | Lay Down k8s GlusterFS Endpoint and PV
template:
src: "{{ item.file }}"
dest: "{{ kube_config_dir }}/{{ item.dest }}"
mode: 0644
with_items:
- { file: glusterfs-kubernetes-endpoint.json.j2, type: ep, dest: glusterfs-kubernetes-endpoint.json}
- { file: glusterfs-kubernetes-pv.yml.j2, type: pv, dest: glusterfs-kubernetes-pv.yml}
- { file: glusterfs-kubernetes-endpoint-svc.json.j2, type: svc, dest: glusterfs-kubernetes-endpoint-svc.json}
register: gluster_pv
when: inventory_hostname == groups['kube_control_plane'][0] and groups['gfs-cluster'] is defined and hostvars[groups['gfs-cluster'][0]].gluster_disk_size_gb is defined
- name: Kubernetes Apps | Set GlusterFS endpoint and PV
kube:
name: glusterfs
namespace: default
kubectl: "{{ bin_dir }}/kubectl"
resource: "{{ item.item.type }}"
filename: "{{ kube_config_dir }}/{{ item.item.dest }}"
state: "{{ item.changed | ternary('latest','present') }}"
with_items: "{{ gluster_pv.results }}"
when: inventory_hostname == groups['kube_control_plane'][0] and groups['gfs-cluster'] is defined

View File

@@ -1,12 +0,0 @@
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "glusterfs"
},
"spec": {
"ports": [
{"port": 1}
]
}
}

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