Skip to content

Commit

Permalink
21.1.0+1.27.5 (#50)
Browse files Browse the repository at this point in the history
* molecule/default/verify.yml: add validate_certs property

* update README (Ubuntu support matix / Molecule test)

* add support for Ubuntu 22.04

* update CHANGELOG
  • Loading branch information
githubixx committed Sep 5, 2023
1 parent 4701ebe commit 746c580
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 21.1.0+1.27.5

- add support for Ubuntu 22.04

## 21.0.0+1.27.5

- **BREAKING**: `meta/main.yml`: change role_name from `kubernetes-controller` to `kubernetes_controller`. This is a requirement since quite some time for Ansible Galaxy. But the requirement was introduced after this role already existed for quite some time. So please update the name of the role in your playbook accordingly!
Expand Down
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ Requirements

This role requires that you already created some certificates for Kubernetes API server (see [Kubernetes the not so hard way with Ansible - Certificate authority (CA)](https://www.tauceti.blog/post/kubernetes-the-not-so-hard-way-with-ansible-certificate-authority/)). The role copies the certificates from `k8s_ca_conf_directory` to the destination host. You should also setup a fully meshed VPN with e.g. WireGuard (see [Kubernetes the not so hard way with Ansible - WireGuard](https://www.tauceti.blog/post/kubernetes-the-not-so-hard-way-with-ansible-wireguard/)) and of course an etcd cluster (see [Kubernetes the not so hard way with Ansible - etcd cluster](https://www.tauceti.blog/post/kubernetes-the-not-so-hard-way-with-ansible-etcd/))

Supported OS
------------

- Ubuntu 20.04 (Focal Fossa)
- Ubuntu 22.04 (Jammy Jellyfish)

Changelog
---------

Expand Down Expand Up @@ -173,6 +179,29 @@ Example Playbook
- githubixx.kubernetes_controller
```

Testing
-------

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).

Afterwards Molecule can be executed:

```bash
molecule converge
```

This will setup a few virtual machines (VM) with supported Ubuntu OS and installs an Kubernetes cluster but without the worker nodes (so no nodes with `kube-proxy` and `kubelet` installed). A small verification step is also included:

```bash
molecule verify
```

To clean up run

```bash
molecule destroy
```

License
-------

Expand Down
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ galaxy_info:
- name: Ubuntu
versions:
- "focal"
- "jammy"
galaxy_tags:
- kubernetes
- scheduler
Expand Down
10 changes: 5 additions & 5 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ driver:

platforms:
- name: test-assets
box: generic/ubuntu2004
memory: 1024
box: generic/ubuntu2204
memory: 2048
cpus: 2
groups:
- vpn
Expand All @@ -28,7 +28,7 @@ platforms:
type: static
ip: 192.168.10.5
- name: test-controller1
box: generic/ubuntu2004
box: generic/ubuntu2204
memory: 2048
cpus: 2
groups:
Expand All @@ -43,7 +43,7 @@ platforms:
type: static
ip: 192.168.10.10
- name: test-controller2
box: generic/ubuntu2004
box: generic/ubuntu2204
memory: 2048
cpus: 2
groups:
Expand Down Expand Up @@ -73,7 +73,7 @@ platforms:
type: static
ip: 192.168.10.30
- name: test-worker1
box: generic/ubuntu2004
box: generic/ubuntu2204
memory: 2048
cpus: 2
groups:
Expand Down
1 change: 1 addition & 0 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
kubernetes.core.k8s_info:
api_version: v1
kind: namespace
validate_certs: false
register: k8s__namespaces_info

- name: Print namespaces
Expand Down

0 comments on commit 746c580

Please sign in to comment.