-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathk8s-src.yml
79 lines (74 loc) · 1.93 KB
/
k8s-src.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment-005
spec:
selector:
matchLabels:
app: nginx-container-005
replicas: 2
template:
metadata:
labels:
app: nginx-container-005
spec:
volumes:
- name: nginx-volume-bind
persistentVolumeClaim:
claimName: nginx-volume-claim
- name: foo
configMap:
name: game-demo
containers:
- name: nginx
image: 288milan/jenkins-pipe-demo
ports:
- containerPort: 8080
resources:
requests:
memory: "250Mi"
limits:
memory: "250Mi"
volumeMounts:
#- name: nginx-volume-bind
# mountPath: /home
- name: foo
mountPath: "/home"
env:
# Define the environment variable
- name: PLAYER_INITIAL_LIVES # Notice that the case is different here
# from the key name in the ConfigMap.
valueFrom:
configMapKeyRef:
name: game-demo # The ConfigMap this value comes from.
key: player_initial_lives # The key to fetch.
- name: UI_PROPERTIES_FILE_NAME
valueFrom:
configMapKeyRef:
name: game-demo
key: ui_properties_file_name
- name: SECRET_USERNAME
valueFrom:
secretKeyRef:
name: mysecret
key: username
optional: false # same as default; "mysecret" must exist
# and include a key named "username"
- name: SECRET_PASSWORD
valueFrom:
secretKeyRef:
name: mysecret
key: password
optional: false
---
apiVersion: v1
kind: Service
metadata:
name: nginx-service-005
labels:
app: nginx
spec:
ports:
- port: 8080
selector:
app: nginx-container-005