Move traefik config to configmap

This commit is contained in:
Radon Rosborough 2022-12-19 15:24:57 -07:00
parent 59a92b2ca4
commit 7675d36df1
2 changed files with 33 additions and 14 deletions

28
k8s/traefik-config.yaml Normal file
View File

@ -0,0 +1,28 @@
---
kind: ConfigMap
apiVersion: v1
metadata:
namespace: traefik
name: traefik-config
data:
traefik.yaml: |
entrypoints:
traefik:
address: ":9000/tcp"
metrics:
address: ":9100/tcp"
web:
address: ":8000/tcp"
websecure:
address: ":8443/tcp"
http:
tls: true
api:
dashboard: true
ping: true
metrics:
prometheus:
entrypoint: metrics
providers:
kubernetescrd: true
kubernetesingress: true

View File

@ -72,25 +72,16 @@ spec:
runAsNonRoot: true
runAsUser: 65532
volumeMounts:
- name: config
mountPath: /etc/traefik
- name: data
mountPath: /data
- name: tmp
mountPath: /tmp
args:
- "--global.checknewversion"
- "--global.sendanonymoususage"
- "--entrypoints.metrics.address=:9100/tcp"
- "--entrypoints.traefik.address=:9000/tcp"
- "--entrypoints.web.address=:8000/tcp"
- "--entrypoints.websecure.address=:8443/tcp"
- "--api.dashboard=true"
- "--ping=true"
- "--metrics.prometheus=true"
- "--metrics.prometheus.entrypoint=metrics"
- "--providers.kubernetescrd"
- "--providers.kubernetesingress"
- "--entrypoints.websecure.http.tls=true"
volumes:
- name: config
configMap:
name: traefik-config
- name: data
emptyDir: {}
- name: tmp