Rename selective auth + fix selective auth examples (#130)
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
|
||||
This is an advanced example of how to deploy traefik-forward-auth in it's own pod. This example is a good starting point for those who already have traefik deployed (e.g. using helm).
|
||||
|
||||
This example uses [Individual Authentication](https://github.com/thomseddon/traefik-forward-auth/blob/master/README.md#individual-ingress-authentication-in-kubernetes) to selectively apply forward authentication to each individual ingress, a simple example "whoami" application (deployment, service and ingress) is included for completeness.
|
||||
This example uses [Selective Authentication](https://github.com/thomseddon/traefik-forward-auth/blob/master/README.md#selective-ingress-authentication-in-kubernetes) to selectively apply forward authentication to each selective ingress, a simple example "whoami" application (deployment, service and ingress) is included for completeness.
|
||||
|
||||
This example leverages kustomise to define Secrets and ConfigMaps, example deployment:
|
||||
|
||||
|
@ -7,6 +7,11 @@ metadata:
|
||||
name: traefik-forward-auth
|
||||
labels:
|
||||
app: traefik-forward-auth
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik
|
||||
ingress.kubernetes.io/auth-type: forward
|
||||
ingress.kubernetes.io/auth-url: http://traefik-forward-auth:4181
|
||||
ingress.kubernetes.io/auth-response-headers: X-Forwarded-User
|
||||
spec:
|
||||
rules:
|
||||
- host: auth.example.com
|
||||
|
@ -6,6 +6,9 @@ metadata:
|
||||
app: whoami
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik
|
||||
ingress.kubernetes.io/auth-type: forward
|
||||
ingress.kubernetes.io/auth-url: http://traefik-forward-auth:4181
|
||||
ingress.kubernetes.io/auth-response-headers: X-Forwarded-User
|
||||
spec:
|
||||
rules:
|
||||
- host: whoami.example.com
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
This is an advanced example of how to deploy traefik-forward-auth in it's own pod. This example is a good starting point for those who already have traefik deployed (e.g. using helm).
|
||||
|
||||
This example uses [Individual Authentication](https://github.com/thomseddon/traefik-forward-auth/blob/master/README.md#individual-ingress-authentication-in-kubernetes) to selectively apply forward authentication to each individual ingresses, for example:
|
||||
This example uses [Selective Authentication](https://github.com/thomseddon/traefik-forward-auth/blob/master/README.md#selective-ingress-authentication-in-kubernetes) to selectively apply forward authentication to each selective ingresses, for example:
|
||||
|
||||
```
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
|
@ -16,5 +16,7 @@ spec:
|
||||
services:
|
||||
- name: traefik-forward-auth
|
||||
port: 4181
|
||||
middlewares:
|
||||
- name: traefik-forward-auth
|
||||
tls:
|
||||
certresolver: default
|
||||
|
@ -16,4 +16,4 @@ spec:
|
||||
middlewares:
|
||||
- name: traefik-forward-auth
|
||||
tls:
|
||||
certresolver: default
|
||||
certresolver: default
|
||||
|
@ -14,4 +14,4 @@ spec:
|
||||
- name: whoami
|
||||
port: 80
|
||||
tls:
|
||||
certresolver: default
|
||||
certresolver: default
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
This is a simple example of how to deploy traefik-forward-auth in it's own pod with minimal configuration. This example is a good starting point for those who already have traefik deployed (e.g. using helm).
|
||||
|
||||
This example uses [Individual Authentication](https://github.com/thomseddon/traefik-forward-auth/blob/master/README.md#individual-ingress-authentication-in-kubernetes) to apply forward authentication to selected ingresses. This means ingresses will not be protected by default. Authentication can be applied by adding the `traefik-forward-auth` middleware, for example:
|
||||
This example uses [Selective Authentication](https://github.com/thomseddon/traefik-forward-auth/blob/master/README.md#selective-ingress-authentication-in-kubernetes) to apply forward authentication to selected ingresses. This means ingresses will not be protected by default. Authentication can be applied by adding the `traefik-forward-auth` middleware, for example:
|
||||
|
||||
```
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
|
@ -57,4 +57,4 @@ spec:
|
||||
- name: whoami
|
||||
port: 80
|
||||
middlewares:
|
||||
- name: traefik-forward-auth
|
||||
- name: traefik-forward-auth
|
||||
|
@ -14,7 +14,7 @@ services:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost.com`)"
|
||||
# This example uses "Individual Authentication"
|
||||
# This example uses "Selective Authentication"
|
||||
- "traefik.http.routers.whoami.middlewares=traefik-forward-auth"
|
||||
|
||||
traefik-forward-auth:
|
||||
|
Reference in New Issue
Block a user