-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
expand_config.yml
65 lines (65 loc) · 1.26 KB
/
expand_config.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
apiVersion: v1
kind: ConfigMap
metadata:
name: expand-config
data:
config.yaml.txt: |
host: postgres
port: 5432
user: $DB_USER
password: $DB_PASSWORD
---
apiVersion: v1
kind: Secret
metadata:
name: expand-config
stringData:
DB_USER: foo
DB_PASSWORD: bar
---
apiVersion: v1
kind: Pod
metadata:
name: expand-config
spec:
volumes:
- name: config1
configMap:
name: expand-config
- name: config2
emptyDir: {}
initContainers:
- name: config
image: sikalabs/slu:v0.22.0
command:
- "/bin/sh"
- "-c"
- "slu expand file -s /config1/config.yaml.txt > /config2/config.yaml.txt"
volumeMounts:
- mountPath: /config2
name: config2
- mountPath: /config1
name: config1
envFrom:
- secretRef:
name: expand-config
resources:
requests:
memory: 50Mi
cpu: 50m
limits:
memory: 100Mi
cpu: 100m
containers:
- name: main
image: sikalabs/nginx-public
volumeMounts:
- mountPath: /usr/share/nginx/html
name: config2
resources:
requests:
memory: 50Mi
cpu: 50m
limits:
memory: 100Mi
cpu: 100m