move toml to configmap

This commit is contained in:
ducoterra
2020-04-18 19:41:35 -04:00
parent a0c8174804
commit 27f15668ee
5 changed files with 29 additions and 107 deletions

20
k8s/configmap.yaml Normal file
View File

@@ -0,0 +1,20 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: traefik-external
namespace: kube-system
data:
traefik.toml: |
# traefik.toml
[kubernetes]
labelselector = "external"
ingressClass = "traefik-external"
defaultEntryPoints = ["http","https"]
[entryPoints]
[entryPoints.http]
address = ":9080"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":9443"
[entryPoints.https.tls]

View File

@@ -19,13 +19,16 @@ spec:
serviceAccountName: traefik-external
terminationGracePeriodSeconds: 60
containers:
- image: hub.ducoterra.net/ducoterra/traefik:v1.7_2
- image: traefik:v1.7
name: traefik-external
ports:
- name: http
containerPort: 9080
- name: https
containerPort: 9443
volumeMounts:
- mountPath: /config-files
name: traefik-config
resources:
limits:
memory: "2Gi"
@@ -37,6 +40,8 @@ spec:
- --api
- --kubernetes
- --logLevel=INFO
- --defaultentrypoints=http,https
- --entrypoints=Name:https Address::9443 TLS
- --entrypoints=Name:http Address::9080
- --configFile=/config-files/traefik.toml
volumes:
- name: traefik-config
configMap:
name: traefik-external