forked from tkestack/tke
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tke-auth-api.yaml
118 lines (113 loc) · 3.17 KB
/
tke-auth-api.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
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
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
k8s-app: tke-auth
name: tke-auth
namespace: {{NAMESPACE}}
spec:
selector:
matchLabels:
k8s-app: tke-auth
template:
metadata:
labels:
k8s-app: tke-auth
spec:
containers:
- name: tke-auth
image: hkccr.ccs.tencentyun.com/tke-dev/tke-auth-api:zydtest
imagePullPolicy: Always
env:
- name: TIMESTAMP
value: 2019-11-14
args:
- --log-disable-color
- --etcd-servers=http:https://etcd:2379
- --tls-cert-file=/etc/tke/server.pem
- --tls-private-key-file=/etc/tke/server-key.pem
- --assets-path=web/auth
- --id-token-timeout=24h
- --basic-auth-file=/etc/tke/password.csv
- --token-auth-file=/etc/tke/token.csv
- --client-ca-file=/etc/tke/ca.pem
- --cors-allowed-origins=https://(.*).console.tke.com
- --casbin-reload-interval=2s
- --policy-path=/etc/auth/policy.json
- --category-path=/etc/auth/category.json
- --init-tenant-id=default
- --tenant-admin=admin
- --tenant-admin-secret=admin
- --init-client-id=default
- --init-client-secret=652422316756
- --init-client-redirect-uris=https://{{NAMESPACE}}.console.tke.com/callback,https://{{NAMESPACE}}.console.tke.com:443/callback
volumeMounts:
- name: config-volume
mountPath: /etc/tke
- name: auth-config-volume
mountPath: /etc/auth
ports:
- containerPort: 9451
readinessProbe:
httpGet:
port: 9451
path: /healthz/ping
scheme: HTTPS
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
port: 9451
path: /healthz
scheme: HTTPS
initialDelaySeconds: 15
periodSeconds: 20
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 250m
memory: 256Mi
volumes:
- name: config-volume
configMap:
name: config
- name: auth-config-volume
configMap:
name: auth-config
---
kind: Service
apiVersion: v1
metadata:
name: tke-auth
namespace: {{NAMESPACE}}
spec:
selector:
k8s-app: tke-auth
ports:
- protocol: TCP
port: 9451
targetPort: 9451
---
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: tke-auth
namespace: {{NAMESPACE}}
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: {{NAMESPACE}}.auth.tke.com
http:
paths:
- path: /
backend:
serviceName: tke-auth
servicePort: 9451