-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathdeployment.yaml
More file actions
70 lines (70 loc) · 2.97 KB
/
deployment.yaml
File metadata and controls
70 lines (70 loc) · 2.97 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
apiVersion: apps/v1
kind: Deployment
metadata:
{{- if or (.Values.plugin.features.acm.enabled) (.Values.plugin.features.incidents.enabled) }}
name: {{ .Values.plugin.features.name }}
{{- else }}
name: {{ template "openshift-console-plugin.name" . }}
{{- end }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "openshift-console-plugin.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.plugin.replicas }}
selector:
matchLabels:
{{- include "openshift-console-plugin.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "openshift-console-plugin.labels" . | nindent 8 }}
spec:
serviceAccountName: {{ include "openshift-console-plugin.serviceAccountName" . }}
containers:
{{- if or (.Values.plugin.features.acm.enabled) (.Values.plugin.features.incidents.enabled) }}
- name: {{ .Values.plugin.features.name }}
{{- else }}
- name: {{ template "openshift-console-plugin.name" . }}
{{- end }}
image: {{ required "Plugin image must be specified!" .Values.plugin.image }}
ports:
- containerPort: {{ .Values.plugin.port }}
protocol: TCP
imagePullPolicy: Always
{{- if and (.Values.plugin.securityContext.enabled) (.Values.plugin.containerSecurityContext) }}
securityContext: {{ tpl (toYaml (omit .Values.plugin.containerSecurityContext "enabled")) $ | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.plugin.resources | nindent 12 }}
volumeMounts:
- name: {{ template "openshift-console-plugin.certificateSecret" . }}
readOnly: true
mountPath: /var/cert
args:
- '-config-path=/opt/app-root/config'
- '-static-path=/opt/app-root/web/dist'
- '-cert=/var/cert/tls.crt'
- '-key=/var/cert/tls.key'
- '-log-level=info'
{{- if or (.Values.plugin.features.acm.enabled) (.Values.plugin.features.incidents.enabled) }}
- '-features={{ template "openshift-console-plugin.features" . }}'
{{- end }}
{{- if and (.Values.plugin.features.acm.enabled) }}
- '-alertmanager={{ .Values.plugin.features.acm.alertmanager.url }}'
- '-thanos-querier={{ .Values.plugin.features.acm.thanos.url }}'
{{- end }}
volumes:
- name: {{ template "openshift-console-plugin.certificateSecret" . }}
secret:
secretName: {{ template "openshift-console-plugin.certificateSecret" . }}
defaultMode: 420
restartPolicy: Always
dnsPolicy: ClusterFirst
{{- if and (.Values.plugin.securityContext.enabled) (.Values.plugin.podSecurityContext) }}
securityContext: {{ tpl (toYaml (omit .Values.plugin.podSecurityContext "enabled")) $ | nindent 8 }}
{{- end }}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%