Skip to content

Commit efbe5a7

Browse files
authored
29.0.0+1.32.8 (#58)
* update kubelet systemd service file (integrate kubelet with the systemd watchdog) * k8s_worker_release to 1.32.8 * Removed Ubuntu 20.04 because reached end of life * fix ansible-lint issues * update README/CHANGELOG * update meta/main.yml
1 parent e174163 commit efbe5a7

File tree

7 files changed

+48
-21
lines changed

7 files changed

+48
-21
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## 29.0.0+1.32.8
4+
5+
- **BREAKING**
6+
- Removed Ubuntu 20.04 because reached end of life
7+
8+
- **UPDATE**
9+
- update `k8s_worker_release` to `1.32.8`
10+
- `kubelet.service.j2`: Update `kubelet` systemd service file. Utilize the systemd watchdog capability to restart the kubelet when the kubelet health check fails, and limit the maximum number of restarts within a given time period. This can enhance the reliability of the kubelet to some extent (see [integrate kubelet with the systemd watchdog](https://github.com/kubernetes/kubernetes/pull/127566)):
11+
- Changed: `Restart=on-failure` -> `Restart=always`
12+
- Changed: `RestartSec=5` -> `RestartSec=10`
13+
- Added: `WatchdogSec=30s`
14+
15+
- **MOLECULE**
16+
- Removed Ubuntu 20.04 because reached end of life
17+
- Fix `ansible-lint` issues
18+
319
## 28.0.1+1.31.11
420

521
- **UPDATE**

README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This Ansible role is used in [Kubernetes the not so hard way with Ansible - Work
44

55
## Versions
66

7-
I tag every release and try to stay with [semantic versioning](http://semver.org). If you want to use the role I recommend to checkout the latest tag. The master branch is basically development while the tags mark stable releases. But in general I try to keep master in good shape too. A tag `28.0.0+1.31.5` means this is release `28.0.0` of this role and it's meant to be used with Kubernetes version `1.31.5` (but should work with any K8s 1.31.x release of course). If the role itself changes `X.Y.Z` before `+` will increase. If the Kubernetes version changes `X.Y.Z` after `+` will increase too. This allows to tag bugfixes and new major versions of the role while it's still developed for a specific Kubernetes release. That's especially useful for Kubernetes major releases with breaking changes.
7+
I tag every release and try to stay with [semantic versioning](http://semver.org). If you want to use the role I recommend to checkout the latest tag. The master branch is basically development while the tags mark stable releases. But in general I try to keep master in good shape too. A tag `29.0.0+1.32.8` means this is release `29.0.0` of this role and it's meant to be used with Kubernetes version `1.32.8` (but should work with any K8s 1.31.x release of course). If the role itself changes `X.Y.Z` before `+` will increase. If the Kubernetes version changes `X.Y.Z` after `+` will increase too. This allows to tag bugfixes and new major versions of the role while it's still developed for a specific Kubernetes release. That's especially useful for Kubernetes major releases with breaking changes.
88

99
## Requirements
1010

@@ -14,7 +14,6 @@ You also need [containerd](https://github.com/githubixx/ansible-role-containerd)
1414

1515
## Supported OS
1616

17-
- Ubuntu 20.04 (Focal Fossa) (reaches EOL April 2025 - not recommended)
1817
- Ubuntu 22.04 (Jammy Jellyfish)
1918
- Ubuntu 24.04 (Noble Numbat) (recommended)
2019

@@ -28,6 +27,22 @@ See full [CHANGELOG.md](https://github.com/githubixx/ansible-role-kubernetes-wor
2827

2928
**Recent changes:**
3029

30+
## 29.0.0+1.32.8
31+
32+
- **BREAKING**
33+
- Removed Ubuntu 20.04 because reached end of life
34+
35+
- **UPDATE**
36+
- update `k8s_worker_release` to `1.32.8`
37+
- `kubelet.service.j2`: Update `kubelet` systemd service file. Utilize the systemd watchdog capability to restart the kubelet when the kubelet health check fails, and limit the maximum number of restarts within a given time period. This can enhance the reliability of the kubelet to some extent (see [integrate kubelet with the systemd watchdog](https://github.com/kubernetes/kubernetes/pull/127566)):
38+
- Changed: `Restart=on-failure` -> `Restart=always`
39+
- Changed: `RestartSec=5` -> `RestartSec=10`
40+
- Added: `WatchdogSec=30s`
41+
42+
- **MOLECULE**
43+
- Removed Ubuntu 20.04 because reached end of life
44+
- Fix `ansible-lint` issues
45+
3146
## 28.0.1+1.31.11
3247

3348
- **UPDATE**
@@ -52,11 +67,6 @@ See full [CHANGELOG.md](https://github.com/githubixx/ansible-role-kubernetes-wor
5267
- support Ubuntu 24.04
5368
- update `.yamllint`
5469

55-
## 26.0.2+1.29.9
56-
57-
- **OTHER CHANGES**
58-
- fix download URLs for Kubernetes binaries (see: [Download Kubernetes - Binaries](https://kubernetes.io/releases/download/#binaries)
59-
6070
## Installation
6171

6272
- Directly download from Github (Change into Ansible roles directory before cloning. You can figure out the role path by using `ansible-config dump | grep DEFAULT_ROLES_PATH` command):
@@ -73,7 +83,7 @@ See full [CHANGELOG.md](https://github.com/githubixx/ansible-role-kubernetes-wor
7383
roles:
7484
- name: githubixx.kubernetes_worker
7585
src: https://github.com/githubixx/ansible-role-kubernetes-worker.git
76-
version: 28.0.1+1.31.11
86+
version: 29.0.0+1.32.8
7787
```
7888
7989
## Role Variables
@@ -101,7 +111,7 @@ k8s_worker_pki_dir: "{{ k8s_worker_conf_dir }}/pki"
101111
k8s_worker_bin_dir: "/usr/local/bin"
102112

103113
# K8s release
104-
k8s_worker_release: "1.31.11"
114+
k8s_worker_release: "1.32.8"
105115

106116
# The interface on which the Kubernetes services should listen on. As all cluster
107117
# communication should use a VPN interface the interface name is
@@ -249,7 +259,7 @@ k8s_worker_kubeproxy_conf_yaml: |
249259
250260
## Testing
251261
252-
This role has a small test setup that is created using [Molecule](https://github.com/ansible-community/molecule), libvirt (vagrant-libvirt) and QEMU/KVM. Please see my blog post [Testing Ansible roles with Molecule, libvirt (vagrant-libvirt) and QEMU/KVM](https://www.tauceti.blog/posts/testing-ansible-roles-with-molecule-libvirt-vagrant-qemu-kvm/) how to setup. The test configuration is [here](https://github.com/githubixx/ansible-role-kubernetes-worker/tree/master/molecule/default).
262+
This role has a small test setup that is created using [Molecule](https://github.com/ansible-community/molecule), libvirt (vagrant-libvirt) and QEMU/KVM. Please see my blog post [Testing Ansible roles with Molecule, libvirt (vagrant-libvirt) and QEMU/KVM](https://www.tauceti.blog/posts/testing-ansible-roles-with-molecule-libvirt-vagrant-qemu-kvm/) how to setup. The Molecule test configuration is in [molecule/default](https://github.com/githubixx/ansible-role-kubernetes-worker/tree/master/molecule/default).
253263
254264
Afterwards Molecule can be executed. This will setup a few virtual machines (VM) with supported Ubuntu OS and installs a Kubernetes cluster:
255265

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ k8s_worker_pki_dir: "{{ k8s_worker_conf_dir }}/pki"
2121
k8s_worker_bin_dir: "/usr/local/bin"
2222

2323
# K8s release
24-
k8s_worker_release: "1.31.11"
24+
k8s_worker_release: "1.32.8"
2525

2626
# The interface on which the Kubernetes services should listen on. As all cluster
2727
# communication should use a VPN interface the interface name is

meta/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ galaxy_info:
99
platforms:
1010
- name: Ubuntu
1111
versions:
12-
- "focal"
1312
- "jammy"
1413
- "noble"
1514
galaxy_tags:

molecule/default/molecule.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ platforms:
5656
type: static
5757
ip: 172.16.10.20
5858
- name: test-controller3
59-
box: alvistack/ubuntu-20.04
59+
box: alvistack/ubuntu-24.04
6060
memory: 2048
6161
cpus: 2
6262
groups:
@@ -120,12 +120,12 @@ platforms:
120120
type: static
121121
ip: 172.16.10.200
122122
- name: test-worker2
123-
box: alvistack/ubuntu-20.04
123+
box: alvistack/ubuntu-24.04
124124
memory: 2048
125125
cpus: 2
126126
groups:
127127
- vpn
128-
- ubuntu20
128+
- ubuntu24
129129
- k8s_worker
130130
- k8s
131131
interfaces:

molecule/default/verify.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515

1616
- name: Print namespaces
1717
ansible.builtin.debug:
18-
var: "{{ k8s__namespaces_info | community.general.json_query(query) }}"
18+
var: "{{ k8s__namespaces_info | community.general.json_query(mol__query) }}"
1919
vars:
20-
query: "length(resources)"
20+
mol__query: "length(resources)"
2121
when: ansible_verbosity > 1
2222

2323
- name: Register namespaces count
2424
ansible.builtin.set_fact:
25-
k8s__namespaces_count: "{{ k8s__namespaces_info | community.general.json_query(query) }}"
25+
k8s__namespaces_count: "{{ k8s__namespaces_info | community.general.json_query(mol__query) }}"
2626
vars:
27-
query: "length(resources)"
27+
mol__query: "length(resources)"
2828

2929
- name: There should be four namespaces at least
3030
ansible.builtin.assert:

templates/etc/systemd/system/kubelet.service.j2

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Description=Kubernetes Kubelet
44
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
55
After=network-online.target
66
After=containerd.service
7+
Requires=network-online.target
78
Requires=containerd.service
89
Wants=network-online.target
910

@@ -13,8 +14,9 @@ ExecStart={{ k8s_worker_bin_dir }}/kubelet \
1314
--{{ setting }}{% if k8s_worker_kubelet_settings[setting] != "" %}={{ k8s_worker_kubelet_settings[setting] }}{% endif %}{% if not loop.last %} \{% endif %}
1415
{%- endfor %}
1516

16-
Restart=on-failure
17-
RestartSec=5
17+
Restart=always
18+
RestartSec=10
19+
WatchdogSec=30s
1820

1921
[Install]
2022
WantedBy=multi-user.target

0 commit comments

Comments
 (0)