move toml to configmap
This commit is contained in:
20
k8s/configmap.yaml
Normal file
20
k8s/configmap.yaml
Normal 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]
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user