75 lines
2.5 KiB
YAML
75 lines
2.5 KiB
YAML
{{- if eq (include "k10.isOpenShift" .) "true" -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "k10.openShiftConsolePluginName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{ include "helm.labels" . | indent 4 }}
|
|
component: {{ template "k10.openShiftConsolePluginName" . }}
|
|
app.openshift.io/runtime-namespace: {{ .Release.Namespace }}
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
{{ include "k10.common.matchLabels" . | indent 6 }}
|
|
component: {{ template "k10.openShiftConsolePluginName" . }}
|
|
template:
|
|
metadata:
|
|
{{- if .Values.scc.create }}
|
|
annotations:
|
|
openshift.io/required-scc: {{ .Release.Name }}-scc
|
|
{{- end }}
|
|
labels:
|
|
{{ include "k10.common.matchLabels" . | indent 8 }}
|
|
component: {{ template "k10.openShiftConsolePluginName" . }}
|
|
spec:
|
|
containers:
|
|
- name: {{ template "k10.openShiftConsolePluginName" . }}
|
|
image: {{ include "k10.ocpConsolePluginImage" . }}
|
|
ports:
|
|
- containerPort: 9443
|
|
protocol: TCP
|
|
imagePullPolicy: Always
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: false
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
resources:
|
|
requests:
|
|
cpu: 10m
|
|
memory: 50Mi
|
|
volumeMounts:
|
|
- name: {{ template "k10.openShiftConsolePluginTLSCertName" . }}
|
|
readOnly: true
|
|
mountPath: /var/cert
|
|
- name: {{ template "k10.openShiftConsolePluginConfigMapName" . }}
|
|
readOnly: true
|
|
mountPath: /etc/nginx/nginx.conf
|
|
subPath: nginx.conf
|
|
volumes:
|
|
- name: {{ template "k10.openShiftConsolePluginTLSCertName" . }}
|
|
secret:
|
|
secretName: {{ template "k10.openShiftConsolePluginTLSCertName" . }}
|
|
defaultMode: 420
|
|
- name: {{ template "k10.openShiftConsolePluginConfigMapName" . }}
|
|
configMap:
|
|
name: {{ template "k10.openShiftConsolePluginConfigMapName" . }}
|
|
defaultMode: 420
|
|
restartPolicy: Always
|
|
dnsPolicy: ClusterFirst
|
|
securityContext:
|
|
fsGroup: 1000
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
serviceAccountName: {{ template "serviceAccountName" . }}
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxUnavailable: 25%
|
|
maxSurge: 25%
|
|
{{- end -}}
|