From 62b50cbce96d9a85823d26e49cf0d6f1f1688a8f Mon Sep 17 00:00:00 2001 From: ducoterra Date: Sat, 18 Apr 2020 16:44:43 -0400 Subject: [PATCH] custom settings --- Dockerfile | 3 ++ docker-compose.yaml | 6 +++ k8s/deploy.yaml | 5 +-- traefik.toml | 94 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml create mode 100644 traefik.toml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..501fc50 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM traefik:v1.7 + +COPY traefik.toml /etc/traefik/traefik.toml \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..3294671 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,6 @@ +version: '3' + +services: + traefik: + build: . + image: hub.ducoterra.net/ducoterra/traefik:v1.7 \ No newline at end of file diff --git a/k8s/deploy.yaml b/k8s/deploy.yaml index 46d5c2a..070fcf6 100644 --- a/k8s/deploy.yaml +++ b/k8s/deploy.yaml @@ -19,7 +19,7 @@ spec: serviceAccountName: traefik-ingress-controller terminationGracePeriodSeconds: 60 containers: - - image: traefik:v1.7 + - image: hub.ducoterra.net/ducoterra/traefik:v1.7 name: traefik-external-lb ports: - name: http @@ -32,5 +32,4 @@ spec: - --logLevel=INFO - --defaultentrypoints=http,https - --entrypoints=Name:https Address::443 TLS - - --entrypoints=Name:http Address::80 - - --providers.kubernetescrd.ingressclass=external \ No newline at end of file + - --entrypoints=Name:http Address::80 \ No newline at end of file diff --git a/traefik.toml b/traefik.toml new file mode 100644 index 0000000..f7bacdd --- /dev/null +++ b/traefik.toml @@ -0,0 +1,94 @@ +################################################################ +# Kubernetes Ingress Provider +################################################################ + +# Enable Kubernetes Ingress Provider. +[kubernetes] + +# Kubernetes server endpoint. +# +# Optional for in-cluster configuration, required otherwise. +# Default: empty +# +# endpoint = "http://localhost:8080" + +# Bearer token used for the Kubernetes client configuration. +# +# Optional +# Default: empty +# +# token = "my token" + +# Path to the certificate authority file. +# Used for the Kubernetes client configuration. +# +# Optional +# Default: empty +# +# certAuthFilePath = "/my/ca.crt" + +# Array of namespaces to watch. +# +# Optional +# Default: all namespaces (empty array). +# +# namespaces = ["default", "production"] + +# Ingress label selector to filter Ingress objects that should be processed. +# +# Optional +# Default: empty (process all Ingresses) +# +labelselector = "external" + +# Value of `kubernetes.io/ingress.class` annotation that identifies Ingress objects to be processed. +# If the parameter is non-empty, only Ingresses containing an annotation with the same value are processed. +# Otherwise, Ingresses missing the annotation, having an empty value, or the value `traefik` are processed. +# +# Optional +# Default: empty +# +ingressClass = "traefik-external" + +# Disable PassHost Headers. +# +# Optional +# Default: false +# +# disablePassHostHeaders = true + +# Enable PassTLSCert Headers. +# +# Optional +# Default: false +# +# enablePassTLSCert = true + +# Throttle how frequently we refresh our configuration from Ingresses when there +# are frequent changes. +# +# Optional +# Default: 0 (no throttling) +# +# throttleDuration = 10s + +# Override default configuration template. +# +# Optional +# Default: +# +# filename = "kubernetes.tmpl" + +# Enable IngressEndpoint configuration. +# This will allow Traefik to update the status section of ingress objects, if desired. +# +# Optional +# +# [kubernetes.ingressEndpoint] +# +# At least one must be configured. +# `publishedservice` will override the `hostname` and `ip` settings if configured. +# +# hostname = "localhost" +# ip = "127.0.0.1" +# publishedService = "namespace/servicename"