-
Notifications
You must be signed in to change notification settings - Fork 18
/
example.yml
73 lines (73 loc) · 1.98 KB
/
example.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
---
kind: "Template"
apiVersion: "v1"
metadata:
name: "mongodb-ephemeral"
annotations:
description: "Provides a MongoDB database service"
labels:
template: "mongodb-ephemeral-template"
objects:
- kind: "Service"
apiVersion: "v1"
metadata:
name: "$(DATABASE_SERVICE_NAME)"
spec:
ports:
- name: "mongo"
protocol: "TCP"
targetPort: 27017
selector:
name: "$(DATABASE_SERVICE_NAME)"
- kind: "ReplicationController"
apiVersion: "v1"
metadata:
name: "$(DATABASE_SERVICE_NAME)"
spec:
replicas: "$((REPLICA_COUNT))"
selector:
name: "$(DATABASE_SERVICE_NAME)"
template:
metadata:
creationTimestamp: null
labels:
name: "$(DATABASE_SERVICE_NAME)"
spec:
containers:
- name: "mongodb"
image: "docker.io/centos/mongodb-26-centos7"
ports:
- containerPort: 27017
protocol: "TCP"
env:
- name: "MONGODB_USER"
value: "$(MONGODB_USER)"
- name: "MONGODB_PASSWORD"
value: "$(MONGODB_PASSWORD)"
- name: "MONGODB_DATABASE"
value: "$(MONGODB_DATABASE)"
parameters:
- name: "DATABASE_SERVICE_NAME"
description: "Database service name"
value: "mongodb"
required: true
parameterType: "string"
- name: "MONGODB_USER"
description: "Username for MongoDB user that will be used for accessing the database"
value: "username"
required: true
parameterType: "string"
- name: "MONGODB_PASSWORD"
description: "Password for the MongoDB user"
required: true
parameterType: "base64"
- name: "MONGODB_DATABASE"
description: "Database name"
value: "sampledb"
required: true
parameterType: "string"
- name: "REPLICA_COUNT"
description: "Number of mongo replicas to run"
value: 1
required: true
parameterType: "int"