Compare commits

...

8 Commits

Author SHA1 Message Date
Timothy Stewart
e04f3bac61 chore(github): Updated issue template 2022-08-20 16:22:56 -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
slemmercs
1e4b48f039 replaced --no-deploy with --disable (#49)
According to https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/ > Kubernetes Components section the --disable <value> flag should be used as the --no-deploy is a deprecated option
2022-08-11 21:23:47 -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
Simon Leiner
1830b9c9a1 Fix .gitignore (#40)
For more details, see:
https://stackoverflow.com/a/20652768
2022-07-27 21:24:59 -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
11 changed files with 1673 additions and 251 deletions

View File

@@ -26,7 +26,7 @@ Operating system:
Hardware:
### Variables Used:
### Variables Used
`all.yml`
@@ -52,7 +52,7 @@ metal_lb_controller_tag_version: ""
metal_lb_ip_range: ""
```
### Hosts
### Hosts
`host.ini`
@@ -73,3 +73,5 @@ node
## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
- [ ] I've checked the [General Troubleshooting Guide](https://github.com/techno-tim/k3s-ansible/discussions/20)

View File

@@ -1,3 +1,3 @@
*
/*
!.gitignore
!sample/
!sample/

View File

@@ -1,5 +1,5 @@
---
k3s_version: v1.23.4+k3s1
k3s_version: v1.24.3+k3s1
# this is the user that has ssh access to these machines
ansible_user: ansibleuser
systemd_dir: /etc/systemd/system
@@ -17,16 +17,16 @@ apiserver_endpoint: "192.168.30.222"
# this token should be alpha numeric only
k3s_token: "some-SUPER-DEDEUPER-secret-password"
# change these to your liking, the only required one is--no-deploy servicelb
extra_server_args: "--no-deploy servicelb --no-deploy traefik"
# change these to your liking, the only required one is--disable servicelb
extra_server_args: "--disable servicelb --disable traefik"
extra_agent_args: ""
# image tag for kube-vip
kube_vip_tag_version: "v0.4.4"
kube_vip_tag_version: "v0.5.0"
# image tag for metal lb
metal_lb_speaker_tag_version: "v0.12.1"
metal_lb_controller_tag_version: "v0.12.1"
metal_lb_speaker_tag_version: "v0.13.4"
metal_lb_controller_tag_version: "v0.13.4"
# metallb ip range for load balancer
metal_lb_ip_range: "192.168.30.80-192.168.30.90"

View File

@@ -25,7 +25,7 @@
- name: Copy vip rbac manifest to first master
template:
src: "vip.rbac.yaml.j2"
dest: "/var/lib/rancher/k3s/server/manifests/vip.rbac.yaml"
dest: "/var/lib/rancher/k3s/server/manifests/vip-rbac.yaml"
owner: root
group: root
mode: 0644
@@ -43,7 +43,7 @@
- name: Copy metallb namespace manifest to first master
template:
src: "metallb.namespace.j2"
dest: "/var/lib/rancher/k3s/server/manifests/metallb.namespace.yaml"
dest: "/var/lib/rancher/k3s/server/manifests/metallb-namespace.yaml"
owner: root
group: root
mode: 0644
@@ -51,8 +51,8 @@
- name: Copy metallb ConfigMap manifest to first master
template:
src: "metallb.configmap.j2"
dest: "/var/lib/rancher/k3s/server/manifests/metallb.configmap.yaml"
src: "metallb.ipaddresspool.j2"
dest: "/var/lib/rancher/k3s/server/manifests/metallb-configmap.yaml"
owner: root
group: root
mode: 0644
@@ -171,3 +171,24 @@
src: /usr/local/bin/k3s
dest: /usr/local/bin/crictl
state: link
- name: Get contents of manifests folder
find:
paths: /var/lib/rancher/k3s/server/manifests
file_type: file
register: k3s_server_manifests
- name: Get sub dirs of manifests folder
find:
paths: /var/lib/rancher/k3s/server/manifests
file_type: directory
register: k3s_server_manifests_directories
- name: Remove manifests and folders that are only needed for bootstrapping cluster so k3s doesn't auto apply on start
file:
path: "{{ item.path }}"
state: absent
with_items:
- "{{ k3s_server_manifests.files }}"
- "{{ k3s_server_manifests_directories.files }}"

View File

@@ -1,13 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- {{ metal_lb_ip_range }}

View File

@@ -0,0 +1,14 @@
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: first-pool
namespace: metallb-system
spec:
addresses:
- {{ metal_lb_ip_range }}
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: default
namespace: metallb-system

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,7 @@ metadata:
name: system:kube-vip-role
rules:
- apiGroups: [""]
resources: ["services", "services/status", "nodes"]
resources: ["services", "services/status", "nodes", "endpoints"]
verbs: ["list","get","watch", "update"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
@@ -30,4 +30,3 @@ subjects:
- kind: ServiceAccount
name: kube-vip
namespace: kube-system

View File

@@ -1,7 +1,6 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
creationTimestamp: null
name: kube-vip-ds
namespace: kube-system
spec:
@@ -10,7 +9,6 @@ spec:
name: kube-vip-ds
template:
metadata:
creationTimestamp: null
labels:
name: kube-vip-ds
spec:

View File

@@ -6,3 +6,7 @@
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
notify: reboot
- name: Install linux-modules-extra-raspi
apt: name=linux-modules-extra-raspi state=present
when: raspberry_pi

View File

@@ -51,6 +51,9 @@
systemd:
daemon_reload: yes
- name: Remove linux-modules-extra-raspi
apt: name=linux-modules-extra-raspi state=absent
- name: Reboot and wait for node to come back up
reboot:
reboot_timeout: 3600