Commit Graph

51 Commits

Author SHA1 Message Date
Simon Leiner
33ae0d4970
Fix CI (#332)
* Update pre-commit actions

This was done by running "pre-commit autoupdate --freeze".

* Remove pre-commit only dependencies from requirements.in

Including them in the file would create the illusion that those were the
versions actually used in CI, but they are not. The exact versions are
determined by the pre-commit hooks which are pinned in
.pre-commit-config.yaml.

* Ansible Lint: Fix role-name[path]

* Ansible Lint: Fix name[play]

* Ansible Lint: Fix key-order[task]

* Ansible Lint: Fix jinja[spacing]

* Ansible Lint: Fix no-free-form

* Ansible Lint: Fix var-naming[no-reserved]

* Ansible Lint: Fix yaml[comments]

* Ansible Lint: Fix yaml[line-length]

* Ansible Lint: Fix name[casing]

* Ansible Lint: Fix no-changed-when

* Ansible Lint: Fix fqcn[action]

* Ansible Lint: Fix args[module]

* Improve task naming
2023-07-20 10:50:02 -05:00
ThePCGeek
49f0a2ce6b
(fix): correct var (#262)
var registered for rc.local check is rcfile but under when it said rclocal which was undefined. changed to rcfile to correct.
2023-03-25 20:41:04 -05:00
Noms
3a1a7a19aa
Fix LXC container implementations (#231)
* Need to become to reboot

* Fix rc.local insertion of script

* Fix syntax

Add new line to lxc.yml

* Remove need to set fact

* Add reset for LXC container config

* Fix syntax

Its always the newlines..

* remove fact setting from reset task

We should mirror the deployment task

* Proxmox LXC reset functions

* Handle if rc.local already has data

* Dont compare literal

* Cleanup Erroneous newline

* Handle rc.local not present on a hybrid cluster

* Update roles/reset/tasks/main.yml

Co-authored-by: Simon Leiner <simon@leiner.me>

* Update roles/lxc/tasks/main.yml

Co-authored-by: Simon Leiner <simon@leiner.me>

---------

Co-authored-by: Techno Tim <timothystewart6@gmail.com>
Co-authored-by: Simon Leiner <simon@leiner.me>
2023-03-03 11:28:14 -06:00
Simon Leiner
6448948e9f
Fix dual-stack clusters with multiple master nodes (#237)
* Test IPv6 scenario with two master nodes

* Fix IPv6 multimaster setup

---------

Co-authored-by: Techno Tim <timothystewart6@gmail.com>
2023-02-20 05:24:19 +00:00
Simon Leiner
7bc198ab26
Pick kube-vip interface automatically by default (#238)
* Pick kube-vip interface automatically by default

* molecule: Fix ipv6 scenario

* Choose a more restrictive molecule timeout in CI
2023-02-20 04:08:36 +00:00
Simon Leiner
65bbc8e2ac
Simplify download and patching of MetalLB manifests (#239)
This removes duplicated code and cleans up Ansible log lines a bit.
2023-02-19 21:34:22 -06:00
Mike Thomas
dc2976e7f6
Metallb BGP support (#212)
* Add metallb frr and bgp support

* Set metallb mode to layer2 as default in sample

* Add BGP resource check

* Add automatic downloading of metallb-frr

* Remove frr manifest
2023-02-09 23:58:58 -06:00
Simon Leiner
10c6ef1d57
Download MetalLB CRDs for respective versions (#225)
* Download MetalLB CRDs for respective versions

This ensures that the CRDs match the actual MetalLB controller version,
as given by the user.

* Download VIP RBAC definitions for respective version
2023-02-06 22:24:02 -06:00
acdoussan
511ec493d6
add support for proxmox lxc containers (#209)
Co-authored-by: Adam Doussan <acdoussan@Adams-MacBook-Pro.local>
2023-01-29 21:23:31 -06:00
Simon Leiner
be3e72e173
Do not rely on ansible_user (#214)
* Apply "become" on roles instead of plays

This leads to facts being gathered for the "regular" login user, instead
of root.

* Do not rely on ansible_user

Instead of reading ansible_user (which may or may not be defined), this
patch lets the roles rely on Ansible facts [1].

[1]: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html
2023-01-29 21:20:25 -06:00
Techno Tim
b86384c439
fix(raspberrypi): Fix handler name (#200) 2023-01-10 21:26:27 -06:00
irish1986
e98e3ee77c
Split manifest into separate task for ease of use (#191) 2023-01-01 23:04:22 -06:00
Sherif Metwally
2604caa483
"command" module no longer supports "warn" argument (#169)
* "command" module no longer supports "warn" argument

* correct indetation lint errors
2022-11-29 20:26:01 -06:00
Techno Tim
17a74b66c8
Pre commit fixes (#167)
* chore(dependencies): updated kube-vip to 0.5.6

* fix(pre-commit): pin to hash

* fix(pre-commit): added more hooks and fixed lint

* fix(pre-commit): added pre-commit hook so we don't have to run it manually

* fix(pre-commit): Added docs to readme

* fix(pre-commit): added texthooks

* fix(pre-commit): pin to hash

* fix(pre-commit): added mor hooks and fixed lint

* fix(lint): Fixing quotes

* fix(ci): only run test if linting passes

* fix(ci): convert to reusable workflows

* fix(pr template): Reorder steps
2022-11-13 22:42:49 -06:00
Irakli Nadareishvili
590a8029fd
Removing accidental tear-down step that is clearly a typo (#117)
Co-authored-by: Techno Tim <timothystewart6@gmail.com>
2022-10-15 14:15:25 -05:00
Techno Tim
cb2fa7c441
k3s, metallb, kube-vip updates (#119)
* feat(k3s): Updated to v1.24.6+k3s1

* feat(kube-vip): Update to v0.5.5

* feat(metal-lb): Update to v0.13.6

* fix(pip): Freeze requirements

* fix(lint): Fixed ansible-lint
2022-10-15 12:23:50 -05:00
Ioannis Angelakopoulos
cd76fa05a7
fix master taint implementation - linting problems (#95)
* add virtual-ip to certificate SAN entries

Adds the kube-vip IP as a Subject Alternative Name in the TLS cert. It is needed otherwise you cannot access the cluster.

* fixes bug with master taints (#1)

- improves taint logic

* fixes typo

* fixes formatting

* fixes undefined group['node'] if missing from hosts.ini (#2)

* fixes undefined group['node'] if missing from hosts.ini

- improves application of master taint by centralizing code

* improves molecule testing, fixes linting

* hacking at linter problems, small tweaks

- increases the metallb timeout error due to intermittent testing errors in GitHub actions

* improves context by renaming taint variable

- makes variable boolean

* fix bug

* removes linting hacks

Co-authored-by: Ioannis Angelakopoulos <ioangel@gmail.com>
2022-09-24 20:12:24 -05:00
Simon Leiner
d5b37acd8a
Drop support for CentOS, test Rocky and Debian in CI (#92)
* Test CentOS 7 in CI

* Drop support for CentOS, test on Rocky and Debian

* Fix reset playbook for Rocky Linux

* Fix typo

* Disable firewalld during testing

Co-authored-by: Techno Tim <timothystewart6@gmail.com>
2022-09-24 05:10:55 +00:00
Simon Leiner
5225493ca0
CI: Fix linting job for ansible-lint 6.6.0 (#96)
* CI: Fix linting job for ansible-lint 6.6.0

* Increase MetalLB timeout to mitigate CI flakiness
2022-09-23 23:28:21 -05:00
BMeach
4acbe91b6c
Fix master node taints in multi node installs (#93)
* Taint master nodes if more than one node

* Kick off fork workflow tests

Co-authored-by: Techno Tim <timothystewart6@gmail.com>
2022-09-17 15:56:09 -05:00
Simon Leiner
a1ef590442
Add support for API servers on IPv6 addresses (#48)
* Remove duplicate file for deletion

* Add support for IPv6 clusters

To correctly escape IPv6 addresses when ports are used, they must be
wrapped in square brackets [1]. This patch adds support for that,
using Ansible's ipwrap filter [2].

[1]: https://datatracker.ietf.org/doc/html/rfc4038#section-5.1
[2]: http://docs.ansible.com/ansible/latest/collections/ansible/utils/docsite/filters_ipaddr.html#wrapping-ipv6-addresses-in-brackets

* Do not abort other molecule jobs on failure

* Fix cache keys for Vagrant boxes

* Molecule: Derive overrides.yml location from scenario dir

# Conflicts:
#	molecule/default/molecule.yml
#	molecule/ipv6/molecule.yml
2022-09-10 12:57:38 -05:00
Techno Tim
b1df9663fa
fix(ansible): Fix group permissions on tmp folder (#77) 2022-09-09 03:00:54 +00:00
Vitalij Dovhanyc
58c3a61bbb
add editorconfig and fix trailing whitespaces (#68)
Co-authored-by: Techno Tim <timothystewart6@gmail.com>
2022-09-07 20:00:13 -05:00
Simon Leiner
60bc09b085
Mitigate CI flakiness (#70)
* Increase SSH connection timeouts and retries

* Make MetalLB timeouts configurable

* Retry applying MetalLB CRs

* Fix location of MetalLB CRs template

* Make MetalLB wait logic more compact

* Fix typo

* retrigger 1

* retrigger 2

* retrigger 3

* retrigger 4

* retrigger 5
2022-09-07 18:47:58 -05:00
Timothy Stewart
4365a2a54b fix(ansible): fixing permissions on tmp folder 2022-09-06 19:07:09 -05:00
Simon Leiner
a6b2a95b7e
Test playbook using molecule (#67)
* Test cluster using molecule

* Fix detection of first control node

* Include --flannel-iface and --node-ip as k3s arguments

* Store logs of k3s-init.service as GitHub job artifacts
2022-09-03 10:36:28 -05:00
Timothy Stewart
3c36dc8bfd fix(ansible): use k3s kubectl 2022-09-02 11:07:17 -05:00
Techno Tim
6695d13683
upgrade k3s to v1.24.4+k3s1 (#64)
* feat(k3s): Upgrade to v1.24.4+k3s1
* feat(metallb): updated to v0.13.5
2022-09-01 21:20:25 -05:00
Techno Tim
56f8f21850
fix(ansible): Install services separate from config (#63) 2022-08-30 21:44:55 -05:00
Timothy Stewart
117c608a73 fix(ansible): added longer wait with todo 2022-08-29 23:16:13 -05:00
Techno Tim
2296959894
fix(ci): Fix Linting (#61) 2022-08-28 20:36:05 -05:00
Timothy Stewart
6d793c5c96 fix(ansible): add wait 2022-08-28 17:49:38 -05:00
Timothy Stewart
47ac514dc6 fix(ansible): fix lint 2022-08-28 16:42:07 -05:00
Timothy Stewart
611cf5ab0b fix(ansible): fix lint 2022-08-28 16:32:52 -05:00
Timothy Stewart
c82cbfc501 fix(ansible): fix lint 2022-08-28 16:29:04 -05:00
Timothy Stewart
f603a048c3 fix(ansible): fix lint 2022-08-28 16:26:46 -05:00
Timothy Stewart
4b959719ba fix(ansible): run task on one master 2022-08-28 16:00:10 -05:00
Timothy Stewart
db8fbd9447 chore(lint): Fix yaml lint 2022-08-28 14:27:22 -05:00
Techno Tim
aa05ab153e
fix(ansible): Refactored ansible steps to now install metallb in post… (#58)
* fix(ansible): Refactored ansible steps to now install metallb in post task and verify
2022-08-28 14:25:09 -05:00
Simon Leiner
370e19169b
Print fewer logs when removing manifests (#55) 2022-08-23 23:26:08 -05:00
Techno Tim
cdd7c4e668
Fix k3s manifest (#53)
* fix(k3s): Remove manifests and folders from bootstrapped cluster
2022-08-20 16:19:20 -05:00
Lance A. Brown
90bbc0a399
Add linux-modules-extra-raspi package for Ubuntu 22.x on Raspberry. (#50)
* Add task for linux-modules-extra-raspi

Ubuntu 22.x on Raspberry Pi needs the linux-modules-extra-raspi package
for the vxlans kernel module.

* Remove linux-modules-extra-reaspi package

Not sure we want to do this but including it in the PR anyway for discussion.
2022-08-11 21:23:56 -05:00
Timothy Stewart
ac5325a670 fix(kube-vip): Cleaning up; adding missing rbac api groups 2022-07-30 22:11:28 -05:00
Techno Tim
a33ed487e0
feat(upgrades): Updated k3s, metalls, and kubevip and fixed bugs (#46) 2022-07-27 23:13:43 -05:00
SwaggaRitz
39581f4ba7
Replaced manifest files with double extention to '-' (#41)
Co-authored-by: Adrian Jones <adrian@geektowers.local>
2022-07-27 21:21:38 -05:00
Techno Tim
e1a0298eb8
Upgrade kube-vpi; improve settings; better reset (#31)
* fix(k3s): upgrade k3s + kube-vip

* chore(github): update template

* chore(docs): Updated README

* fix(ansible): Reboot as part of reset

* fix(kube-vip): improve settings

* chore(lint): fix

* chore(lint): fix
2022-05-26 15:32:25 -05:00
Janic Voser
1ce3319087
Using Ansible os family instead of multiple Ansible os distributions (#6)
* Using Ansible os family instead of multiple Ansible os distributions

* Added option to set timezone, this could save a bit of headache if someone has certificate problems

Co-authored-by: janic <janic.voser@schulen-unteraegeri.ch>
2022-04-09 11:04:25 -05:00
Philip Haberkern
34624bc3f2
Added Vagrantfile for build environment with Vagrant (#14)
* Added .vagrant to ignore

* Added Vagrantfile

* Added section for Vagrant

* made retry_count customizeable (default 20)
2022-04-04 21:51:21 -05:00
svartis
1310a1509d
Fixed issue with tasks not running on Debian Bullseye (#18) 2022-04-04 21:44:38 -05:00
Timothy Stewart
de9c9328e9 fix(ansible): Fixed role changes that were lost in a git fail 2022-03-27 14:58:52 -05:00