fix traefik configs
This commit is contained in:
parent
448c9411e4
commit
37f2f1e137
3 changed files with 34 additions and 0 deletions
4
roles/k8s-node/handlers/main.yaml
Normal file
4
roles/k8s-node/handlers/main.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
- name: restart k3s
|
||||
service:
|
||||
name: k3s
|
||||
state: restarted
|
11
roles/k8s-node/tasks/main.yaml
Normal file
11
roles/k8s-node/tasks/main.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
- name: Install packages required for longhorn
|
||||
apt:
|
||||
name: [open-iscsi, nfs-common, cryptsetup]
|
||||
|
||||
- name: template traefik-config.yaml
|
||||
template:
|
||||
src: traefik-config.yaml
|
||||
dest: /var/lib/rancher/k3s/server/manifests/traefik-config.yaml
|
||||
notify:
|
||||
- restart k3s
|
||||
when: k3s_role == "server"
|
19
roles/k8s-node/templates/traefik-config.yaml
Normal file
19
roles/k8s-node/templates/traefik-config.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
apiVersion: helm.cattle.io/v1
|
||||
kind: HelmChartConfig
|
||||
metadata:
|
||||
name: traefik
|
||||
namespace: kube-system
|
||||
spec:
|
||||
valuesContent: |-
|
||||
ports:
|
||||
web:
|
||||
proxyProtocol:
|
||||
trustedIPs:
|
||||
- 10.5.1.245/32
|
||||
- 10.5.1.1/32
|
||||
- 10.42.0.0/16 # traffic getting redirected from other nodes
|
||||
websecure:
|
||||
proxyProtocol:
|
||||
trustedIPs:
|
||||
- 10.5.1.245/32
|
||||
- 10.42.0.0/16 # traffic getting redirected from other nodes
|
Loading…
Reference in a new issue