Commit graph

369 commits

Author SHA1 Message Date
Xan Manning
dd341f6f10 docs(readme): missing variable documentation 2021-12-18 23:08:36 +00:00
Xan Manning
01b914985a Merge branch 'main' into multiple-bugfixes-and-features 2021-12-18 23:06:39 +00:00
Xan Manning
0f143962a1
Merge pull request #163 from janar153/main
Added option to chnage K3s updates API url
2021-12-18 23:06:11 +00:00
Xan Manning
80f591cba4 fix(molecule): fix rockylinux test, add debian11 fix snapshotter 2021-12-18 23:04:24 +00:00
Curtis John
dd3c460bfa
feat(airgap): skip evaluations that aren't relevant to airgap
checking release version and tasks that depend on that check do not need to function since we won't
be aware of the version in an airgapped deployment
2021-12-15 16:43:51 -05:00
Curtis John
825ed3ad37
docs(readme): user warning regarding use of airgap install 2021-12-15 12:23:44 -05:00
Curtis John
f7c0c8783a
feat(airgap): airgap should not verify version information
in an air gapped environment the machine will not be able to check sha checksums or information
around the binary so we should ignore the tasks in that scenario
2021-12-15 12:15:25 -05:00
Curtis John
8243baa3d9
feat(airgap): airgap should not verify version information
in an air gapped environment the machine will not be able to check sha checksums or information
around the binary so we should ignore the tasks in that scenario
2021-12-15 12:14:24 -05:00
Curtis John
25d40cec52
style(airgap): task name should reflect action taken 2021-12-15 12:11:25 -05:00
Curtis John
779968ca0a
chore(airgap): remove unused var 2021-12-15 12:08:56 -05:00
Curtis John
b8727a1c92
chore(airgap): noting future work 2021-12-14 17:45:20 -05:00
Curtis John
4bcf3ea9c4
fix(airgap): hotwire k3s version var to end of binary name
this is to allow the role to proceed as if the binary was downloaded as expected from the web
2021-12-14 17:33:31 -05:00
Curtis John
e88f3bb056
feat(airgap): init airgap feature
airgap installs allow users to deploy k3s in a situation where the server is not internet connected
and therefore unable to download anything externally
2021-12-14 17:16:19 -05:00
janar153
29658aeb2e
Update main.yml 2021-11-12 12:24:23 +02:00
janar153
33a18bb517
Update main.yml 2021-11-12 12:23:55 +02:00
Xan Manning
ea413afa3a chore(release): updated changelog 2021-10-10 14:17:27 +01:00
Xan Manning
da13cc696a docs(quickstart): fixed permissions issue seen in #157 2021-10-10 14:10:52 +01:00
Xan Manning
db3f7da362 fix(uninstall): deprecated drain flag removed in 1.22
fixes #159
2021-10-10 14:07:04 +01:00
Xan Manning
765fbf2e9b chore(release): bump version 2021-09-08 19:23:45 +01:00
Xan Manning
c47688e05c
Merge pull request #150 from PyratLabs/feat/feature-flag-checks
feat: check for etcd-s3-bucket config and added ipv6 documentation
2021-09-08 19:19:05 +01:00
Xan Manning
3274c7e6e0 feat: check for etcd-s3-bucket config and added ipv6 documentation 2021-09-08 19:12:33 +01:00
Xan Manning
25ca0ed8f7
Merge pull request #149 from onedr0p/main
feat: implement config.yaml.d
2021-09-08 19:03:17 +01:00
Devin Buhl
0384dfcb4f
feat: implement config.yaml.d 2021-09-06 08:54:33 -04:00
Devin Buhl
207fbbd41a
feat: implement config.yaml.d 2021-09-06 08:47:37 -04:00
Devin Buhl
9db46b536d
feat: implement config.yaml.d 2021-09-06 08:46:49 -04:00
Xan Manning
83290e050c chore: version bump 2021-08-18 21:13:04 +01:00
Xan Manning
189f2baf23
Merge pull request #142 from PyratLabs/fix-k3s_runtime_config
Fix: Define registration address from node-ip
2021-08-18 21:08:42 +01:00
Xan Manning
077c9a3fd6 bugfix: k3s_runtime_config 2021-08-18 20:44:06 +01:00
Xan Manning
1780b5a20f Merge branch 'main' of github.com:PyratLabs/ansible-role-k3s into main 2021-08-14 14:18:39 +01:00
Xan Manning
cc86f35d9b version bump 2021-08-14 14:18:29 +01:00
Xan Manning
dc2bd28e10
Merge pull request #139 from abelfodil/main
Add advertised address
2021-08-14 14:16:40 +01:00
Xan Manning
f198b45d58 used combined configuration from vars.yaml, removed duplicated task for control plane 2021-08-14 14:04:56 +01:00
Anes Belfodil
c0ec5ca930
Add advertised_address 2021-08-09 17:53:28 -04:00
Xan Manning
8c0c586607 Updated CHANGELOG for release 2021-07-24 18:02:07 +01:00
Xan Manning
3b26d24212
Merge pull request #138 from PyratLabs/bugfix-token_path_required
Updated systemd template to use token when joining a cluster
2021-07-24 18:00:09 +01:00
Xan Manning
ba113bcd05 Fix primary control node delegation 2021-07-24 17:38:45 +01:00
Xan Manning
e90448f40b Updated systemd template to use token when joining a cluster 2021-07-24 17:21:31 +01:00
Xan Manning
4e713918a7 Version bump 2021-07-21 20:34:10 +01:00
Xan Manning
3b5c6e6ff5
Merge pull request #136 from Yajo/patch-1
fix: do ignore etcd member count when uninstalling
2021-07-21 20:29:31 +01:00
Xan Manning
d2968d5f42
Merge pull request #135 from Yajo/fix-jinja2-native
fix: restore clustering and avoid failure with jinja2_native=true
2021-07-21 20:28:31 +01:00
Yajo
4b42a9bf49 fix: restore clustering feature
For some weird reason, string booleans were set on `k3s_control_node` and `k3s_primary_control_node`, making their behavior non-obvious (for python `bool("false") == True`).

This fixes that problem, and BTW restores the ability to create clusters, which got lost with this bug.

After running the role against a cluster, see:

```sh
❯ ansible -i inventories/testing.yaml k8s_node -m command -ba 'kubectl get node'
vm0 | CHANGED | rc=0 >>
NAME   STATUS   ROLES                       AGE     VERSION
vm0    Ready    control-plane,etcd,master   9m19s   v1.21.2+k3s1
vm2 | CHANGED | rc=0 >>
NAME   STATUS   ROLES                       AGE     VERSION
vm2    Ready    control-plane,etcd,master   9m22s   v1.21.2+k3s1
vm1 | CHANGED | rc=0 >>
NAME   STATUS   ROLES                       AGE     VERSION
vm1    Ready    control-plane,etcd,master   9m22s   v1.21.2+k3s1
```

Now, after the patch:

```sh
❯ ansible -i inventories/testing.yaml k8s_node -m command -ba 'kubectl get node'
vm0 | CHANGED | rc=0 >>
NAME   STATUS   ROLES                       AGE    VERSION
vm0    Ready    control-plane,etcd,master   2m2s   v1.21.2+k3s1
vm1    Ready    control-plane,etcd,master   58s    v1.21.2+k3s1
vm2    Ready    control-plane,etcd,master   80s    v1.21.2+k3s1
vm1 | CHANGED | rc=0 >>
NAME   STATUS   ROLES                       AGE    VERSION
vm0    Ready    control-plane,etcd,master   2m2s   v1.21.2+k3s1
vm1    Ready    control-plane,etcd,master   58s    v1.21.2+k3s1
vm2    Ready    control-plane,etcd,master   80s    v1.21.2+k3s1
vm2 | CHANGED | rc=0 >>
NAME   STATUS   ROLES                       AGE    VERSION
vm0    Ready    control-plane,etcd,master   2m2s   v1.21.2+k3s1
vm1    Ready    control-plane,etcd,master   58s    v1.21.2+k3s1
vm2    Ready    control-plane,etcd,master   80s    v1.21.2+k3s1
```

@Tecnativa TT2541
2021-07-21 12:37:17 +00:00
Jairo Llopis
142b40f428
fix: do ignore etcd member count when uninstalling
Otherwise, when completely uninstalling the etcd-enabled cluster, it fails with:

```
TASK [xanmanning.k3s : Check the conditions when embedded etcd is defined] ***************************************
fatal: [vm0]: FAILED! => {
    "assertion": "(((k3s_controller_list | length) % 2) == 1)",
    "changed": false,
    "evaluated_to": false,
    "msg": "Etcd should have a minimum of 3 defined members and the number of members should be odd. Please see notes about HA in README.md"
}
fatal: [vm1]: FAILED! => {
    "assertion": "(((k3s_controller_list | length) % 2) == 1)",
    "changed": false,
    "evaluated_to": false,
    "msg": "Etcd should have a minimum of 3 defined members and the number of members should be odd. Please see notes about HA in README.md"
}
fatal: [vm2]: FAILED! => {
    "assertion": "(((k3s_controller_list | length) % 2) == 1)",
    "changed": false,
    "evaluated_to": false,
    "msg": "Etcd should have a minimum of 3 defined members and the number of members should be odd. Please see notes about HA in README.md"
}
```
2021-07-21 12:56:09 +01:00
Yajo
05e62b6344 fix: avoid failure with jinja2_native=true
If you run the role on an ansible configured with that setting, it will fail with:

    fatal: [vm0]: FAILED! => {"msg": "Unexpected templating type error occurred on ({% for host in ansible_play_hosts_all %}\n{% filter string %}\n{% filter replace('\\n', ' ') %}\n{{ host }}\n@@@\n{{ hostvars[host].ansible_host | default(hostvars[host].ansible_fqdn) }}\n@@@\nC_{{ hostvars[host].k3s_control_node }}\n@@@\nP_{{ hostvars[host].k3s_primary_control_node | default(False) }}\n{% endfilter %}\n{% endfilter %}\n@@@ END:{{ host }}\n{% endfor %}): sequence item 4: expected str instance, bool found"}
2021-07-19 09:26:57 +00:00
Xan Manning
0c084531d2
Merge pull request #133 from Yajo/patch-1
fix: typo
2021-07-16 20:24:53 +01:00
Jairo Llopis
b8539cd82e fix: typo 2021-07-16 09:21:55 +00:00
Xan Manning
2da5738452 Updated README with current k3s supported OS 2021-06-22 20:39:38 +01:00
Xan Manning
8dab5e6f26 Bumped up Ansible version for testing 2021-06-22 20:29:49 +01:00
Xan Manning
7607bfb7a9 Updated test images 2021-06-22 20:28:23 +01:00
Xan Manning
f46450319b Update changelog 2021-05-30 21:05:03 +01:00
Xan Manning
10d11c63ec
Merge pull request #126 from mrobinsn/main
Case insensitive control node lookup
2021-05-30 21:00:45 +01:00