mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Use treafik ingress controller instead of nginx
This commit is contained in:
parent
ed24aa4f8d
commit
d8d9733ed9
25 changed files with 187 additions and 325 deletions
59
roles/ingress/templates/traefik-ingress-ds.yml.j2
Normal file
59
roles/ingress/templates/traefik-ingress-ds.yml.j2
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
kind: DaemonSet
|
||||
apiVersion: extensions/v1beta1
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
name: traefik-ingress-lb
|
||||
spec:
|
||||
serviceAccountName: traefik-ingress-controller
|
||||
terminationGracePeriodSeconds: 60
|
||||
containers:
|
||||
- image: traefik
|
||||
name: traefik-ingress-lb
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 30Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 20Mi
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
hostPort: 80
|
||||
- name: https
|
||||
hostPort: 443
|
||||
containerPort: 443
|
||||
- name: admin
|
||||
containerPort: 8081
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
add:
|
||||
- NET_BIND_SERVICE
|
||||
volumeMounts:
|
||||
- mountPath: "/config"
|
||||
name: "config"
|
||||
args:
|
||||
- --api
|
||||
- --configfile=/config/traefik.toml
|
||||
- --kubernetes
|
||||
- --logLevel=INFO
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: traefik-config
|
||||
items:
|
||||
- key: traefik.toml
|
||||
path: traefik.toml
|
||||
nodeSelector:
|
||||
# node must be labelled with roles=ingress-controller
|
||||
role: ingress-controller
|
||||
Loading…
Add table
Add a link
Reference in a new issue