forked from bomoko/lagoon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.lagoon.yml
198 lines (198 loc) · 5.4 KB
/
.lagoon.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: lagoon-openshift-template-logstash
parameters:
- name: SERVICE_NAME
description: Name of this service
required: true
- name: SAFE_BRANCH
description: Which branch this belongs to, special chars replaced with dashes
required: true
- name: SAFE_PROJECT
description: Which project this belongs to, special chars replaced with dashes
required: true
- name: BRANCH
description: Which branch this belongs to, original value
required: true
- name: PROJECT
description: Which project this belongs to, original value
required: true
- name: LAGOON_GIT_SHA
description: git hash sha of the current deployment
required: true
- name: SERVICE_ROUTER_URL
description: URL of the Router for this service
value: ""
- name: OPENSHIFT_PROJECT
description: Name of the Project that this service is in
required: true
- name: REGISTRY
description: Registry where Images are pushed to
required: true
- name: DEPLOYMENT_STRATEGY
description: Strategy of Deploymentconfig
value: "Rolling"
- name: SERVICE_IMAGE
description: Pullable image of service
required: true
- name: CRONJOBS
description: Oneliner of Cronjobs
value: ""
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
creationTimestamp: null
labels:
branch: ${SAFE_BRANCH}
project: ${SAFE_PROJECT}
name: ${SERVICE_NAME}
spec:
replicas: 3
selector:
service: ${SERVICE_NAME}
strategy:
type: ${DEPLOYMENT_STRATEGY}
template:
metadata:
creationTimestamp: null
labels:
service: ${SERVICE_NAME}
branch: ${SAFE_BRANCH}
project: ${SAFE_PROJECT}
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: service
operator: In
values:
- ${SERVICE_NAME}
topologyKey: kubernetes.io/hostname
containers:
- image: ${SERVICE_IMAGE}
name: ${SERVICE_NAME}
ports:
- containerPort: 9600
protocol: TCP
readinessProbe:
httpGet:
port: 9600
initialDelaySeconds: 20
livenessProbe:
httpGet:
port: 9600
initialDelaySeconds: 120
envFrom:
- configMapRef:
name: lagoon-env
env:
- name: CRONJOBS
value: ${CRONJOBS}
- name: SERVICE_NAME
value: ${SERVICE_NAME}
- name: RABBITMQ_USER
valueFrom:
secretKeyRef:
key: RABBITMQ_USERNAME
name: rabbitmq-username
- name: RABBITMQ_PASSWORD
valueFrom:
secretKeyRef:
key: RABBITMQ_PASSWORD
name: rabbitmq-password
- name: LOGSDB_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
key: LOGSDB_ADMIN_PASSWORD
name: logs-db-admin-password
- name: XPACK_MANAGEMENT_ELASTICSEARCH_PASSWORD
valueFrom:
secretKeyRef:
key: LOGSDB_ADMIN_PASSWORD
name: logs-db-admin-password
- name: XPACK_MONITORING_ELASTICSEARCH_PASSWORD
valueFrom:
secretKeyRef:
key: LOGSDB_ADMIN_PASSWORD
name: logs-db-admin-password
- name: LOGSTASH_USERNAME
valueFrom:
secretKeyRef:
name: logstash-username
key: LOGSTASH_USERNAME
- name: LOGSTASH_PASSWORD
valueFrom:
secretKeyRef:
name: logstash-password
key: LOGSTASH_PASSWORD
resources:
requests:
cpu: 10m
memory: 10Mi
test: false
triggers:
- type: ConfigChange
status: {}
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
service: ${SERVICE_NAME}
branch: ${SAFE_BRANCH}
project: ${SAFE_PROJECT}
name: ${SERVICE_NAME}
spec:
ports:
- name: logstash-mgmt
port: 9600
protocol: TCP
targetPort: 9600
- name: udp-input-module
port: 5140
protocol: UDP
targetPort: 5140
- name: tcp-input-module
port: 28777
protocol: TCP
targetPort: 28777
selector:
service: ${SERVICE_NAME}
- apiVersion: v1
kind: Service
metadata:
labels:
service: ${SERVICE_NAME}
branch: ${SAFE_BRANCH}
project: ${SAFE_PROJECT}
name: ${SERVICE_NAME}-lumberjack
spec:
ports:
- name: lumberjack-input-module
port: 5044
protocol: TCP
targetPort: 5044
selector:
service: ${SERVICE_NAME}
type: NodePort
- apiVersion: v1
kind: Service
metadata:
name: router-logs
spec:
externalName: ${SERVICE_NAME}.${OPENSHIFT_PROJECT}.svc.cluster.local
sessionAffinity: None
type: ExternalName
- apiVersion: v1
kind: Service
metadata:
name: application-logs
spec:
externalName: ${SERVICE_NAME}.${OPENSHIFT_PROJECT}.svc.cluster.local
sessionAffinity: None
type: ExternalName