first commit
This commit is contained in:
78
templates/fusion-operator/deployment.yaml
Normal file
78
templates/fusion-operator/deployment.yaml
Normal file
@@ -0,0 +1,78 @@
|
||||
{{- if and .Values.fusionOperator.enabled (eq (include "parent.dataplaneMode" . ) "shared") }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "fusionOperator.appName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "fusionOperator.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.fusionOperator.autoscaling.enabled }}
|
||||
replicas: {{ .Values.fusionOperator.replicaCount }}
|
||||
{{- end }}
|
||||
strategy:
|
||||
type: {{ .Values.fusionOperator.strategy.type }}
|
||||
rollingUpdate:
|
||||
maxSurge: {{ .Values.fusionOperator.strategy.rollingUpdate.maxSurge }}
|
||||
maxUnavailable: {{ .Values.fusionOperator.strategy.rollingUpdate.maxUnavailable }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "fusionOperator.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "fusionOperator.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- if .Values.fusionOperator.serviceAccount.enabled }}
|
||||
serviceAccountName: {{ include "fusionOperator.serviceAccountName" . }}
|
||||
{{- end }}
|
||||
{{- with .Values.global.image.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.fusionOperator.podSecurityContextEnabled }}
|
||||
securityContext:
|
||||
{{ toYaml .Values.fusionOperator.podSecurityContext | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.fluentBit.enabled }}
|
||||
{{- include "dataplane.createLogDirectoryInitContainer" (dict "serviceName" "fusion-operator" "securityContext" .Values.fusionOperator.securityContext "additionalPathParam" "" "root" .) | nindent 6 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "fusionOperator.appName" . }}
|
||||
{{- if .Values.fusionOperator.leaderElection.enabled }}
|
||||
command:
|
||||
- /manager
|
||||
args:
|
||||
- --leader-elect
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.fusionOperator.securityContext | nindent 12 }}
|
||||
image: "{{ default .Values.global.image.repository .Values.fusionOperator.image.repository }}/{{ .Values.fusionOperator.image.name }}:{{ .Values.fusionOperator.image.buildTag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
{{- with .Values.fusionOperator.env }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: configmap-common
|
||||
- configMapRef:
|
||||
name: {{ template "fusionOperator.appName" . }}
|
||||
resources:
|
||||
{{- toYaml .Values.fusionOperator.resources | nindent 12 }}
|
||||
livenessProbe: {{- toYaml .Values.fusionOperator.livenessProbe | nindent 12 }}
|
||||
startupProbe: {{- toYaml .Values.fusionOperator.startupProbe | nindent 12 }}
|
||||
readinessProbe: {{- toYaml .Values.fusionOperator.readinessProbe | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: {{ .Values.global.volumeStorageName }}
|
||||
mountPath: /efs
|
||||
volumes:
|
||||
- name: {{ .Values.global.volumeStorageName }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Release.Namespace }}-{{ .Values.global.claimName }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user