-
Notifications
You must be signed in to change notification settings - Fork 1
/
whoami.yaml
58 lines (58 loc) · 1.16 KB
/
whoami.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
apiVersion: v1
kind: Service
metadata:
name: whoami
spec:
selector:
component: whoami
ports:
- protocol: TCP
port: 80
targetPort: 80
name: http
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: whoami
spec:
replicas: 1
selector:
matchLabels:
component: whoami
template:
metadata:
labels:
component: whoami
annotations:
rollme: "{{ randAlphaNum 5 | quote }}"
spec:
restartPolicy: Always
containers:
- name: whoami
image: traefik/whoami
imagePullPolicy: Always
ports:
- name: http
containerPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-whoami
annotations:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: "/$2"
spec:
rules:
- host: "${TLN_CLOUDS_WHOAMI_HOST}"
http:
paths:
- path: "/whoami(/|$)(.*)"
pathType: "ImplementationSpecific"
backend:
service:
name: whoami
port:
number: 80
ingressClassName: nginx