File tree 3 files changed +105
-0
lines changed
3 files changed +105
-0
lines changed Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : Deployment
3
+ metadata :
4
+ name : mongo-express
5
+ spec :
6
+ replicas : 1
7
+ selectors :
8
+ matchLabels :
9
+ app : mongo-express
10
+ template :
11
+ metadata :
12
+ labels :
13
+ app : mongo-express
14
+ spec :
15
+ containers :
16
+ - name : mongo-express
17
+ image : mongo-express
18
+ ports :
19
+ - containerPort : 8081
20
+ env :
21
+ - name : ME_CONFIG_MONGODB_ADMINUSERNAME
22
+ valueFrom :
23
+ secretKeyRef :
24
+ name : mongodb-secret
25
+ key : mongodb-root-username
26
+ - name : ME_CONFIG_MONGODB_ADMINPASSWORD
27
+ valueFrom :
28
+ secretKeyRef :
29
+ name : mongodb-secret
30
+ key : mongodb-root-password
31
+ - name : ME_CONFIG_MONGODB_SERVER
32
+ valueFrom :
33
+ configMapKeyRef :
34
+ name : mongodb-configmap
35
+ key : database_url
36
+ ---
37
+ apiVersion : v1
38
+ kind : Service
39
+ metadata :
40
+ name : mongo-express-service
41
+ spec :
42
+ selector :
43
+ app : mongo-express
44
+ type : LoadBalancer
45
+ ports :
46
+ - protocol : TCP
47
+ port : 8081
48
+ targetPort : 8081
49
+ nodePort : 30000
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : Deployment
3
+ metadata :
4
+ name : mongodb-deployment
5
+ labels :
6
+ app : mongodb
7
+ spec :
8
+ replicas : 1
9
+ selector :
10
+ matchLabels :
11
+ app : mongodb
12
+ template :
13
+ metadata :
14
+ labels :
15
+ app : mongodb
16
+ spec :
17
+ containers :
18
+ - name : mongodb
19
+ image : mongo
20
+ ports :
21
+ - containerPort : 27017
22
+ env :
23
+ - name : MONGO_INITDB_ROOT_USERNAME
24
+ valueFrom :
25
+ secretKeyRef :
26
+ name : mongodb-secret
27
+ key : mongodb-root-username
28
+ - name : MONGO_INITDB_ROOT_PASSWORD
29
+ valueFrom :
30
+ secretKeyRef :
31
+ name : mongodb-secret
32
+ key : mongodb-root-password
33
+ ---
34
+ apiVersion : v1
35
+ kind : Service
36
+ metadata :
37
+ name : mongodb-service
38
+ spec :
39
+ selector :
40
+ app : mongodb
41
+ ports :
42
+ - protocol : TCP
43
+ port : 27017
44
+ targetPort : 27017
45
+ # If you set the `spec.type` field to `NodePort` and you want a specific port number,
46
+ # you can specify a value in the `spec.ports[*].nodePort` field.
47
+
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Secret
3
+ metadata :
4
+ name : mongodb-secret
5
+ type : Opaque
6
+ data :
7
+ mongodb-root-username : dXNlcm5hbWU=
8
+ mongodb-root-password : cGFzc3dvcmQ=
9
+ # password: {{ .Values.password | b64enc }}
You can’t perform that action at this time.
0 commit comments