Compare commits

...

81 Commits

Author SHA1 Message Date
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
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
5f18fe739e Restart kube-proxy pods only on configmap changes (#11401) 2024-08-06 00:50:50 -07:00
343d680371 fix kylin OS choose NetworkManager (#11406)
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
2024-08-05 03:34:59 -07:00
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
4e99b94dcc Add generic post upgrade hooks for node (#11368) 2024-07-31 21:58:48 -07:00
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
2799f11475 Add support for LB in upcloud private zone (#11260) 2024-07-31 21:58:30 -07:00
8d497b49a6 [kubernetes] Add hashes for kubernetes 1.29.7, 1.28.[11-12] (#11407) 2024-07-31 03:50:56 -07:00
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
d469503e84 Make netchecker log levels configurable (#11334)
* Make netchecker log levels configurable

* use ETCD_LOG_LEVEL
2024-07-28 23:57:56 -07:00
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
468c5641b2 fix kube_reserved so it only controls kubeReservedCgroup (#11367) 2024-07-26 01:39:20 -07:00
2299e49e0e [containerd/tracing]: fix containerd tracing templating (#11372)
Signed-off-by: Ugur Ozturk <ugurozturk918@gmail.com>
2024-07-26 01:30:38 -07:00
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
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
8208a3f04f Rename systemd module to systemd_service (#11396)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2024-07-26 01:11:39 -07:00
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
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
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
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
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
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
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
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
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
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
2615805da2 Increase ansible timeout to 300 (#11354) 2024-07-10 19:19:24 -07:00
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
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
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
a0d03d9fa6 [kubernetes] Support kubernetes 1.30.2 (#11343) 2024-07-03 00:06:20 -07:00
0bcedd4603 Make local_volume_provisioner log level configurable (#11336) 2024-07-02 07:14:06 -07:00
413572eced Make calico-kube-controllers log level configurable (#11335) 2024-07-02 07:13:59 -07:00
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
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
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
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
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
ff18f65a17 add ingress controller svc nodeport param (#11310) 2024-06-30 21:58:05 -07:00
35e904d7c3 fix image and kube-vip links (#11267) 2024-06-28 18:42:06 -07:00
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
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
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
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
88b502f29d add ingress controller admission svc (#11309) 2024-06-26 02:30:41 -07:00
db316a566d dependencies for kubelet.service (#11297)
Signed-off-by: serge Hartmann <serge.hartmann@gmail.com>
2024-06-26 02:30:34 -07:00
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
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
cae266a045 Upgrade upcloud csi driver to v1.1.0 and add snapshot features (#11303) 2024-06-26 02:26:21 -07:00
15b62cc7ce upcloud: v5.6.0 and better server groups (#11311) 2024-06-26 01:42:21 -07:00
c352773737 fix task Set label to node (#11307) 2024-06-25 06:35:40 -07:00
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
40f5b28302 Update Vagrantfile: fix path for vagrant.md (#11306) 2024-06-24 20:03:40 -07:00
2d612cde4d Fix broken links in the cilium doc (#11318) 2024-06-24 19:45:42 -07:00
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
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
edce2b528d add cilium_hubble_event_buffer_capacity & cilium_hubble_event_queue_size vars (#10943) 2024-06-23 20:14:56 -07:00
647092b483 fix openstack cleanup (#11299)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2024-06-21 10:30:55 -07:00
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
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
3e72be2f72 CI: switch to unprivileged Kaniko to build pipeline images (#11292) 2024-06-11 06:19:02 -07:00
f85e96904d Pipeline image: add qemu-utils (#11281) 2024-06-10 06:53:55 -07:00
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
351393e32a Removed unnecessary python modules (#11199) 2024-05-31 07:05:01 -07:00
b70eaa0470 fix auto bump PR is blocked by label (#11256) 2024-05-31 06:28:48 -07:00
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
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
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
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
dedc00661a Add 'system-packages' tag to control installing packages from OS repositories (#10872) 2024-05-30 04:25:21 -07:00
0624a3061a Merge pull request #11239 from VannTen/cleanup/collection-build-test
Cleanup galaxy.yml
2024-05-30 04:10:29 -07:00
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
d85b29aae1 owners: move ant31 from emeritus to approvers (#11247) 2024-05-30 02:32:28 -07:00
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
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
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
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
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
278 changed files with 1716 additions and 980 deletions

View File

@ -4,4 +4,6 @@ updates:
directory: "/"
schedule:
interval: "weekly"
labels: [ "dependencies" ]
labels:
- dependencies
- release-note-none

View File

@ -1,12 +1,9 @@
---
stages:
- build
- unit-tests
- test
- deploy-part1
- moderator
- deploy-part2
- deploy-part3
- deploy-special
- deploy-extended
variables:
KUBESPRAY_VERSION: v2.25.0
@ -43,15 +40,26 @@ before_script:
.job: &job
tags:
- packet
- ffci
image: $PIPELINE_IMAGE
artifacts:
when: always
paths:
- cluster-dump/
needs:
- pipeline-image
.job-moderated:
extends: .job
needs:
- pipeline-image
- ci-not-authorized
- check-galaxy-version # lint
- pre-commit # lint
- vagrant-validate # lint
.testcases: &testcases
<<: *job
extends: .job-moderated
retry: 1
interruptible: true
before_script:
@ -61,18 +69,34 @@ before_script:
script:
- ./tests/scripts/testcases_run.sh
after_script:
- chronic ./tests/scripts/testcases_cleanup.sh
- ./tests/scripts/testcases_cleanup.sh
# For failfast, at least 1 job must be defined in .gitlab-ci.yml
# Premoderated with manual actions
ci-authorized:
extends: .job
stage: moderator
ci-not-authorized:
stage: build
before_script: []
after_script: []
rules:
# LGTM or ok-to-test labels
- if: $PR_LABELS =~ /.*,(lgtm|approved|ok-to-test).*|^(lgtm|approved|ok-to-test).*/i
variables:
CI_OK_TO_TEST: '0'
when: always
- if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "trigger"
variables:
CI_OK_TO_TEST: '0'
- if: $CI_COMMIT_BRANCH == "master"
variables:
CI_OK_TO_TEST: '0'
- when: always
variables:
CI_OK_TO_TEST: '1'
script:
- /bin/sh scripts/premoderator.sh
except: ['triggers', 'master']
# Disable ci moderator
only: []
- exit $CI_OK_TO_TEST
tags:
- ffci
needs: []
include:
- .gitlab-ci/build.yml

View File

@ -1,40 +1,32 @@
---
.build:
.build-container:
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- image-cache
tags:
- ffci
stage: build
image:
name: moby/buildkit:rootless
entrypoint: [""]
name: gcr.io/kaniko-project/executor:debug
entrypoint: ['']
variables:
BUILDKITD_FLAGS: --oci-worker-no-process-sandbox
TAG: $CI_COMMIT_SHORT_SHA
PROJECT_DIR: $CI_PROJECT_DIR
DOCKERFILE: Dockerfile
GODEBUG: "http2client=0"
before_script:
- mkdir ~/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > ~/.docker/config.json
pipeline image:
extends: .build
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)\"}}}" > /kaniko/.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'
- /kaniko/executor --cache=true
--cache-dir=image-cache
--context $PROJECT_DIR
--dockerfile $PROJECT_DIR/$DOCKERFILE
--label 'git-branch'=$CI_COMMIT_REF_SLUG
--label 'git-tag=$CI_COMMIT_TAG'
--destination $PIPELINE_IMAGE
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'
pipeline-image:
extends: .build-container
variables:
DOCKERFILE: pipeline.Dockerfile

View File

@ -1,40 +1,35 @@
---
generate-pre-commit:
image: 'mikefarah/yq@sha256:bcb889a1f9bdb0613c8a054542d02360c2b1b35521041be3e1bd8fbd0534d411'
stage: build
before_script: []
pre-commit:
stage: test
tags:
- ffci
image: 'ghcr.io/pre-commit-ci/runner-image@sha256:aaf2c7b38b22286f2d381c11673bec571c28f61dd086d11b43a1c9444a813cef'
variables:
PRE_COMMIT_HOME: /pre-commit-cache
script:
- >
yq -r < .pre-commit-config.yaml '.repos[].hooks[].id' |
sed 's/^/ - /' |
cat .gitlab-ci/pre-commit-dynamic-stub.yml - > pre-commit-generated.yml
artifacts:
- pre-commit run --all-files
cache:
key: pre-commit-all
paths:
- pre-commit-generated.yml
run-pre-commit:
stage: unit-tests
trigger:
include:
- artifact: pre-commit-generated.yml
job: generate-pre-commit
strategy: depend
- /pre-commit-cache
needs: []
vagrant-validate:
extends: .job
stage: unit-tests
tags: [light]
stage: test
tags: [ffci]
variables:
VAGRANT_VERSION: 2.3.7
script:
- ./tests/scripts/vagrant-validate.sh
- ./tests/scripts/vagrant-validate.sh
except: ['triggers', 'master']
# TODO: convert to pre-commit hook
check-galaxy-version:
stage: unit-tests
tags: [light]
needs: []
stage: test
tags: [ffci]
image: python:3
script:
- tests/scripts/check_galaxy_version.sh
- tests/scripts/check_galaxy_version.sh

View File

@ -1,30 +1,42 @@
---
.molecule:
tags: [c3.small.x86]
tags: [ffci-vm-med]
only: [/^pr-.*$/]
except: ['triggers']
image: $PIPELINE_IMAGE
image: quay.io/kubespray/vm-kubespray-ci:v6
services: []
stage: deploy-part1
needs: []
# - ci-not-authorized
variables:
VAGRANT_DEFAULT_PROVIDER: "libvirt"
before_script:
- tests/scripts/rebase.sh
- ./tests/scripts/vagrant_clean.sh
- groups
- 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/rebase.sh
- ./tests/scripts/vagrant_clean.sh
script:
- ./tests/scripts/molecule_run.sh
- ./tests/scripts/molecule_run.sh
after_script:
- chronic ./tests/scripts/molecule_logs.sh
- ./tests/scripts/molecule_logs.sh
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
- $PERIODIC_CI_ENABLED
allow_failure: true
extends: .molecule
@ -34,50 +46,50 @@ molecule_full:
molecule_no_container_engines:
extends: .molecule
script:
- ./tests/scripts/molecule_run.sh -e container-engine
- ./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
- ./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
- ./tests/scripts/molecule_run.sh -i container-engine/containerd
when: on_success
molecule_cri-o:
extends: .molecule
stage: deploy-part2
stage: deploy-part1
script:
- ./tests/scripts/molecule_run.sh -i container-engine/cri-o
- ./tests/scripts/molecule_run.sh -i container-engine/cri-o
allow_failure: true
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
script:
- ./tests/scripts/molecule_run.sh -i container-engine/kata-containers
when: manual
# FIXME: this test is broken (perma-failing)
# # Stage 3 container engines don't get as much attention so allow them to fail
# molecule_kata:
# extends: .molecule
# stage: deploy-extended
# script:
# - ./tests/scripts/molecule_run.sh -i container-engine/kata-containers
# when: manual
# # FIXME: this test is broken (perma-failing)
molecule_gvisor:
extends: .molecule
stage: deploy-part3
stage: deploy-extended
script:
- ./tests/scripts/molecule_run.sh -i container-engine/gvisor
- ./tests/scripts/molecule_run.sh -i container-engine/gvisor
when: manual
# FIXME: this test is broken (perma-failing)
molecule_youki:
extends: .molecule
stage: deploy-part3
stage: deploy-extended
script:
- ./tests/scripts/molecule_run.sh -i container-engine/youki
- ./tests/scripts/molecule_run.sh -i container-engine/youki
when: manual
# FIXME: this test is broken (perma-failing)

View File

@ -6,14 +6,56 @@
CI_PLATFORM: packet
SSH_USER: kubespray
tags:
- packet
except: [triggers]
- ffci
needs:
- pipeline-image
- ci-not-authorized
# CI template for PRs
.packet_pr:
only: [/^pr-.*$/]
stage: deploy-part1
rules:
- if: $PR_LABELS =~ /.*ci-short.*/
when: manual
allow_failure: true
- if: $CI_COMMIT_BRANCH =~ /^pr-.*$/
when: on_success
- when: manual
allow_failure: true
extends: .packet
## Uncomment this to have multiple stages
# needs:
# - packet_ubuntu20-calico-all-in-one
.packet_pr_short:
stage: deploy-part1
extends: .packet
rules:
- if: $CI_COMMIT_BRANCH =~ /^pr-.*$/
when: on_success
- when: manual
allow_failure: true
.packet_pr_manual:
extends: .packet_pr
stage: deploy-extended
rules:
- if: $PR_LABELS =~ /.*ci-full.*/
when: on_success
# Else run as manual
- when: manual
allow_failure: true
.packet_pr_extended:
extends: .packet_pr
stage: deploy-extended
rules:
- if: $PR_LABELS =~ /.*(ci-extended|ci-full).*/
when: on_success
- when: manual
allow_failure: true
# CI template for periodic CI jobs
# Enabled when PERIODIC_CI_ENABLED var is set
.packet_periodic:
@ -34,314 +76,172 @@ packet_cleanup_old:
# The ubuntu20-calico-all-in-one jobs are meant as early stages to prevent running the full CI if something is horribly broken
packet_ubuntu20-calico-all-in-one:
stage: deploy-part1
extends: .packet_pr
when: on_success
extends: .packet_pr_short
variables:
RESET_CHECK: "true"
# ### PR JOBS PART2
packet_ubuntu20-all-in-one-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_ubuntu20-calico-all-in-one-hardening:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_ubuntu22-all-in-one-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_ubuntu20-crio:
extends: .packet_pr_manual
packet_ubuntu22-calico-all-in-one:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_ubuntu24-all-in-one-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_ubuntu24-calico-all-in-one:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_ubuntu24-calico-etcd-datastore:
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
allow_failure: true
packet_ubuntu20-crio:
extends: .packet_pr
stage: deploy-part2
when: manual
packet_fedora37-crio:
extends: .packet_pr
stage: deploy-part2
when: manual
packet_ubuntu20-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_debian12-calico:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_debian12-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_debian12-cilium:
stage: deploy-part2
extends: .packet_periodic
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_pr
when: on_success
packet_almalinux8-calico:
stage: deploy-part2
packet_debian11-calico:
extends: .packet_pr
packet_debian11-macvlan:
extends: .packet_pr
packet_debian12-cilium:
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_amazon-linux-2-all-in-one:
stage: deploy-part2
extends: .packet_pr
when: on_success
packet_fedora38-docker-weave:
stage: deploy-part2
extends: .packet_pr
when: on_success
allow_failure: true
packet_opensuse-docker-cilium:
stage: deploy-part2
extends: .packet_pr
when: on_success
# ### MANUAL JOBS
packet_ubuntu20-docker-weave-sep:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_ubuntu20-cilium-sep:
stage: deploy-special
extends: .packet_pr
when: manual
packet_ubuntu20-flannel-ha-once:
stage: deploy-part2
extends: .packet_pr
when: manual
## Extended
packet_debian11-docker:
extends: .packet_pr_extended
# Calico HA eBPF
packet_almalinux8-calico-ha-ebpf:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_debian12-docker:
extends: .packet_pr_extended
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_fedora38-docker-calico:
stage: deploy-part2
extends: .packet_periodic
when: on_success
variables:
RESET_CHECK: "true"
packet_fedora37-calico-selinux:
stage: deploy-part2
extends: .packet_periodic
when: on_success
packet_fedora37-calico-swap-selinux:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_almalinux8-calico-nodelocaldns-secondary:
stage: deploy-part2
extends: .packet_pr
when: manual
packet_fedora38-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
packet_debian12-custom-cni-helm:
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_debian12-calico:
extends: .packet_pr_extended
packet_almalinux8-calico-remove-node:
stage: deploy-part3
extends: .packet_pr
when: on_success
extends: .packet_pr_extended
variables:
REMOVE_NODE_CHECK: "true"
REMOVE_NODE_NAME: "instance-3"
packet_rockylinux9-calico:
extends: .packet_pr_extended
packet_almalinux8-calico:
extends: .packet_pr_extended
packet_almalinux8-docker:
extends: .packet_pr_extended
packet_ubuntu20-calico-all-in-one-hardening:
extends: .packet_pr_extended
packet_ubuntu24-calico-all-in-one:
extends: .packet_pr_extended
packet_ubuntu20-calico-etcd-kubeadm:
stage: deploy-part3
extends: .packet_pr
when: on_success
extends: .packet_pr_extended
packet_ubuntu24-all-in-one-docker:
extends: .packet_pr_extended
packet_ubuntu22-all-in-one-docker:
extends: .packet_pr_extended
# ### MANUAL JOBS
packet_fedora37-crio:
extends: .packet_pr_manual
packet_ubuntu20-flannel-ha:
extends: .packet_pr_manual
packet_ubuntu20-all-in-one-docker:
extends: .packet_pr_manual
packet_ubuntu20-flannel-ha-once:
extends: .packet_pr_manual
packet_fedora37-calico-swap-selinux:
extends: .packet_pr_manual
packet_almalinux8-calico-ha-ebpf:
extends: .packet_pr_manual
packet_almalinux8-calico-nodelocaldns-secondary:
extends: .packet_pr_manual
packet_debian11-custom-cni:
extends: .packet_pr_manual
packet_debian11-kubelet-csr-approver:
extends: .packet_pr_manual
packet_debian12-custom-cni-helm:
extends: .packet_pr_manual
packet_ubuntu20-calico-ha-wireguard:
extends: .packet_pr_manual
# PERIODIC
packet_fedora38-docker-calico:
stage: deploy-extended
extends: .packet_periodic
variables:
RESET_CHECK: "true"
packet_fedora37-calico-selinux:
stage: deploy-extended
extends: .packet_periodic
packet_ubuntu20-calico-etcd-kubeadm-upgrade-ha:
stage: deploy-extended
extends: .packet_periodic
variables:
UPGRADE_TEST: basic
packet_debian11-calico-upgrade-once:
stage: deploy-part3
stage: deploy-extended
extends: .packet_periodic
when: on_success
variables:
UPGRADE_TEST: graceful
packet_ubuntu20-calico-ha-recover:
stage: deploy-part3
stage: deploy-extended
extends: .packet_periodic
when: on_success
variables:
RECOVER_CONTROL_PLANE_TEST: "true"
RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:]:kube_control_plane[1:]"
packet_ubuntu20-calico-ha-recover-noquorum:
stage: deploy-part3
stage: deploy-extended
extends: .packet_periodic
when: on_success
variables:
RECOVER_CONTROL_PLANE_TEST: "true"
RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[1:]:kube_control_plane[1:]"
packet_debian11-calico-upgrade:
stage: deploy-extended
extends: .packet_periodic
variables:
UPGRADE_TEST: graceful
packet_debian12-cilium-svc-proxy:
stage: deploy-extended
extends: .packet_periodic

View File

@ -7,7 +7,7 @@ pre-commit:
variables:
PRE_COMMIT_HOME: /pre-commit-cache
script:
- pre-commit run -a $HOOK_ID
- pre-commit run --all-files
cache:
key: pre-commit-$HOOK_ID
paths:

View File

@ -2,6 +2,10 @@
# Tests for contrib/terraform/
.terraform_install:
extends: .job
needs:
- ci-not-authorized
- pipeline-image
stage: deploy-part1
before_script:
- update-alternatives --install /usr/bin/python python /usr/bin/python3 1
- ./tests/scripts/rebase.sh
@ -24,17 +28,19 @@
.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
stage: test
needs:
- pipeline-image
.terraform_apply:
extends: .terraform_install
tags: [light]
stage: deploy-part3
tags: [ffci]
stage: deploy-extended
when: manual
only: [/^pr-.*$/]
artifacts:
@ -51,7 +57,7 @@
- tests/scripts/testcases_run.sh
after_script:
# Cleanup regardless of exit code
- chronic ./tests/scripts/testcases_cleanup.sh
- ./tests/scripts/testcases_cleanup.sh
tf-validate-openstack:
extends: .terraform_validate
@ -146,8 +152,7 @@ tf-validate-nifcloud:
TF_VAR_router_id: "ab95917c-41fb-4881-b507-3a6dfe9403df"
tf-elastx_cleanup:
stage: unit-tests
tags: [light]
tags: [ffci]
image: python
variables:
<<: *elastx_variables
@ -155,10 +160,11 @@ tf-elastx_cleanup:
- pip install -r scripts/openstack-cleanup/requirements.txt
script:
- ./scripts/openstack-cleanup/main.py
allow_failure: true
tf-elastx_ubuntu20-calico:
extends: .terraform_apply
stage: deploy-part3
stage: deploy-part1
when: on_success
allow_failure: true
variables:

View File

@ -1,64 +1,63 @@
---
.vagrant:
extends: .testcases
needs:
- ci-not-authorized
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
DOCKER_NAME: vagrant
VAGRANT_ANSIBLE_TAGS: facts
tags: [ffci-vm-large]
# only: [/^pr-.*$/]
# except: ['triggers']
image: quay.io/kubespray/vm-kubespray-ci:v6
services: []
before_script:
- 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:
- ./tests/scripts/testcases_run.sh
after_script:
- chronic ./tests/scripts/testcases_cleanup.sh
vagrant_ubuntu20-calico-dual-stack:
stage: deploy-part2
stage: deploy-extended
extends: .vagrant
when: manual
# FIXME: this test if broken (perma-failing)
vagrant_ubuntu20-weave-medium:
stage: deploy-part2
extends: .vagrant
when: manual
vagrant_ubuntu20-flannel:
stage: deploy-part2
stage: deploy-part1
extends: .vagrant
when: on_success
allow_failure: false
vagrant_ubuntu20-flannel-collection:
stage: deploy-part2
stage: deploy-extended
extends: .vagrant
when: on_success
when: manual
vagrant_ubuntu20-kube-router-sep:
stage: deploy-part2
stage: deploy-extended
extends: .vagrant
when: manual
# Service proxy test fails connectivity testing
vagrant_ubuntu20-kube-router-svc-proxy:
stage: deploy-part2
stage: deploy-extended
extends: .vagrant
when: manual
vagrant_fedora37-kube-router:
stage: deploy-part2
stage: deploy-extended
extends: .vagrant
when: manual
# FIXME: this test if broken (perma-failing)
vagrant_centos7-kube-router:
stage: deploy-part2
extends: .vagrant
when: manual

View File

@ -39,14 +39,14 @@ repos:
hooks:
- id: ansible-lint
additional_dependencies:
- ansible==9.5.1
- ansible==9.8.0
- jsonschema==4.22.0
- jmespath==1.0.1
- netaddr==1.2.1
- netaddr==1.3.0
- distlib
- repo: https://github.com/VannTen/misspell
# Waiting on https://github.com/golangci/misspell/pull/19 to get merged
rev: 8592a4e
- repo: https://github.com/golangci/misspell
rev: v0.6.0
hooks:
- id: misspell
exclude: "OWNERS_ALIASES$"
@ -80,6 +80,7 @@ repos:
language: python
additional_dependencies:
- ansible-core>=2.16.4
- distlib
entry: tests/scripts/collection-build-install.sh
pass_filenames: false

View File

@ -6,7 +6,7 @@ ignore: |
.github/
# Generated file
tests/files/custom_cni/cilium.yaml
# https://ansible.readthedocs.io/projects/lint/rules/yaml/
rules:
braces:
min-spaces-inside: 0
@ -14,9 +14,16 @@ 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
octal-values:
forbid-implicit-octal: true # yamllint defaults to false
forbid-explicit-octal: true # yamllint defaults to false
truthy: disable

View File

@ -6,6 +6,7 @@ aliases:
- mzaian
- oomichi
- yankay
- ant31
kubespray-reviewers:
- cyclinder
- erikjiang
@ -14,7 +15,6 @@ aliases:
- vannten
- yankay
kubespray-emeritus_approvers:
- ant31
- atoms
- chadswen
- luckysb

View File

@ -141,7 +141,7 @@ vagrant up
## Supported Linux Distributions
- **Flatcar Container Linux by Kinvolk**
- **Debian** Bookworm, Bullseye, Buster
- **Debian** Bookworm, Bullseye
- **Ubuntu** 20.04, 22.04, 24.04
- **CentOS/RHEL** 7, [8, 9](docs/operating_systems/centos.md#centos-8)
- **Fedora** 37, 38
@ -160,11 +160,11 @@ Note: Upstart/SysV init based OS types are not supported.
## Supported Components
- Core
- [kubernetes](https://github.com/kubernetes/kubernetes) v1.29.5
- [kubernetes](https://github.com/kubernetes/kubernetes) v1.30.3
- [etcd](https://github.com/etcd-io/etcd) v3.5.12
- [docker](https://www.docker.com/) v26.1
- [containerd](https://containerd.io/) v1.7.16
- [cri-o](http://cri-o.io/) v1.29.1 (experimental: see [CRI-O Note](docs/CRI/cri-o.md). Only on fedora, ubuntu and centos based OS)
- [containerd](https://containerd.io/) v1.7.20
- [cri-o](http://cri-o.io/) v1.30.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.27.3
@ -173,10 +173,10 @@ Note: Upstart/SysV init based OS types are not supported.
- [kube-ovn](https://github.com/alauda/kube-ovn) v1.11.5
- [kube-router](https://github.com/cloudnativelabs/kube-router) v2.0.0
- [multus](https://github.com/k8snetworkplumbingwg/multus-cni) v3.8
- [weave](https://github.com/weaveworks/weave) v2.8.1
- [weave](https://github.com/rajch/weave) v2.8.7
- [kube-vip](https://github.com/kube-vip/kube-vip) v0.8.0
- Application
- [cert-manager](https://github.com/jetstack/cert-manager) v1.13.2
- [cert-manager](https://github.com/jetstack/cert-manager) v1.14.7
- [coredns](https://github.com/coredns/coredns) v1.11.1
- [ingress-nginx](https://github.com/kubernetes/ingress-nginx) v1.10.1
- [krew](https://github.com/kubernetes-sigs/krew) v0.4.4
@ -189,7 +189,7 @@ Note: Upstart/SysV init based OS types are not supported.
- [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.29.0
- [cinder-csi-plugin](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md) v1.30.0
- [gcp-pd-csi-plugin](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver) v1.9.2
- [local-path-provisioner](https://github.com/rancher/local-path-provisioner) v0.0.24
- [local-volume-provisioner](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner) v2.5.0

View File

@ -16,6 +16,7 @@ The Kubespray Project is released on an as-needed basis. The process is as follo
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

3
Vagrantfile vendored
View File

@ -1,7 +1,7 @@
# -*- 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'
@ -278,6 +278,7 @@ Vagrant.configure("2") do |config|
"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_private_key_file": File.join(Dir.home, ".vagrant.d", "insecure_private_key"),
"unsafe_show_logs": "True"
}

View File

@ -11,6 +11,7 @@ gathering = smart
fact_caching = jsonfile
fact_caching_connection = /tmp
fact_caching_timeout = 86400
timeout = 300
stdout_callback = default
display_skipped_hosts = no
library = ./library

View File

@ -12,4 +12,4 @@
template:
src: inventory.j2
dest: "{{ playbook_dir }}/inventory"
mode: 0644
mode: "0644"

View File

@ -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

@ -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

View File

@ -35,7 +35,7 @@
path-exclude=/usr/share/doc/*
path-include=/usr/share/doc/*/copyright
dest: /etc/dpkg/dpkg.cfg.d/01_nodoc
mode: 0644
mode: "0644"
when:
- ansible_os_family == 'Debian'
@ -64,7 +64,7 @@
copy:
content: "{{ distro_user }} ALL=(ALL) NOPASSWD:ALL"
dest: "/etc/sudoers.d/{{ distro_user }}"
mode: 0640
mode: "0640"
- name: "Add my pubkey to {{ distro_user }} user authorized keys"
ansible.posix.authorized_key:

View File

@ -42,7 +42,7 @@
template:
src: inventory_builder.sh.j2
dest: /tmp/kubespray.dind.inventory_builder.sh
mode: 0755
mode: "0755"
tags:
- addresses

View File

@ -20,7 +20,7 @@
br-netfilter
owner: root
group: root
mode: 0644
mode: "0644"
when: br_netfilter is defined

View File

@ -11,7 +11,7 @@
state: directory
owner: "{{ k8s_deployment_user }}"
group: "{{ k8s_deployment_user }}"
mode: 0700
mode: "0700"
- name: Configure sudo for deployment user
copy:
@ -20,13 +20,13 @@
dest: "/etc/sudoers.d/55-k8s-deployment"
owner: root
group: root
mode: 0644
mode: "0644"
- name: Write private SSH key
copy:
src: "{{ k8s_deployment_user_pkey_path }}"
dest: "/home/{{ k8s_deployment_user }}/.ssh/id_rsa"
mode: 0400
mode: "0400"
owner: "{{ k8s_deployment_user }}"
group: "{{ k8s_deployment_user }}"
when: k8s_deployment_user_pkey_path is defined
@ -41,7 +41,7 @@
- name: Fix ssh-pub-key permissions
file:
path: "/home/{{ k8s_deployment_user }}/.ssh/authorized_keys"
mode: 0600
mode: "0600"
owner: "{{ k8s_deployment_user }}"
group: "{{ k8s_deployment_user }}"
when: k8s_deployment_user_pkey_path is defined

View File

@ -14,7 +14,7 @@
file:
path: "{{ item }}"
state: directory
mode: 0755
mode: "0755"
become: false
loop:
- "{{ playbook_dir }}/plugins/mitogen"
@ -25,7 +25,7 @@
url: "{{ mitogen_url }}"
dest: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.tar.gz"
validate_certs: true
mode: 0644
mode: "0644"
- name: Extract archive
unarchive:
@ -40,7 +40,7 @@
- name: Add strategy to ansible.cfg
community.general.ini_file:
path: ansible.cfg
mode: 0644
mode: "0644"
section: "{{ item.section | d('defaults') }}"
option: "{{ item.option }}"
value: "{{ item.value }}"

View File

@ -15,7 +15,7 @@
file:
path: "{{ item }}"
state: directory
mode: 0775
mode: "0775"
with_items:
- "{{ gluster_mount_dir }}"
when: ansible_os_family in ["Debian","RedHat"] and groups['gfs-cluster'] is defined

View File

@ -49,7 +49,7 @@
file:
path: "{{ item }}"
state: directory
mode: 0775
mode: "0775"
with_items:
- "{{ gluster_brick_dir }}"
- "{{ gluster_mount_dir }}"
@ -101,7 +101,7 @@
template:
dest: "{{ gluster_mount_dir }}/.test-file.txt"
src: test-file.txt
mode: 0644
mode: "0644"
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
- name: Unmount glusterfs

View File

@ -3,7 +3,7 @@
template:
src: "{{ item.file }}"
dest: "{{ kube_config_dir }}/{{ item.dest }}"
mode: 0644
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}

View File

@ -4,7 +4,7 @@
template:
src: "heketi-bootstrap.json.j2"
dest: "{{ kube_config_dir }}/heketi-bootstrap.json"
mode: 0640
mode: "0640"
register: "rendering"
- name: "Kubernetes Apps | Install and configure Heketi Bootstrap"
kube:

View File

@ -10,7 +10,7 @@
template:
src: "topology.json.j2"
dest: "{{ kube_config_dir }}/topology.json"
mode: 0644
mode: "0644"
- name: "Copy topology configuration into container."
changed_when: false
command: "{{ bin_dir }}/kubectl cp {{ kube_config_dir }}/topology.json {{ initial_heketi_pod_name }}:/tmp/topology.json"

View File

@ -3,7 +3,7 @@
template:
src: "glusterfs-daemonset.json.j2"
dest: "{{ kube_config_dir }}/glusterfs-daemonset.json"
mode: 0644
mode: "0644"
become: true
register: "rendering"
- name: "Kubernetes Apps | Install and configure GlusterFS daemonset"
@ -33,7 +33,7 @@
template:
src: "heketi-service-account.json.j2"
dest: "{{ kube_config_dir }}/heketi-service-account.json"
mode: 0644
mode: "0644"
become: true
register: "rendering"
- name: "Kubernetes Apps | Install and configure Heketi Service Account"

View File

@ -4,7 +4,7 @@
template:
src: "heketi-deployment.json.j2"
dest: "{{ kube_config_dir }}/heketi-deployment.json"
mode: 0644
mode: "0644"
register: "rendering"
- name: "Kubernetes Apps | Install and configure Heketi"

View File

@ -28,7 +28,7 @@
template:
src: "heketi.json.j2"
dest: "{{ kube_config_dir }}/heketi.json"
mode: 0644
mode: "0644"
- name: "Deploy Heketi config secret"
when: "secret_state.stdout | length == 0"

View File

@ -5,7 +5,7 @@
template:
src: "heketi-storage.json.j2"
dest: "{{ kube_config_dir }}/heketi-storage.json"
mode: 0644
mode: "0644"
register: "rendering"
- name: "Kubernetes Apps | Install and configure Heketi Storage"
kube:

View File

@ -16,7 +16,7 @@
template:
src: "storageclass.yml.j2"
dest: "{{ kube_config_dir }}/storageclass.yml"
mode: 0644
mode: "0644"
register: "rendering"
- name: "Kubernetes Apps | Install and configure Storace Class"
kube:

View File

@ -10,7 +10,7 @@
template:
src: "topology.json.j2"
dest: "{{ kube_config_dir }}/topology.json"
mode: 0644
mode: "0644"
- name: "Copy topology configuration into container." # noqa no-handler
when: "rendering.changed"
command: "{{ bin_dir }}/kubectl cp {{ kube_config_dir }}/topology.json {{ heketi_pod_name }}:/tmp/topology.json"

View File

@ -16,7 +16,7 @@
template:
src: ./contrib/offline/temp/{{ item }}.list.template
dest: ./contrib/offline/temp/{{ item }}.list
mode: 0644
mode: "0644"
with_items:
- files
- images

View File

@ -7,7 +7,7 @@
service_facts:
- name: Disable service firewalld
systemd:
systemd_service:
name: firewalld
state: stopped
enabled: no
@ -15,7 +15,7 @@
"'firewalld.service' in services and services['firewalld.service'].status != 'not-found'"
- name: Disable service ufw
systemd:
systemd_service:
name: ufw
state: stopped
enabled: no

View File

@ -12,8 +12,8 @@ ${list_master}
${list_worker}
[k8s_cluster:children]
kube-master
kube-node
kube_control_plane
kube_node
[k8s_cluster:vars]
network_id=${network_id}

View File

@ -1,5 +1,11 @@
# See: https://developers.upcloud.com/1.3/5-zones/
zone = "fi-hel1"
zone = "fi-hel1"
private_cloud = false
# Only used if private_cloud = true, public zone equivalent
# For example use finnish public zone for finnish private zone
public_zone = "fi-hel2"
username = "ubuntu"
# Prefix to use for all resources to separate them from other resources

View File

@ -11,8 +11,10 @@ provider "upcloud" {
module "kubernetes" {
source = "./modules/kubernetes-cluster"
prefix = var.prefix
zone = var.zone
prefix = var.prefix
zone = var.zone
private_cloud = var.private_cloud
public_zone = var.public_zone
template_name = var.template_name
username = var.username

View File

@ -54,11 +54,12 @@ resource "upcloud_server" "master" {
if machine.node_type == "master"
}
hostname = "${local.resource-prefix}${each.key}"
plan = each.value.plan
cpu = each.value.plan == null ? each.value.cpu : null
mem = each.value.plan == null ? each.value.mem : null
zone = var.zone
hostname = "${local.resource-prefix}${each.key}"
plan = each.value.plan
cpu = each.value.plan == null ? null : each.value.cpu
mem = each.value.plan == null ? null : each.value.mem
zone = var.zone
server_group = each.value.server_group == null ? null : upcloud_server_group.server_groups[each.value.server_group].id
template {
storage = var.template_name
@ -111,11 +112,13 @@ resource "upcloud_server" "worker" {
if machine.node_type == "worker"
}
hostname = "${local.resource-prefix}${each.key}"
plan = each.value.plan
cpu = each.value.plan == null ? each.value.cpu : null
mem = each.value.plan == null ? each.value.mem : null
zone = var.zone
hostname = "${local.resource-prefix}${each.key}"
plan = each.value.plan
cpu = each.value.plan == null ? null : each.value.cpu
mem = each.value.plan == null ? null : each.value.mem
zone = var.zone
server_group = each.value.server_group == null ? null : upcloud_server_group.server_groups[each.value.server_group].id
template {
storage = var.template_name
@ -512,8 +515,18 @@ resource "upcloud_loadbalancer" "lb" {
configured_status = "started"
name = "${local.resource-prefix}lb"
plan = var.loadbalancer_plan
zone = var.zone
network = upcloud_network.private.id
zone = var.private_cloud ? var.public_zone : var.zone
networks {
name = "Private-Net"
type = "private"
family = "IPv4"
network = upcloud_network.private.id
}
networks {
name = "Public-Net"
type = "public"
family = "IPv4"
}
}
resource "upcloud_loadbalancer_backend" "lb_backend" {
@ -534,6 +547,9 @@ resource "upcloud_loadbalancer_frontend" "lb_frontend" {
mode = "tcp"
port = each.value.port
default_backend_name = upcloud_loadbalancer_backend.lb_backend[each.key].name
networks {
name = "Public-Net"
}
}
resource "upcloud_loadbalancer_static_backend_member" "lb_backend_member" {
@ -557,5 +573,9 @@ resource "upcloud_server_group" "server_groups" {
title = each.key
anti_affinity_policy = each.value.anti_affinity_policy
labels = {}
members = [for server in each.value.servers : merge(upcloud_server.master, upcloud_server.worker)[server].id]
# Managed upstream via upcloud_server resource
members = []
lifecycle {
ignore_changes = [members]
}
}

View File

@ -6,6 +6,14 @@ variable "zone" {
type = string
}
variable "private_cloud" {
type = bool
}
variable "public_zone" {
type = string
}
variable "template_name" {}
variable "username" {}
@ -20,6 +28,7 @@ variable "machines" {
cpu = string
mem = string
disk_size = number
server_group : string
additional_disks = map(object({
size = number
tier = string
@ -104,6 +113,5 @@ variable "server_groups" {
type = map(object({
anti_affinity_policy = string
servers = list(string)
}))
}

View File

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

View File

@ -9,6 +9,15 @@ variable "zone" {
description = "The zone where to run the cluster"
}
variable "private_cloud" {
description = "Whether the environment is in the private cloud region"
default = false
}
variable "public_zone" {
description = "The public zone equivalent if the cluster is running in a private cloud zone"
}
variable "template_name" {
description = "Block describing the preconfigured operating system"
}
@ -32,6 +41,7 @@ variable "machines" {
cpu = string
mem = string
disk_size = number
server_group : string
additional_disks = map(object({
size = number
tier = string
@ -142,7 +152,6 @@ variable "server_groups" {
type = map(object({
anti_affinity_policy = string
servers = list(string)
}))
default = {}

View File

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

View File

@ -132,7 +132,7 @@ Wireguard option is only available in Cilium 1.10.0 and newer.
### IPsec Encryption
For further information, make sure to check the official [Cilium documentation.](https://docs.cilium.io/en/stable/gettingstarted/encryption-ipsec/)
For further information, make sure to check the official [Cilium documentation.](https://docs.cilium.io/en/stable/security/network/encryption-ipsec/)
To enable IPsec encryption, you just need to set three variables.
@ -157,7 +157,7 @@ echo "cilium_ipsec_key: "$(echo -n "3 rfc4106(gcm(aes)) $(echo $(dd if=/dev/uran
### Wireguard Encryption
For further information, make sure to check the official [Cilium documentation.](https://docs.cilium.io/en/stable/gettingstarted/encryption-wireguard/)
For further information, make sure to check the official [Cilium documentation.](https://docs.cilium.io/en/stable/security/network/encryption-wireguard/)
To enable Wireguard encryption, you just need to set two variables.

View File

@ -231,6 +231,7 @@ The following tags are defined in playbooks:
| services | Remove services (etcd, kubelet etc...) when resetting |
| snapshot | Enabling csi snapshot |
| snapshot-controller | Configuring csi snapshot controller |
| system-packages | Install packages using OS package manager |
| upgrade | Upgrading, f.e. container images/binaries |
| upload | Distributing images/binaries across hosts |
| vsphere-csi-driver | Configuring csi driver: vsphere |

View File

@ -216,6 +216,8 @@ Stack](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/dns-stack.m
The percent is calculated by dividing this field value by 100, so the field value must be between 0 and 100, inclusive.
When specified, the value must be less than imageGCHighThresholdPercent. Default: 80
* *kubelet_max_parallel_image_pulls* - Sets the maximum number of image pulls in parallel. The value is `1` by default which means the default is serial image pulling, set it to a integer great than `1` to enable image pulling in parallel.
* *kubelet_make_iptables_util_chains* - If `true`, causes the kubelet ensures a set of `iptables` rules are present on host.
* *kubelet_cpu_manager_policy* - If set to `static`, allows pods with certain resource characteristics to be granted increased CPU affinity and exclusivity on the node. And it should be set with `kube_reserved` or `system-reserved`, enable this with the following guide:[Control CPU Management Policies on the Node](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/)
@ -243,6 +245,10 @@ kubelet_cpu_manager_policy_options:
By default the `kubelet_secure_addresses` is set with the `10.0.0.110` the ansible control host uses `eth0` to connect to the machine. In case you want to use `eth1` as the outgoing interface on which `kube-apiserver` connects to the `kubelet`s, you should override the variable in this way: `kubelet_secure_addresses: "192.168.1.110"`.
* *kubelet_systemd_wants_dependencies* - List of kubelet service dependencies, other than container runtime.
If you use nfs dynamically mounted volumes, sometimes rpc-statd does not start within the kubelet. You can fix it with this parameter : `kubelet_systemd_wants_dependencies: ["rpc-statd.service"]` This will add `Wants=rpc-statd.service` in `[Unit]` section of /etc/systemd/system/kubelet.service
* *node_labels* - Labels applied to nodes via `kubectl label node`.
For example, labels can be set in the inventory as variables or more widely in group_vars.
*node_labels* can only be defined as a dict:

View File

@ -5,8 +5,8 @@
1. build: build a docker image to be used in the pipeline
2. unit-tests: fast jobs for fast feedback (linting, etc...)
3. deploy-part1: small number of jobs to test if the PR works with default settings
4. deploy-part2: slow jobs testing different platforms, OS, settings, CNI, etc...
5. deploy-part3: very slow jobs (upgrades, etc...)
4. deploy-extended: slow jobs testing different platforms, OS, settings, CNI, etc...
5. deploy-extended: very slow jobs (upgrades, etc...)
## Runners

View File

@ -9,8 +9,7 @@ To generate this Matrix run `./tests/scripts/md-table/main.py`
almalinux8 | :white_check_mark: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | :x: |
amazon | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
centos7 | :white_check_mark: | :x: | :x: | :white_check_mark: | :x: | :white_check_mark: | :x: | :white_check_mark: |
debian10 | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :white_check_mark: | :x: |
debian11 | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
debian11 | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :x: | :white_check_mark: | :x: |
debian12 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
fedora37 | :white_check_mark: | :x: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: |
fedora38 | :x: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | :x: |
@ -28,7 +27,6 @@ ubuntu24 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
almalinux8 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
amazon | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
centos7 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
debian10 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
debian11 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
debian12 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
fedora37 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
@ -47,7 +45,6 @@ ubuntu24 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
almalinux8 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
amazon | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
centos7 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
debian10 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
debian11 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
debian12 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
fedora37 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |

View File

@ -1,6 +1,6 @@
# cgroups
To avoid the rivals for resources between containers or the impact on the host in Kubernetes, the kubelet components will rely on cgroups to limit the containers resources usage.
To avoid resource contention between containers and host daemons in Kubernetes, the kubelet components can use cgroups to limit resource usage.
## Enforcing Node Allocatable
@ -20,8 +20,9 @@ Here is an example:
```yaml
kubelet_enforce_node_allocatable: "pods,kube-reserved,system-reserved"
# Reserve this space for kube resources
# Set to true to reserve resources for kube daemons
# Set kube_reserved to true to run kubelet and container-engine daemons in a dedicated cgroup.
# This is required if you want to enforce limits on the resource usage of these daemons.
# It is not required if you just want to make resource reservations (kube_memory_reserved, kube_cpu_reserved, etc.)
kube_reserved: true
kube_reserved_cgroups_for_service_slice: kube.slice
kube_reserved_cgroups: "/{{ kube_reserved_cgroups_for_service_slice }}"

View File

@ -30,12 +30,12 @@ loadbalancer. If you wish to control the name of the loadbalancer container,
you can set the variable `loadbalancer_apiserver_pod_name`.
If you choose to NOT use the local internal loadbalancer, you will need to
use the [kube-vip](kube-vip.md) ansible role or configure your own loadbalancer to achieve HA. By default, it only configures a non-HA endpoint, which points to the
use the [kube-vip](/docs/ingress/kube-vip.md) ansible role or configure your own loadbalancer to achieve HA. By default, it only configures a non-HA endpoint, which points to the
`access_ip` or IP address of the first server node in the `kube_control_plane` group.
It can also configure clients to use endpoints for a given loadbalancer type.
The following diagram shows how traffic to the apiserver is directed.
![Image](figures/loadbalancer_localhost.png?raw=true)
![Image](/docs/figures/loadbalancer_localhost.png?raw=true)
A user may opt to use an external loadbalancer (LB) instead. An external LB
provides access for external clients, while the internal LB accepts client

View File

@ -103,7 +103,9 @@ If you use the settings like the one above, you'll need to define in your invent
can store them anywhere as long as it's accessible by kubespray. It's recommended to use `*_version` in the path so
that you don't need to modify this setting everytime kubespray upgrades one of these components.
* `yum_repo`/`debian_repo`/`ubuntu_repo`: OS package repository depending on your OS, should point to your internal
repository. Adjust the path accordingly.
repository. Adjust the path accordingly. Used only for Docker/Containerd packages (if needed); other packages might
be installed from other repositories. You might disable installing packages from other repositories by skipping
the `system-packages` tag
## Install Kubespray Python Packages

View File

@ -9,42 +9,16 @@ authors:
tags:
- infrastructure
repository: https://github.com/kubernetes-sigs/kubespray
issues: https://github.com/kubernetes-sigs/kubespray/issues
documentation: https://kubespray.io
license_file: LICENSE
dependencies:
ansible.utils: '>=2.5.0'
community.general: '>=3.0.0'
build_ignore:
- .github
- '*.tar.gz'
- extra_playbooks
- inventory
- scripts
- test-infra
- .ansible-lint
- .editorconfig
- .gitignore
- .gitlab-ci
- .gitlab-ci.yml
- .gitmodules
- .markdownlint.yaml
- .nojekyll
- .pre-commit-config.yaml
- .yamllint
- Dockerfile
- FILES.json
- MANIFEST.json
- Makefile
- Vagrantfile
- _config.yml
- ansible.cfg
- requirements*txt
- setup.cfg
- setup.py
- index.html
- reset.yml
- cluster.yml
- scale.yml
- recover-control-plane.yml
- remove-node.yml
- upgrade-cluster.yml
- library
ansible.netcommon: '>=5.3.0'
ansible.posix: '>=1.5.4'
community.docker: '>=3.11.0'
kubernetes.core: '>=2.4.2'
manifest:
directives:
- recursive-exclude tests **

View File

@ -100,6 +100,8 @@ rbd_provisioner_enabled: false
ingress_nginx_enabled: false
# ingress_nginx_host_network: false
# ingress_nginx_service_type: LoadBalancer
# ingress_nginx_service_nodeport_http: 30080
# ingress_nginx_service_nodeport_https: 30081
ingress_publish_status_address: ""
# ingress_nginx_nodeselector:
# kubernetes.io/os: "linux"

View File

@ -17,7 +17,7 @@ kube_token_dir: "{{ kube_config_dir }}/tokens"
kube_api_anonymous_auth: true
## Change this to use another Kubernetes version, e.g. a current beta release
kube_version: v1.29.5
kube_version: v1.30.3
# Where the binaries will be downloaded.
# Note: ensure that you've enough disk space (about 1G)
@ -262,7 +262,7 @@ default_kubelet_config_dir: "{{ kube_config_dir }}/dynamic_kubelet_dir"
# kubelet_runtime_cgroups_cgroupfs: "/system.slice/{{ container_manager }}.service"
# kubelet_kubelet_cgroups_cgroupfs: "/system.slice/kubelet.service"
# Optionally reserve this space for kube daemons.
# Whether to run kubelet and container-engine daemons in a dedicated cgroup.
# kube_reserved: false
## Uncomment to override default values
## The following two items need to be set when kube_reserved is true

View File

@ -163,6 +163,13 @@ cilium_l2announcements: false
### Enable auto generate certs if cilium_hubble_install: true
# cilium_hubble_tls_generate: false
### Tune cilium_hubble_event_buffer_capacity & cilium_hubble_event_queue_size values to avoid dropping events when hubble is under heavy load
### Capacity of Hubble events buffer. The provided value must be one less than an integer power of two and no larger than 65535
### (ie: 1, 3, ..., 2047, 4095, ..., 65535) (default 4095)
# cilium_hubble_event_buffer_capacity: 4095
### Buffer size of the channel to receive monitor events.
# cilium_hubble_event_queue_size: 50
# IP address management mode for v1.9+.
# https://docs.cilium.io/en/v1.9/concepts/networking/ipam/
# cilium_ipam_mode: kubernetes

View File

@ -4,7 +4,7 @@ FROM ubuntu:jammy-20230308
# Pip needs this as well at the moment to install ansible
# (and potentially other packages)
# See: https://github.com/pypa/pip/issues/10219
ENV VAGRANT_VERSION=2.3.7 \
ENV VAGRANT_VERSION=2.4.1 \
VAGRANT_DEFAULT_PROVIDER=libvirt \
VAGRANT_ANSIBLE_TAGS=facts \
LANG=C.UTF-8 \
@ -30,6 +30,9 @@ RUN apt update -q \
software-properties-common \
unzip \
libvirt-clients \
qemu-utils \
qemu-kvm \
dnsmasq \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
&& add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
&& apt update -q \
@ -37,13 +40,15 @@ RUN apt update -q \
&& apt autoremove -yqq --purge && apt clean && rm -rf /var/lib/apt/lists/* /var/log/*
WORKDIR /kubespray
ADD ./requirements.txt /kubespray/requirements.txt
ADD ./tests/requirements.txt /kubespray/tests/requirements.txt
ADD ./roles/kubespray-defaults/defaults/main/main.yml /kubespray/roles/kubespray-defaults/defaults/main/main.yml
RUN --mount=type=bind,target=./requirements.txt,src=./requirements.txt \
--mount=type=bind,target=./tests/requirements.txt,src=./tests/requirements.txt \
--mount=type=bind,target=./roles/kubespray-defaults/defaults/main/main.yml,src=./roles/kubespray-defaults/defaults/main/main.yml \
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 \
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1 \
&& pip install --no-compile --no-cache-dir pip -U \
&& pip install --no-compile --no-cache-dir -r tests/requirements.txt \
&& pip install --no-compile --no-cache-dir -r requirements.txt \
&& KUBE_VERSION=$(sed -n 's/^kube_version: //p' roles/kubespray-defaults/defaults/main/main.yml) \
&& 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 \

View File

@ -1,10 +1,7 @@
ansible==9.5.1
cryptography==42.0.7
jinja2==3.1.4
ansible==9.8.0
# Needed for jinja2 json_query templating
jmespath==1.0.1
jsonschema==4.22.0
MarkupSafe==2.1.5
netaddr==1.2.1
pbr==6.0.0
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
# Needed for ansible.utils.validate module
jsonschema==4.23.0
# Needed for ansible.utils.ipaddr
netaddr==1.3.0

View File

@ -12,4 +12,4 @@
dest: "{{ ssh_bastion_confing__name }}"
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
mode: 0644
mode: "0644"

View File

@ -19,4 +19,4 @@
template:
src: "{{ ssh_bastion_confing__name }}.j2"
dest: "{{ playbook_dir }}/{{ ssh_bastion_confing__name }}"
mode: 0640
mode: "0640"

View File

@ -11,6 +11,10 @@ coreos_locksmithd_disable: false
# Install public repo on Oracle Linux
use_oracle_public_repo: true
## Ubuntu specific variables
# Disable unattended-upgrades for Linux kernel and all packages start with linux- on Ubuntu
ubuntu_kernel_unattended_upgrades_disabled: false
fedora_coreos_packages:
- python
- python3-libselinux

View File

@ -12,7 +12,7 @@
value: "{{ http_proxy | default(omit) }}"
state: "{{ http_proxy | default(False) | ternary('present', 'absent') }}"
no_extra_spaces: true
mode: 0644
mode: "0644"
become: true
when: not skip_http_proxy_on_os_packages
@ -21,7 +21,7 @@
get_url:
url: https://yum.oracle.com/public-yum-ol7.repo
dest: /etc/yum.repos.d/public-yum-ol7.repo
mode: 0644
mode: "0644"
when:
- use_oracle_public_repo | default(true)
- '''ID="ol"'' in os_release.stdout_lines'
@ -34,7 +34,7 @@
section: "{{ item }}"
option: enabled
value: "1"
mode: 0644
mode: "0644"
with_items:
- ol7_latest
- ol7_addons
@ -59,7 +59,7 @@
section: "ol{{ ansible_distribution_major_version }}_addons"
option: "{{ item.option }}"
value: "{{ item.value }}"
mode: 0644
mode: "0644"
with_items:
- { option: "name", value: "ol{{ ansible_distribution_major_version }}_addons" }
- { option: "enabled", value: "1" }
@ -75,18 +75,45 @@
section: "extras"
option: "{{ item.option }}"
value: "{{ item.value }}"
mode: 0644
mode: "0644"
with_items:
- { option: "name", value: "CentOS-{{ ansible_distribution_major_version }} - Extras" }
- { option: "enabled", value: "1" }
- { option: "gpgcheck", value: "0" }
- { option: "baseurl", value: "http://mirror.centos.org/{{ 'altarch' if (ansible_distribution_major_version | int) <= 7 and ansible_architecture == 'aarch64' else 'centos' }}/{{ ansible_distribution_major_version }}/extras/$basearch/{% if ansible_distribution_major_version | int > 7 %}os/{% endif %}" }
- { option: "baseurl", value: "http://vault.centos.org/{{ 'altarch' if (ansible_distribution_major_version | int) <= 7 and ansible_architecture == 'aarch64' else 'centos' }}/{{ ansible_distribution_major_version }}/extras/$basearch/{% if ansible_distribution_major_version | int > 7 %}os/{% endif %}" }
when:
- use_oracle_public_repo | default(true)
- '''ID="ol"'' in os_release.stdout_lines'
- (ansible_distribution_version | float) >= 7.6
- (ansible_distribution_version | float) < 9
# CentOS 7 EOL at July 1, 2024.
- name: Check CentOS-Base.repo exists for CentOS 7
stat:
path: /etc/yum.repos.d/CentOS-Base.repo
register: centos_base_repo_stat
when:
- ansible_distribution_major_version == "7"
# CentOS 7 EOL at July 1, 2024.
- name: Update CentOS 7 CentOS-Base.repo
when:
- ansible_distribution_major_version == "7"
- centos_base_repo_stat.stat.exists
become: true
block:
- name: Disable CentOS 7 mirrorlist in CentOS-Base.repo
replace:
path: "{{ centos_base_repo_stat.stat.path }}"
regexp: '^mirrorlist='
replace: '#mirrorlist='
- name: Update CentOS 7 baseurl in CentOS-Base.repo
replace:
path: "{{ centos_base_repo_stat.stat.path }}"
regexp: '^#baseurl=http:\/\/mirror.centos.org'
replace: 'baseurl=http:\/\/vault.centos.org'
# CentOS ships with python installed
- name: Check presence of fastestmirror.conf

View File

@ -7,7 +7,7 @@
state: present
- name: Make sure docker service is enabled
systemd:
systemd_service:
name: docker
masked: false
enabled: true

View File

@ -62,3 +62,14 @@
- '"changed its" in bootstrap_update_apt_result.stdout'
- '"value from" in bootstrap_update_apt_result.stdout'
ignore_errors: true
- name: Disable kernel unattended-upgrades
lineinfile:
path: /etc/apt/apt.conf.d/50unattended-upgrades
insertafter: "Unattended-Upgrade::Package-Blacklist"
line: '"linux-";'
state: present
become: true
when:
- os_release_dict['ID'] == 'ubuntu'
- ubuntu_kernel_unattended_upgrades_disabled

View File

@ -17,7 +17,7 @@
value: "{{ http_proxy | default(omit) }}"
state: "{{ http_proxy | default(False) | ternary('present', 'absent') }}"
no_extra_spaces: true
mode: 0644
mode: "0644"
become: true
when: not skip_http_proxy_on_os_packages

View File

@ -26,7 +26,7 @@
ansible_interpreter_python_fallback: "{{ ansible_interpreter_python_fallback + [ '/opt/bin/python' ] }}"
- name: Disable auto-upgrade
systemd:
systemd_service:
name: locksmithd.service
masked: true
state: stopped

View File

@ -36,7 +36,7 @@
file:
path: "{{ ansible_remote_tmp | default('~/.ansible/tmp') }}"
state: directory
mode: 0700
mode: "0700"
- name: Gather facts
setup:
@ -61,4 +61,4 @@
state: directory
owner: root
group: root
mode: 0755
mode: "0755"

View File

@ -12,7 +12,7 @@
value: "{{ http_proxy | default(omit) }}"
state: "{{ http_proxy | default(False) | ternary('present', 'absent') }}"
no_extra_spaces: true
mode: 0644
mode: "0644"
become: true
when: not skip_http_proxy_on_os_packages

View File

@ -1,6 +1,6 @@
---
- name: Containerd | restart containerd
systemd:
systemd_service:
name: containerd
state: restarted
enabled: yes

View File

@ -35,7 +35,7 @@
unarchive:
src: "{{ downloads.containerd.dest }}"
dest: "{{ containerd_bin_dir }}"
mode: 0755
mode: "0755"
remote_src: yes
extra_opts:
- --strip-components=1
@ -60,7 +60,7 @@
template:
src: containerd.service.j2
dest: /etc/systemd/system/containerd.service
mode: 0644
mode: "0644"
validate: "sh -c '[ -f /usr/bin/systemd/system/factory-reset.target ] || exit 0 && systemd-analyze verify %s:containerd.service'"
# FIXME: check that systemd version >= 250 (factory-reset.target was introduced in that release)
# Remove once we drop support for systemd < 250
@ -70,7 +70,7 @@
file:
dest: "{{ item }}"
state: directory
mode: 0755
mode: "0755"
owner: root
group: root
with_items:
@ -83,7 +83,7 @@
template:
src: http-proxy.conf.j2
dest: "{{ containerd_systemd_dir }}/http-proxy.conf"
mode: 0644
mode: "0644"
notify: Restart containerd
when: http_proxy is defined or https_proxy is defined
@ -102,7 +102,7 @@
content: "{{ item.value }}"
dest: "{{ containerd_cfg_dir }}/{{ item.key }}"
owner: "root"
mode: 0644
mode: "0644"
with_dict: "{{ containerd_base_runtime_specs | default({}) }}"
notify: Restart containerd
@ -111,7 +111,7 @@
src: config.toml.j2
dest: "{{ containerd_cfg_dir }}/config.toml"
owner: "root"
mode: 0640
mode: "0640"
notify: Restart containerd
- name: Containerd | Configure containerd registries
@ -121,13 +121,13 @@
file:
path: "{{ containerd_cfg_dir }}/certs.d/{{ item.prefix }}"
state: directory
mode: 0755
mode: "0755"
loop: "{{ containerd_registries_mirrors }}"
- name: Containerd | Write hosts.toml file
template:
src: hosts.toml.j2
dest: "{{ containerd_cfg_dir }}/certs.d/{{ item.prefix }}/hosts.toml"
mode: 0640
mode: "0640"
loop: "{{ containerd_registries_mirrors }}"
# you can sometimes end up in a state where everything is installed
@ -136,7 +136,7 @@
meta: flush_handlers
- name: Containerd | Ensure containerd is started and enabled
systemd:
systemd_service:
name: containerd
daemon_reload: yes
enabled: yes

View File

@ -100,9 +100,9 @@ oom_score = {{ containerd_oom_score }}
[plugins."io.containerd.tracing.processor.v1.otlp"]
endpoint = "{{ containerd_tracing_endpoint }}"
protocol = "{{ containerd_tracing_protocol }}"
{% if containerd_tracing_protocol == "grpc" %}
{% if containerd_tracing_protocol == "grpc" %}
insecure = false
{% endif %}
{% endif %}
[plugins."io.containerd.internal.v1.tracing"]
sampling_ratio = {{ containerd_tracing_sampling_ratio }}
service_name = "{{ containerd_tracing_service_name }}"

View File

@ -1,6 +1,6 @@
---
- name: Cri-dockerd | reload systemd
systemd:
systemd_service:
name: cri-dockerd
daemon_reload: true
masked: no

View File

@ -28,7 +28,7 @@
src: "{{ item }}"
dest: "/tmp/{{ item }}"
owner: root
mode: 0644
mode: "0644"
with_items:
- container.json
- sandbox.json
@ -37,12 +37,12 @@
path: /etc/cni/net.d
state: directory
owner: "{{ kube_owner }}"
mode: 0755
mode: "0755"
- name: Setup CNI
copy:
src: "{{ item }}"
dest: "/etc/cni/net.d/{{ item }}"
owner: root
mode: 0644
mode: "0644"
with_items:
- 10-mynet.conf

View File

@ -8,7 +8,7 @@
copy:
src: "{{ local_release_dir }}/cri-dockerd"
dest: "{{ bin_dir }}/cri-dockerd"
mode: 0755
mode: "0755"
remote_src: true
notify:
- Restart and enable cri-dockerd
@ -17,7 +17,7 @@
template:
src: "{{ item }}.j2"
dest: "/etc/systemd/system/{{ item }}"
mode: 0644
mode: "0644"
validate: "sh -c '[ -f /usr/bin/systemd/system/factory-reset.target ] || exit 0 && systemd-analyze verify %s:{{ item }}'"
# FIXME: check that systemd version >= 250 (factory-reset.target was introduced in that release)
# Remove once we drop support for systemd < 250

View File

@ -1,6 +1,6 @@
---
- name: CRI-O | reload systemd
systemd:
systemd_service:
daemon_reload: true
listen: Restart crio

View File

@ -33,7 +33,7 @@
src: "{{ item }}"
dest: "/tmp/{{ item }}"
owner: root
mode: 0644
mode: "0644"
with_items:
- container.json
- sandbox.json
@ -42,12 +42,12 @@
path: /etc/cni/net.d
state: directory
owner: "{{ kube_owner }}"
mode: 0755
mode: "0755"
- name: Setup CNI
copy:
src: "{{ item }}"
dest: "/etc/cni/net.d/{{ item }}"
owner: root
mode: 0644
mode: "0644"
with_items:
- 10-mynet.conf

View File

@ -56,27 +56,27 @@
file:
path: "{{ item }}"
state: directory
mode: 0755
mode: "0755"
- name: Cri-o | install cri-o config
template:
src: crio.conf.j2
dest: /etc/crio/crio.conf
mode: 0644
mode: "0644"
register: config_install
- name: Cri-o | install config.json
template:
src: config.json.j2
dest: /etc/crio/config.json
mode: 0644
mode: "0644"
register: reg_auth_install
- name: Cri-o | copy binaries
copy:
src: "{{ local_release_dir }}/cri-o/bin/{{ item }}"
dest: "{{ bin_dir }}/{{ item }}"
mode: 0755
mode: "0755"
remote_src: true
with_items:
- "{{ crio_bin_files }}"
@ -86,7 +86,7 @@
copy:
src: "{{ local_release_dir }}/cri-o/contrib/crio.service"
dest: /etc/systemd/system/crio.service
mode: 0755
mode: "0755"
remote_src: true
notify: Restart crio
@ -115,7 +115,7 @@
copy:
src: "{{ local_release_dir }}/cri-o/contrib/policy.json"
dest: /etc/containers/policy.json
mode: 0755
mode: "0755"
remote_src: true
notify: Restart crio
@ -123,7 +123,7 @@
copy:
src: mounts.conf
dest: /etc/containers/mounts.conf
mode: 0644
mode: "0644"
when:
- ansible_os_family == 'RedHat'
notify: Restart crio
@ -133,7 +133,7 @@
path: /etc/containers/oci/hooks.d
state: directory
owner: root
mode: 0755
mode: "0755"
- name: Cri-o | set overlay driver
community.general.ini_file:
@ -141,7 +141,7 @@
section: storage
option: "{{ item.option }}"
value: "{{ item.value }}"
mode: 0644
mode: "0644"
with_items:
- option: driver
value: '"overlay"'
@ -157,20 +157,20 @@
section: storage.options.overlay
option: mountopt
value: '{{ ''"nodev"'' if ansible_kernel is version_compare(("4.18" if ansible_os_family == "RedHat" else "4.19"), "<") else ''"nodev,metacopy=on"'' }}'
mode: 0644
mode: "0644"
- name: Cri-o | create directory registries configs
file:
path: /etc/containers/registries.conf.d
state: directory
owner: root
mode: 0755
mode: "0755"
- name: Cri-o | write registries configs
template:
src: registry.conf.j2
dest: "/etc/containers/registries.conf.d/10-{{ item.prefix | default(item.location) | regex_replace(':|/', '_') }}.conf"
mode: 0644
mode: "0644"
loop: "{{ crio_registries }}"
notify: Restart crio
@ -178,14 +178,14 @@
template:
src: unqualified.conf.j2
dest: "/etc/containers/registries.conf.d/01-unqualified.conf"
mode: 0644
mode: "0644"
notify: Restart crio
- name: Cri-o | write cri-o proxy drop-in
template:
src: http-proxy.conf.j2
dest: /etc/systemd/system/crio.service.d/http-proxy.conf
mode: 0644
mode: "0644"
notify: Restart crio
when: http_proxy is defined or https_proxy is defined

View File

@ -20,7 +20,7 @@
option: enabled
value: "0"
backup: yes
mode: 0644
mode: "0644"
when:
- amzn2_extras_file_stat.stat.exists
- not amzn2_extras_docker_repo.changed

View File

@ -9,4 +9,4 @@
copy:
dest: /etc/bash_completion.d/crictl
content: "{{ cri_completion.stdout }}"
mode: 0644
mode: "0644"

View File

@ -9,13 +9,13 @@
src: crictl.yaml.j2
dest: /etc/crictl.yaml
owner: root
mode: 0644
mode: "0644"
- name: Copy crictl binary from download dir
copy:
src: "{{ local_release_dir }}/crictl"
dest: "{{ bin_dir }}/crictl"
mode: 0755
mode: "0755"
remote_src: true
notify:
- Get crictl completion

View File

@ -8,5 +8,5 @@
copy:
src: "{{ downloads.crun.dest }}"
dest: "{{ bin_dir }}/crun"
mode: 0755
mode: "0755"
remote_src: true

View File

@ -10,12 +10,12 @@
template:
src: docker-storage-setup.j2
dest: /etc/sysconfig/docker-storage-setup
mode: 0644
mode: "0644"
- name: Docker-storage-override-directory | docker service storage-setup override dir
file:
dest: /etc/systemd/system/docker.service.d
mode: 0755
mode: "0755"
owner: root
group: root
state: directory
@ -30,7 +30,7 @@
owner: root
group: root
mode: 0644
mode: "0644"
# https://docs.docker.com/engine/installation/linux/docker-ce/centos/#install-using-the-repository
- name: Docker-storage-setup | install lvm2

View File

@ -1,6 +1,6 @@
---
- name: Docker | reload systemd
systemd:
systemd_service:
name: docker
daemon_reload: true
masked: no

View File

@ -82,14 +82,14 @@
template:
src: "fedora_docker.repo.j2"
dest: "{{ yum_repo_dir }}/docker.repo"
mode: 0644
mode: "0644"
when: ansible_distribution == "Fedora" and not is_ostree
- name: Configure docker repository on RedHat/CentOS/OracleLinux/AlmaLinux/KylinLinux
template:
src: "rh_docker.repo.j2"
dest: "{{ yum_repo_dir }}/docker-ce.repo"
mode: 0644
mode: "0644"
when:
- ansible_os_family == "RedHat"
- ansible_distribution != "Fedora"

View File

@ -102,5 +102,5 @@
ignore_errors: true # noqa ignore-errors
- name: Docker | systemctl daemon-reload # noqa no-handler
systemd:
systemd_service:
daemon_reload: true

View File

@ -3,13 +3,13 @@
file:
path: /etc/systemd/system/docker.service.d
state: directory
mode: 0755
mode: "0755"
- name: Write docker proxy drop-in
template:
src: http-proxy.conf.j2
dest: /etc/systemd/system/docker.service.d/http-proxy.conf
mode: 0644
mode: "0644"
notify: Restart docker
when: http_proxy is defined or https_proxy is defined
@ -27,7 +27,7 @@
template:
src: docker.service.j2
dest: /etc/systemd/system/docker.service
mode: 0644
mode: "0644"
register: docker_service_file
notify: Restart docker
when:
@ -38,14 +38,14 @@
template:
src: docker-options.conf.j2
dest: "/etc/systemd/system/docker.service.d/docker-options.conf"
mode: 0644
mode: "0644"
notify: Restart docker
- name: Write docker dns systemd drop-in
template:
src: docker-dns.conf.j2
dest: "/etc/systemd/system/docker.service.d/docker-dns.conf"
mode: 0644
mode: "0644"
notify: Restart docker
when: dns_mode != 'none' and resolvconf_mode == 'docker_dns'
@ -53,14 +53,14 @@
copy:
src: cleanup-docker-orphans.sh
dest: "{{ bin_dir }}/cleanup-docker-orphans.sh"
mode: 0755
mode: "0755"
when: docker_orphan_clean_up | bool
- name: Write docker orphan clean up systemd drop-in
template:
src: docker-orphan-cleanup.conf.j2
dest: "/etc/systemd/system/docker.service.d/docker-orphan-cleanup.conf"
mode: 0644
mode: "0644"
notify: Restart docker
when: docker_orphan_clean_up | bool

View File

@ -24,8 +24,9 @@ containerd_versioned_pkg:
'1.6.18': "{{ containerd_package }}=1.6.18-1"
'1.6.28': "{{ containerd_package }}=1.6.28-2"
'1.6.31': "{{ containerd_package }}=1.6.31-1"
'stable': "{{ containerd_package }}=1.6.31-1"
'edge': "{{ containerd_package }}=1.6.31-1"
'1.6.32': "{{ containerd_package }}=1.6.32-1"
'stable': "{{ containerd_package }}=1.6.32-1"
'edge': "{{ containerd_package }}=1.6.32-1"
# https://download.docker.com/linux/debian/
docker_versioned_pkg:

View File

@ -24,8 +24,9 @@ containerd_versioned_pkg:
'1.6.18': "{{ containerd_package }}-1.6.18-3.1.fc{{ ansible_distribution_major_version }}"
'1.6.28': "{{ containerd_package }}-1.6.28-3.2.fc{{ ansible_distribution_major_version }}"
'1.6.31': "{{ containerd_package }}-1.6.31-3.1.fc{{ ansible_distribution_major_version }}"
'stable': "{{ containerd_package }}-1.6.31-3.1.fc{{ ansible_distribution_major_version }}"
'edge': "{{ containerd_package }}-1.6.31-3.1.fc{{ ansible_distribution_major_version }}"
'1.6.32': "{{ containerd_package }}-1.6.32-3.1.fc{{ ansible_distribution_major_version }}"
'stable': "{{ containerd_package }}-1.6.32-3.1.fc{{ ansible_distribution_major_version }}"
'edge': "{{ containerd_package }}-1.6.32-3.1.fc{{ ansible_distribution_major_version }}"
# https://docs.docker.com/install/linux/docker-ce/fedora/
# https://download.docker.com/linux/fedora/<fedora-version>/x86_64/stable/Packages/

View File

@ -29,8 +29,9 @@ containerd_versioned_pkg:
'1.6.18': "{{ containerd_package }}-1.6.18-3.1.el8"
'1.6.28': "{{ containerd_package }}-1.6.28-3.1.el8"
'1.6.31': "{{ containerd_package }}-1.6.31-3.1.el8"
'stable': "{{ containerd_package }}-1.6.31-3.1.el8"
'edge': "{{ containerd_package }}-1.6.31-3.1.el8"
'1.6.32': "{{ containerd_package }}-1.6.32-3.1.el8"
'stable': "{{ containerd_package }}-1.6.32-3.1.el8"
'edge': "{{ containerd_package }}-1.6.32-3.1.el8"
# https://docs.docker.com/engine/installation/linux/centos/#install-from-a-package
# https://download.docker.com/linux/centos/8/x86_64/stable/Packages/

View File

@ -24,8 +24,9 @@ containerd_versioned_pkg:
'1.6.18': "{{ containerd_package }}-1.6.18-3.1.el7"
'1.6.28': "{{ containerd_package }}-1.6.28-3.1.el7"
'1.6.31': "{{ containerd_package }}-1.6.31-3.1.el7"
'stable': "{{ containerd_package }}-1.6.31-3.1.el7"
'edge': "{{ containerd_package }}-1.6.31-3.1.el7"
'1.6.32': "{{ containerd_package }}-1.6.32-3.1.el7"
'stable': "{{ containerd_package }}-1.6.32-3.1.el7"
'edge': "{{ containerd_package }}-1.6.32-3.1.el7"
# https://docs.docker.com/engine/installation/linux/centos/#install-from-a-package
# https://download.docker.com/linux/centos/<centos_version>>/x86_64/stable/Packages/

View File

@ -24,8 +24,9 @@ containerd_versioned_pkg:
'1.6.18': "{{ containerd_package }}-1.6.18-3.1.el{{ ansible_distribution_major_version }}"
'1.6.28': "{{ containerd_package }}-1.6.28-3.1.el{{ ansible_distribution_major_version }}"
'1.6.31': "{{ containerd_package }}-1.6.31-3.1.el{{ ansible_distribution_major_version }}"
'stable': "{{ containerd_package }}-1.6.31-3.1.el{{ ansible_distribution_major_version }}"
'edge': "{{ containerd_package }}-1.6.31-3.1.el{{ ansible_distribution_major_version }}"
'1.6.32': "{{ containerd_package }}-1.6.32-3.1.el{{ ansible_distribution_major_version }}"
'stable': "{{ containerd_package }}-1.6.32-3.1.el{{ ansible_distribution_major_version }}"
'edge': "{{ containerd_package }}-1.6.32-3.1.el{{ ansible_distribution_major_version }}"
# https://docs.docker.com/engine/installation/linux/centos/#install-from-a-package
# https://download.docker.com/linux/centos/<centos_version>>/x86_64/stable/Packages/

View File

@ -24,8 +24,9 @@ containerd_versioned_pkg:
'1.6.18': "{{ containerd_package }}=1.6.18-1"
'1.6.28': "{{ containerd_package }}=1.6.28-2"
'1.6.31': "{{ containerd_package }}=1.6.31-1"
'stable': "{{ containerd_package }}=1.6.31-1"
'edge': "{{ containerd_package }}=1.6.31-1"
'1.6.32': "{{ containerd_package }}=1.6.32-1"
'stable': "{{ containerd_package }}=1.6.32-1"
'edge': "{{ containerd_package }}=1.6.32-1"
# https://download.docker.com/linux/ubuntu/
docker_versioned_pkg:
@ -49,8 +50,8 @@ docker_cli_versioned_pkg:
'24.0': docker-ce-cli=5:24.0.9-1~ubuntu.{{ ansible_distribution_version }}~{{ ansible_distribution_release | lower }}
'26.0': docker-ce-cli=5:26.0.2-1~ubuntu.{{ ansible_distribution_version }}~{{ ansible_distribution_release | lower }}
'26.1': docker-ce-cli=5:26.1.2-1~ubuntu.{{ ansible_distribution_version }}~{{ ansible_distribution_release | lower }}
'stable': docker-ce-cli=5:24.0.9-1~ubuntu.{{ ansible_distribution_version }}~{{ ansible_distribution_release | lower }}
'edge': docker-ce-cli=5:24.0.9-1~ubuntu.{{ ansible_distribution_version }}~{{ ansible_distribution_release | lower }}
'stable': docker-ce-cli=5:26.1.2-1~ubuntu.{{ ansible_distribution_version }}~{{ ansible_distribution_release | lower }}
'edge': docker-ce-cli=5:26.1.2-1~ubuntu.{{ ansible_distribution_version }}~{{ ansible_distribution_release | lower }}
docker_package_info:
pkgs:

View File

@ -21,8 +21,9 @@ containerd_versioned_pkg:
'1.6.16': "{{ containerd_package }}-1.6.16-3.1.el{{ ansible_distribution_major_version }}"
'1.6.18': "{{ containerd_package }}-1.6.18-3.1.el{{ ansible_distribution_major_version }}"
'1.6.28': "{{ containerd_package }}-1.6.28-3.1.el{{ ansible_distribution_major_version }}"
'stable': "{{ containerd_package }}-1.6.28-3.1.el{{ ansible_distribution_major_version }}"
'edge': "{{ containerd_package }}-1.6.28-3.1.el{{ ansible_distribution_major_version }}"
'1.6.32': "{{ containerd_package }}-1.6.32-3.1.el{{ ansible_distribution_major_version }}"
'stable': "{{ containerd_package }}-1.6.32-3.1.el{{ ansible_distribution_major_version }}"
'edge': "{{ containerd_package }}-1.6.32-3.1.el{{ ansible_distribution_major_version }}"
docker_version: 19.03
docker_cli_version: 19.03

View File

@ -29,7 +29,7 @@
src: "{{ item }}"
dest: "/tmp/{{ item }}"
owner: root
mode: 0644
mode: "0644"
with_items:
- container.json
- sandbox.json
@ -38,12 +38,12 @@
path: /etc/cni/net.d
state: directory
owner: root
mode: 0755
mode: "0755"
- name: Setup CNI
copy:
src: "{{ item }}"
dest: "/etc/cni/net.d/{{ item }}"
owner: root
mode: 0644
mode: "0644"
with_items:
- 10-mynet.conf

View File

@ -13,7 +13,7 @@
copy:
src: "{{ item.src }}"
dest: "{{ bin_dir }}/{{ item.dest }}"
mode: 0755
mode: "0755"
remote_src: yes
with_items:
- { src: "{{ downloads.gvisor_runsc.dest }}", dest: "runsc" }

View File

@ -29,7 +29,7 @@
src: "{{ item }}"
dest: "/tmp/{{ item }}"
owner: root
mode: 0644
mode: "0644"
with_items:
- container.json
- sandbox.json
@ -38,12 +38,12 @@
path: /etc/cni/net.d
state: directory
owner: "{{ kube_owner }}"
mode: 0755
mode: "0755"
- name: Setup CNI
copy:
src: "{{ item }}"
dest: "/etc/cni/net.d/{{ item }}"
owner: root
mode: 0644
mode: "0644"
with_items:
- 10-mynet.conf

View File

@ -8,7 +8,7 @@
unarchive:
src: "{{ downloads.kata_containers.dest }}"
dest: "/"
mode: 0755
mode: "0755"
owner: root
group: root
remote_src: yes
@ -17,13 +17,13 @@
file:
path: "{{ kata_containers_config_dir }}"
state: directory
mode: 0755
mode: "0755"
- name: Kata-containers | Set configuration
template:
src: "{{ item }}.j2"
dest: "{{ kata_containers_config_dir }}/{{ item }}"
mode: 0644
mode: "0644"
with_items:
- configuration-qemu.toml
@ -33,7 +33,7 @@
template:
dest: "{{ kata_containers_containerd_bin_dir }}/containerd-shim-kata-{{ item }}-v2"
src: containerd-shim-kata-v2.j2
mode: 0755
mode: "0755"
with_items:
- qemu
@ -48,7 +48,7 @@
- name: Kata-containers | Persist vhost kernel modules
copy:
dest: /etc/modules-load.d/kubespray-kata-containers.conf
mode: 0644
mode: "0644"
content: |
vhost_vsock
vhost_net

View File

@ -9,4 +9,4 @@
copy:
dest: /etc/bash_completion.d/nerdctl
content: "{{ nerdctl_completion.stdout }}"
mode: 0644
mode: "0644"

View File

@ -8,7 +8,7 @@
copy:
src: "{{ local_release_dir }}/nerdctl"
dest: "{{ bin_dir }}/nerdctl"
mode: 0755
mode: "0755"
remote_src: true
owner: root
group: root
@ -21,7 +21,7 @@
file:
path: /etc/nerdctl
state: directory
mode: 0755
mode: "0755"
owner: root
group: root
become: true
@ -30,7 +30,7 @@
template:
src: nerdctl.toml.j2
dest: /etc/nerdctl/nerdctl.toml
mode: 0644
mode: "0644"
owner: root
group: root
become: true

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