Skip to content

Commit d5f0950

Browse files
authored
27.0.0+1.32.8 (#75)
* Molecule: fix ansible-lint issues * update k8s_ctl_release to 1.32.7 * update k8s_ctl_release to 1.32.8 * Removed Ubuntu 20.04 because reached end of life * introduce k8s_apiserver_admission_plugins variable * remove withespace * fix typo
1 parent 0f04444 commit d5f0950

File tree

5 files changed

+85
-37
lines changed

5 files changed

+85
-37
lines changed

CHANGELOG.md

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

3+
## 27.0.0+1.32.8
4+
5+
- **BREAKING**
6+
- Removed Ubuntu 20.04 because reached end of life
7+
- Introduce `k8s_apiserver_admission_plugins` variable. Previously in `k8s_apiserver_settings` variable the values of `enable-admission-plugins` key was a string with list of admission plugins separated by commas. To make that string more readable `k8s_apiserver_admission_plugins` variable was introduced which is now a list of admissions plugins that is consumed by `enable-admission-plugins`. If you didn't changed `k8s_apiserver_admission_plugins` variable or used your own settings nothing changed for you.
8+
9+
- **UPDATE**
10+
- update `k8s_ctl_release` to `1.32.8`
11+
12+
- **MOLECULE**
13+
- Removed Ubuntu 20.04 because reached end of life
14+
- Fix `ansible-lint` issues
15+
316
## 26.0.2+1.31.11
417

518
- **UPDATE**

README.md

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This role is used in [Kubernetes the not so hard way with Ansible - Control plan
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 `26.0.1+1.31.5` means this is release `26.0.1` 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 `27.0.0+1.32.8` means this is release `27.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.32.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

@@ -16,7 +16,6 @@ And of course an [etcd](https://etcd.io/) cluster (see [Kubernetes the not so ha
1616

1717
## Supported OS
1818

19-
- Ubuntu 20.04 (Focal Fossa) (reaches EOL April 2025 - not recommended)
2019
- Ubuntu 22.04 (Jammy Jellyfish)
2120
- Ubuntu 24.04 (Noble Numbat) (recommended)
2221

@@ -30,6 +29,19 @@ See full [CHANGELOG.md](https://github.com/githubixx/ansible-role-kubernetes-con
3029

3130
**Recent changes:**
3231

32+
## 27.0.0+1.32.8
33+
34+
- **BREAKING**
35+
- Removed Ubuntu 20.04 because reached end of life
36+
- Introduce `k8s_apiserver_admission_plugins` variable. Previously in `k8s_apiserver_settings` variable the values of `enable-admission-plugins` key was a string with list of admission plugins separated by commas. To make that string more readable `k8s_apiserver_admission_plugins` variable was introduced which is now a list of admissions plugins that is consumed by `enable-admission-plugins`. If you didn't changed `k8s_apiserver_admission_plugins` variable or used your own settings nothing changed for you.
37+
38+
- **UPDATE**
39+
- update `k8s_ctl_release` to `1.32.8`
40+
41+
- **MOLECULE**
42+
- Removed Ubuntu 20.04 because reached end of life
43+
- Fix `ansible-lint` issues
44+
3345
## 26.0.2+1.31.11
3446

3547
- **UPDATE**
@@ -46,30 +58,6 @@ See full [CHANGELOG.md](https://github.com/githubixx/ansible-role-kubernetes-con
4658
- **UPDATE**
4759
- update `k8s_ctl_release` to `1.31.5`
4860

49-
## 25.0.1+1.30.9
50-
51-
- **UPDATE**
52-
- update `k8s_ctl_release` to `1.30.9`
53-
54-
- **OTHER CHANGES**
55-
- update `.gitignore`
56-
- fix `ansible-lint` issues
57-
58-
## 25.0.0+1.30.5
59-
60-
- **UPDATE**
61-
- update `k8s_ctl_release` to `1.30.5`
62-
63-
## 24.0.2+1.29.9
64-
65-
- **OTHER CHANGES**
66-
- fix download URLs for Kubernetes binaries (see: [Download Kubernetes - Binaries](https://kubernetes.io/releases/download/#binaries)
67-
68-
## 24.0.1+1.29.9
69-
70-
- **UPDATE**
71-
- update `k8s_ctl_release` to `1.29.9`
72-
7361
## Installation
7462

7563
- 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):
@@ -86,7 +74,7 @@ See full [CHANGELOG.md](https://github.com/githubixx/ansible-role-kubernetes-con
8674
roles:
8775
- name: githubixx.kubernetes_controller
8876
src: https://github.com/githubixx/ansible-role-kubernetes-controller.git
89-
version: 26.0.2+1.31.11
77+
version: 27.0.0+1.32.8
9078
```
9179
9280
## Role (default) variables
@@ -116,7 +104,7 @@ k8s_ctl_pki_dir: "{{ k8s_ctl_conf_dir }}/pki"
116104
k8s_ctl_bin_dir: "/usr/local/bin"
117105

118106
# The Kubernetes release.
119-
k8s_ctl_release: "1.31.11"
107+
k8s_ctl_release: "1.32.8"
120108

121109
# The interface on which the Kubernetes services should listen on. As all cluster
122110
# communication should use a VPN interface the interface name is
@@ -290,7 +278,7 @@ k8s_apiserver_settings:
290278
"advertise-address": "{{ hostvars[inventory_hostname]['ansible_' + k8s_interface].ipv4.address }}"
291279
"bind-address": "{{ hostvars[inventory_hostname]['ansible_' + k8s_interface].ipv4.address }}"
292280
"secure-port": "6443"
293-
"enable-admission-plugins": "NodeRestriction,NamespaceLifecycle,LimitRanger,ServiceAccount,TaintNodesByCondition,Priority,DefaultTolerationSeconds,DefaultStorageClass,PersistentVolumeClaimResize,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,PodSecurity,Priority,StorageObjectInUseProtection,RuntimeClass,CertificateApproval,CertificateSigning,ClusterTrustBundleAttest,CertificateSubjectRestriction,DefaultIngressClass"
281+
"enable-admission-plugins": "{{ k8s_apiserver_admission_plugins | join(',') }}"
294282
"allow-privileged": "true"
295283
"authorization-mode": "Node,RBAC"
296284
"audit-log-maxage": "30"
@@ -319,6 +307,30 @@ k8s_apiserver_settings:
319307
"tls-cert-file": "{{ k8s_ctl_pki_dir }}/cert-k8s-apiserver.pem"
320308
"tls-private-key-file": "{{ k8s_ctl_pki_dir }}/cert-k8s-apiserver-key.pem"
321309

310+
# kube-apiserver admission plugins used in "k8s_apiserver_settings" variable
311+
# for "enable-admission-plugins" key.
312+
k8s_apiserver_admission_plugins:
313+
- NodeRestriction
314+
- NamespaceLifecycle
315+
- LimitRanger
316+
- ServiceAccount
317+
- TaintNodesByCondition
318+
- Priority
319+
- DefaultTolerationSeconds
320+
- DefaultStorageClass
321+
- PersistentVolumeClaimResize
322+
- MutatingAdmissionWebhook
323+
- ValidatingAdmissionWebhook
324+
- ResourceQuota
325+
- PodSecurity
326+
- StorageObjectInUseProtection
327+
- RuntimeClass
328+
- CertificateApproval
329+
- CertificateSigning
330+
- ClusterTrustBundleAttest
331+
- CertificateSubjectRestriction
332+
- DefaultIngressClass
333+
322334
# This is the content of "encryption-config.yaml". Used by "kube-apiserver"
323335
# (see "encryption-provider-config" option in "k8s_apiserver_settings").
324336
# "kube-apiserver" will use this configuration to encrypt data before storing
@@ -466,7 +478,7 @@ The same is true for the `kube-controller-manager` by adding entries to `k8s_con
466478

467479
## Testing
468480

469-
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-controller/tree/master/molecule/default).
481+
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-controller/tree/master/molecule/default).
470482

471483
Afterwards Molecule can be executed:
472484

defaults/main.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ k8s_ctl_pki_dir: "{{ k8s_ctl_conf_dir }}/pki"
2323
k8s_ctl_bin_dir: "/usr/local/bin"
2424

2525
# The Kubernetes release.
26-
k8s_ctl_release: "1.31.11"
26+
k8s_ctl_release: "1.32.8"
2727

2828
# The interface on which the Kubernetes services should listen on. As all cluster
2929
# communication should use a VPN interface the interface name is
@@ -197,7 +197,7 @@ k8s_apiserver_settings:
197197
"advertise-address": "{{ hostvars[inventory_hostname]['ansible_' + k8s_interface].ipv4.address }}"
198198
"bind-address": "{{ hostvars[inventory_hostname]['ansible_' + k8s_interface].ipv4.address }}"
199199
"secure-port": "6443"
200-
"enable-admission-plugins": "NodeRestriction,NamespaceLifecycle,LimitRanger,ServiceAccount,TaintNodesByCondition,Priority,DefaultTolerationSeconds,DefaultStorageClass,PersistentVolumeClaimResize,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,PodSecurity,Priority,StorageObjectInUseProtection,RuntimeClass,CertificateApproval,CertificateSigning,ClusterTrustBundleAttest,CertificateSubjectRestriction,DefaultIngressClass"
200+
"enable-admission-plugins": "{{ k8s_apiserver_admission_plugins | join(',') }}"
201201
"allow-privileged": "true"
202202
"authorization-mode": "Node,RBAC"
203203
"audit-log-maxage": "30"
@@ -226,6 +226,30 @@ k8s_apiserver_settings:
226226
"tls-cert-file": "{{ k8s_ctl_pki_dir }}/cert-k8s-apiserver.pem"
227227
"tls-private-key-file": "{{ k8s_ctl_pki_dir }}/cert-k8s-apiserver-key.pem"
228228

229+
# kube-apiserver admission plugins used in "k8s_apiserver_settings" variable
230+
# for "enable-admission-plugins" key.
231+
k8s_apiserver_admission_plugins:
232+
- NodeRestriction
233+
- NamespaceLifecycle
234+
- LimitRanger
235+
- ServiceAccount
236+
- TaintNodesByCondition
237+
- Priority
238+
- DefaultTolerationSeconds
239+
- DefaultStorageClass
240+
- PersistentVolumeClaimResize
241+
- MutatingAdmissionWebhook
242+
- ValidatingAdmissionWebhook
243+
- ResourceQuota
244+
- PodSecurity
245+
- StorageObjectInUseProtection
246+
- RuntimeClass
247+
- CertificateApproval
248+
- CertificateSigning
249+
- ClusterTrustBundleAttest
250+
- CertificateSubjectRestriction
251+
- DefaultIngressClass
252+
229253
# This is the content of "encryption-config.yaml". Used by "kube-apiserver"
230254
# (see "encryption-provider-config" option in "k8s_apiserver_settings").
231255
# "kube-apiserver" will use this configuration to encrypt data before storing

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/verify.yml

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

1515
- name: Print namespaces
1616
ansible.builtin.debug:
17-
var: "{{ k8s__namespaces_info | community.general.json_query(query) }}"
17+
var: "{{ k8s__namespaces_info | community.general.json_query(json_query) }}"
1818
vars:
19-
query: "length(resources)"
19+
json_query: "length(resources)"
2020
when: ansible_verbosity > 1
2121

2222
- name: Register namespaces count
2323
ansible.builtin.set_fact:
24-
k8s__namespaces_count: "{{ k8s__namespaces_info | community.general.json_query(query) }}"
24+
k8s__namespaces_count: "{{ k8s__namespaces_info | community.general.json_query(json_query) }}"
2525
vars:
26-
query: "length(resources)"
26+
json_query: "length(resources)"
2727

2828
- name: There should be four namespaces
2929
ansible.builtin.assert:

0 commit comments

Comments
 (0)