-
Notifications
You must be signed in to change notification settings - Fork 2
/
tracing-gatekeeper.yml
144 lines (143 loc) · 3.91 KB
/
tracing-gatekeeper.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
apiVersion: v1
kind: Secret
metadata:
name: dashboard-proxy-keys
annotations:
vault.security.banzaicloud.io/vault-addr: "https://vault.default.svc.cluster.local:8200"
vault.security.banzaicloud.io/vault-role: "default"
vault.security.banzaicloud.io/vault-path: "kubernetes"
vault.security.banzaicloud.io/vault-skip-verify: "true"
type: Opaque
stringData:
CLIENT_ID: vault:secret/data/tracing/client/id#client_id
CLIENT_SECRET: vault:secret/data/tracing/client/secret#client_secret
ENCRYPTION_KEY: vault:secret/data/tracing/client/encryption#encryption_key
---
apiVersion: v1
kind: ConfigMap
metadata:
name: dashboard-proxy-config
data:
gatekeeper.yaml: |-
discovery-url: https://auth.local.net/auth/realms/localnet
skip-upstream-tls-verify: false
skip-openid-provider-tls-verify: true
listen: ':3000'
secure-cookie: false
enable-logging: true
enable-json-logging: true
enable-default-deny: true
enable-refresh-tokens: true
enable-session-cookies: true
debug: true
ingress.enabled: true
redirection-url: https://tracing.local.net
upstream-url: http://jaeger.tracing.svc.cluster.local:16686/
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dashboard-gatekeeper
spec:
selector:
matchLabels:
app: dashboard-gatekeeper
template:
metadata:
labels:
app: dashboard-gatekeeper
annotations:
linkerd.io/inject: enabled
# annotations:
# vault.security.banzaicloud.io/vault-addr: "https://vault.default.svc.cluster.local:8200"
# vault.security.banzaicloud.io/vault-tls-secret: "vault-tls"
spec:
hostAliases:
- ip: "192.168.0.111"
hostnames:
- auth.local.net
containers:
- name: dashboard-gatekeeper
image: bitnami/keycloak-gatekeeper:9
# image: keycloak/keycloak-gatekeeper:7.0.0
ports:
- containerPort: 3000
env:
- name: CLIENT_ID
valueFrom:
secretKeyRef:
key: CLIENT_ID
name: dashboard-proxy-keys
- name: CLIENT_SECRET
valueFrom:
secretKeyRef:
key: CLIENT_SECRET
name: dashboard-proxy-keys
- name: ENCRYPTION_KEY
valueFrom:
secretKeyRef:
key: ENCRYPTION_KEY
name: dashboard-proxy-keys
args:
- /keycloak-gatekeeper
- --config=/etc/secrets/gatekeeper.yaml
- --client-id=$(CLIENT_ID)
- --client-secret=$(CLIENT_SECRET)
- --encryption-key=$(ENCRYPTION_KEY)
- --resources=uri=/*
volumeMounts:
- name: gatekeeper-secrets
mountPath: /etc/secrets
volumes:
- name: gatekeeper-secrets
configMap:
name: dashboard-proxy-config
---
apiVersion: v1
kind: Service
metadata:
name: dashboard-gatekeeper
spec:
selector:
app: dashboard-gatekeeper
ports:
- port: 3000
targetPort: 3000
---
apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
name: tracing-cert
spec:
secretName: tracing-tls
commonName: mesh
dnsNames:
- tracing.local.net
ipAddresses:
- 192.168.0.111
- 127.0.0.1
issuerRef:
name: selfsigned-issuer
kind: ClusterIssuer
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: dashboard-gatekeeper
annotations:
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_set_header l5d-dst-override $service_name.$namespace.svc.cluster.local:$service_port;
grpc_set_header l5d-dst-override $service_name.$namespace.svc.cluster.local:$service_port;
spec:
rules:
- host: tracing.local.net
http:
paths:
- path: /
backend:
serviceName: dashboard-gatekeeper
servicePort: 3000
tls:
- hosts:
- tracing.local.net
secretName: tracing-tls