deployment.yaml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {{- if .Values.spark.install.enabled }}
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: {{ .Release.Name }}-spark
  6. labels:
  7. tier: aihub-dag
  8. component: spark
  9. release: {{ .Release.Name }}
  10. spec:
  11. selector:
  12. matchLabels:
  13. tier: aihub-dag
  14. component: spark
  15. release: {{ .Release.Name }}
  16. template:
  17. metadata:
  18. {{- with .Values.spark.podAnnotations }}
  19. annotations:
  20. {{- toYaml . | nindent 8 }}
  21. {{- end }}
  22. labels:
  23. tier: aihub-dag
  24. component: spark
  25. release: {{ .Release.Name }}
  26. date: "{{ now | unixEpoch }}"
  27. spec:
  28. {{- with .Values.spark.imagePullSecrets }}
  29. imagePullSecrets:
  30. {{- toYaml . | nindent 8 }}
  31. {{- end }}
  32. securityContext:
  33. {{- toYaml .Values.spark.podSecurityContext | nindent 8 }}
  34. containers:
  35. - name: {{ .Release.Name }}-spark
  36. securityContext:
  37. {{- toYaml .Values.securityContext | nindent 12 }}
  38. image: "{{ .Values.spark.image.repository }}:{{ .Values.spark.image.tag | default .Chart.AppVersion }}"
  39. imagePullPolicy: {{ .Values.spark.image.pullPolicy }}
  40. ports:
  41. - name: http
  42. containerPort: 22
  43. protocol: TCP
  44. resources:
  45. {{- toYaml .Values.spark.resources | nindent 12 }}
  46. # livenessProbe:
  47. # httpGet:
  48. # path: /
  49. # port: http
  50. # readinessProbe:
  51. # httpGet:
  52. # path: /
  53. # port: http
  54. {{- with .Values.spark.nodeSelector }}
  55. nodeSelector:
  56. {{- toYaml . | nindent 8 }}
  57. {{- end }}
  58. {{- with .Values.spark.affinity }}
  59. affinity:
  60. {{- toYaml . | nindent 8 }}
  61. {{- end }}
  62. {{- with .Values.spark.tolerations }}
  63. tolerations:
  64. {{- toYaml . | nindent 8 }}
  65. {{- end }}
  66. {{- end }}