-
Notifications
You must be signed in to change notification settings - Fork 0
/
ingress-rp.yaml
38 lines (36 loc) · 1.45 KB
/
ingress-rp.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# kubectl apply -f ingress-rp.yaml
# curl -L --resolve arorp.westus3.cloudapp.azure.com:443:{EXTERNAL-IP} https://arorp.westus3.cloudapp.azure.com/ -k -H "Authorization: Bearer {TOKEN}"
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-rp
namespace: ingress-basic
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
# https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#external-authentication
nginx.ingress.kubernetes.io/auth-url: "http://mise-auth.ingress-basic.svc.cluster.local/ValidateRequest"
nginx.ingress.kubernetes.io/auth-keepalive: "3"
nginx.ingress.kubernetes.io/auth-method: POST
# add inputs for auth request
# https://identitydivision.visualstudio.com/DevEx/_git/MISE?path=/docs/container/InputOutput.md&version=GBmaster&_a=preview
# https://identitydivision.visualstudio.com/DevEx/_git/MISE?path=/docs/Container.md&version=GBmaster&_a=preview&anchor=send-a-request-to-a-mise-container
nginx.ingress.kubernetes.io/auth-snippet: |
proxy_set_header Original-Uri https://$host/;
proxy_set_header Original-Method GET;
spec:
ingressClassName: nginx
tls:
- hosts:
- arorp.westus3.cloudapp.azure.com
secretName: ingress-tls-csi
rules:
- host: arorp.westus3.cloudapp.azure.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: rp
port:
number: 80