forked from nginxinc/bank-of-sirius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuserservice.yaml
100 lines (100 loc) · 2.77 KB
/
userservice.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: userservice
spec:
selector:
matchLabels:
app: userservice
template:
metadata:
labels:
app: userservice
spec:
serviceAccountName: default
terminationGracePeriodSeconds: 5
containers:
- name: userservice
image: ghcr.io/nginxinc/bos-userservice:v1.3.0
imagePullPolicy: Always
volumeMounts:
- name: keys
mountPath: /root/.ssh
readOnly: true
ports:
- name: http-server
containerPort: 8080
env:
- name: VERSION
value: v1.2.0
- name: PORT
value: "8080"
- name: STATSD_HOST
value: statsd-prometheus-statsd-exporter.prometheus.svc.cluster.local:9125
- name: STATSD_PREFIX
value: bos.userservice
- name: OTEL_EXPORTER_OTLP_ENDPOINT
valueFrom:
configMapKeyRef:
name: tracing-config
key: OTEL_EXPORTER_OTLP_ENDPOINT
- name: ENABLE_TRACING
valueFrom:
configMapKeyRef:
name: tracing-config
key: ENABLE_TRACING
- name: ENABLE_METRICS
valueFrom:
configMapKeyRef:
name: tracing-config
key: ENABLE_METRICS
- name: APP_NAME
value: userservice
- name: TOKEN_EXPIRY_SECONDS
value: "3600"
- name: PRIV_KEY_PATH
value: /root/.ssh/privatekey
# Valid levels are debug, info, warning, error, critical. If no valid level is set, defaults to info.
- name: LOG_LEVEL
value: info
envFrom:
- configMapRef:
name: environment-config
- configMapRef:
name: accounts-db-config
readinessProbe:
httpGet:
path: /z/health/readiness
port: 8080
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 10
livenessProbe:
httpGet:
path: /z/health/liveness
port: 8080
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 10
volumes:
- name: keys
secret:
secretName: jwt-key
items:
- key: jwtRS256.key
path: privatekey
- key: jwtRS256.key.pub
path: publickey
---
apiVersion: v1
kind: Service
metadata:
name: userservice
spec:
type: ClusterIP
selector:
app: userservice
ports:
- name: http
port: 8080
targetPort: 8080