{{- if .Values.spark.install.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Release.Name }}-spark labels: tier: aihub-dag component: spark release: {{ .Release.Name }} spec: selector: matchLabels: tier: aihub-dag component: spark release: {{ .Release.Name }} template: metadata: {{- with .Values.spark.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: tier: aihub-dag component: spark release: {{ .Release.Name }} date: "{{ now | unixEpoch }}" spec: {{- with .Values.spark.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.spark.podSecurityContext | nindent 8 }} containers: - name: {{ .Release.Name }}-spark securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.spark.image.repository }}:{{ .Values.spark.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.spark.image.pullPolicy }} ports: - name: http containerPort: 22 protocol: TCP resources: {{- toYaml .Values.spark.resources | nindent 12 }} # livenessProbe: # httpGet: # path: / # port: http # readinessProbe: # httpGet: # path: / # port: http {{- with .Values.spark.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.spark.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.spark.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- end }}