-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathengine-controller.yaml
More file actions
187 lines (186 loc) · 6.04 KB
/
engine-controller.yaml
File metadata and controls
187 lines (186 loc) · 6.04 KB
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
#
# Copyright contributors to the Galasa project
#
# SPDX-License-Identifier: EPL-2.0
#
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-engine-controller
labels:
app: {{ .Release.Name }}-engine-controller
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: {{ .Release.Name }}-engine-controller
template:
metadata:
name: {{ .Release.Name }}-engine-controller
labels:
app: {{ .Release.Name }}-engine-controller
annotations:
rollme: {{ randAlphaNum 5 | quote }}
spec:
serviceAccountName: galasa
nodeSelector:
kubernetes.io/arch: {{ .Values.architecture }}
{{- if .Values.nodeSelectors }}
{{ toYaml .Values.nodeSelectors | indent 8 }}
{{- end }}
initContainers:
- name: wait-for-etcd
image: {{ .Values.kubectlImage }}
imagePullPolicy: {{ .Values.pullPolicy }}
command:
- kubectl
args:
- wait
- pods
- -l=app={{ .Release.Name }}-etcd
- --for=condition=Ready
- --timeout=90s
- name: wait-for-ras
image: {{ .Values.kubectlImage }}
imagePullPolicy: {{ .Values.pullPolicy }}
command:
- kubectl
args:
- wait
- pods
- -l=app={{ .Release.Name }}-ras
- --for=condition=Ready
- --timeout=90s
- name: wait-for-dex
image: {{ .Values.kubectlImage }}
imagePullPolicy: {{ .Values.pullPolicy }}
command:
- kubectl
args:
- wait
- pods
- -l=app={{ .Release.Name }}-dex
- --for=condition=Ready
- --timeout=90s
containers:
- name: engine-controller
image: {{ .Values.galasaRegistry }}/{{ .Values.galasaBootImage }}:{{ .Values.galasaVersion }}
##
## Provide some guidance to kubernetes on how much memory/cpu this container needs.
{{- if .Values.enginecontroller }}
{{- if .Values.enginecontroller.resources }}
{{- with .Values.enginecontroller.resources }}
resources: {{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- end }}
imagePullPolicy: {{ .Values.pullPolicy }}
command:
- /bin/bash
- -ec
- |
java -jar boot.jar --obr file:galasa.obr --setupeco --log4j2-properties-file file:/log4j2.properties
java -jar boot.jar --obr file:galasa.obr --k8scontroller --log4j2-properties-file file:/log4j2.properties
env:
- name: GALASA_INSTALL_NAME
value: {{ .Release.Name }}
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: CONFIG
value: {{ .Release.Name }}-config
- name: GALASA_EXTRA_BUNDLES
value: {{ include "framework.extra.bundles" . }}
- name: GALASA_CONFIG_STORE
value: etcd:{{ include "cps.url" . }}
- name: GALASA_DYNAMICSTATUS_STORE
value: etcd:{{ include "dss.url" . }}
- name: GALASA_RESULTARCHIVE_STORE
value: couchdb:http://{{ .Release.Name }}-couchdb:5984
- name: GALASA_AUTH_STORE
value: couchdb:http://{{ .Release.Name }}-couchdb:5984
- name: GALASA_CREDENTIALS_STORE
value: etcd:{{ include "creds.url" . }}
- name: GALASA_RAS_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-couchdb-secret
key: GALASA_RAS_TOKEN
- name: GALASA_AUTHSTORE_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-couchdb-secret
key: GALASA_RAS_TOKEN
{{- if .Values.eventStreamsSecretName }}
- name: GALASA_EVENT_STREAMS_TOKEN
valueFrom:
secretKeyRef:
name: "{{ .Values.eventStreamsSecretName }}"
key: GALASA_EVENT_STREAMS_TOKEN
{{- end }}
- name: GALASA_ENCRYPTION_KEYS_PATH
value: {{ include "ecosystem.encryption.keys.path" . }}
{{- if .Values.certificatesConfigMapName }}
- name: GALASA_CACERTS_FILE_PATH
value: /galasa/certificates/cacerts
- name: JDK_JAVA_OPTIONS
value: -Djavax.net.ssl.trustStore=/galasa/certificates/cacerts
{{- end }}
- name: MAX_GRPC_MESSAGE_SIZE
value: {{ include "max.grpc.message.size" . }}
ports:
- containerPort: 9010
name: metrics
- containerPort: 9011
name: health
livenessProbe:
httpGet:
path: /
port: 9011
initialDelaySeconds: 60
periodSeconds: 60
readinessProbe:
httpGet:
path: /
port: 9011
initialDelaySeconds: 5
periodSeconds: 10
volumeMounts:
- name: encryption-keys
mountPath: {{ include "ecosystem.encryption.keys.directory" . }}
readOnly: true
- name: log4j2-config
mountPath: /log4j2.properties
subPath: log4j2.properties
readOnly: true
{{- if .Values.log4jJsonTemplatesConfigMapName }}
- name: log4j-json-templates
mountPath: /log4j-config
readOnly: true
{{- end }}
{{- if .Values.certificatesConfigMapName }}
- name: galasa-cacerts
mountPath: /galasa/certificates/cacerts
subPath: cacerts
readOnly: true
{{- end }}
volumes:
- name: encryption-keys
secret:
secretName: {{ include "ecosystem.encryption.keys.secret.name" . }}
- name: log4j2-config
configMap:
name: {{ .Release.Name }}-log4j2-config
{{- if .Values.log4jJsonTemplatesConfigMapName }}
- name: log4j-json-templates
configMap:
name: {{ .Values.log4jJsonTemplatesConfigMapName | quote }}
{{- end }}
{{- if .Values.certificatesConfigMapName }}
- name: galasa-cacerts
configMap:
name: {{ .Release.Name }}-cacerts
{{- end }}