-
Notifications
You must be signed in to change notification settings - Fork 5
/
nginx.yaml
72 lines (72 loc) · 1.48 KB
/
nginx.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
---
apiVersion: v1
kind: ConfigMap
metadata:
name: test-configmap
data:
test_env: "foo"
---
apiVersion: v1
data:
pass: bXlwYXNzd29yZA==
kind: Secret
metadata:
name: test-secret
---
apiVersion: v1
data:
nginx.conf: |
# Run as a less privileged user for security reasons.
user nginx;
kind: ConfigMap
metadata:
name: cm-ask
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
annotations:
configmap.reloader.stakater.com/reload: "test-configmap"
configmap.reloader.stakater.com/reload: "cm-ask"
secret.reloader.stakater.com/reload: "test-secret"
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:alpine
ports:
- containerPort: 80
volumeMounts:
- mountPath: /tmp/nginx.conf
name: ask
subPath: nginx.conf
env:
- name: TEST_ENV
valueFrom:
configMapKeyRef:
name: test-configmap
key: test_env
- name: TEST_PASS
valueFrom:
secretKeyRef:
name: test-secret
key: pass
volumes:
- name: ask
configMap:
name: cm-ask
items:
- key: nginx.conf
path: nginx.conf
defaultMode: 0777