Created
March 28, 2020 09:15
-
-
Save javaadpatel/791e0905006ef09207d8875f98060f1c to your computer and use it in GitHub Desktop.
Traefik authentication server deployment configuration (repository: https://github.com/javaadpatel/Medium_Securing_Traefik_Dashboard)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Deployment | |
apiVersion: extensions/v1beta1 | |
metadata: | |
name: traefikauth | |
namespace: default | |
labels: | |
app: containous | |
name: traefikauth | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: containous | |
task: traefikauth | |
template: | |
metadata: | |
labels: | |
app: containous | |
task: traefikauth | |
spec: | |
containers: | |
- name: traefikauth | |
image: thomseddon/traefik-forward-auth:2 | |
ports: | |
- containerPort: 4181 | |
protocol: TCP | |
env: | |
- name: DEFAULT_PROVIDER | |
value: "oidc" | |
- name: PROVIDERS_OIDC_ISSUER_URL | |
valueFrom: | |
secretKeyRef: | |
name: authenticationserver | |
key: issuerurl | |
- name: PROVIDERS_OIDC_CLIENT_ID | |
valueFrom: | |
secretKeyRef: | |
name: authenticationserver | |
key: clientid | |
- name: PROVIDERS_OIDC_CLIENT_SECRET | |
valueFrom: | |
secretKeyRef: | |
name: authenticationserver | |
key: clientsecret | |
- name: SECRET | |
valueFrom: | |
secretKeyRef: | |
name: authenticationserver | |
key: jwtsecret | |
- name: LOG_LEVEL | |
value: trace | |
resources: | |
limits: | |
memory: "512Mi" | |
cpu: "500m" | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: traefikauth | |
namespace: default | |
spec: | |
ports: | |
- name: http | |
protocol: TCP | |
port: 80 | |
targetPort: 4181 | |
selector: | |
app: containous | |
task: traefikauth | |
--- | |
apiVersion: traefik.containo.us/v1alpha1 | |
kind: IngressRoute | |
metadata: | |
name: traefikauth-route | |
namespace: default | |
spec: | |
entryPoints: | |
- web | |
- websecure | |
routes: | |
- match: Host(`traefikauth.YOURDOMAIN.com`) | |
kind: Rule | |
services: | |
- name: traefikauth | |
port: 80 | |
tls: | |
certResolver: le | |
domains: | |
- main: YOURDOMAIN.com | |
sans: | |
- "*.YOURDOMAIN.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment