deployment.yaml 2.1 KB

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