deployment.yaml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
  2. kind: Deployment
  3. metadata:
  4. name: {{ template "common.names.fullname" . }}
  5. labels: {{ include "common.labels" . | nindent 4 }}
  6. spec:
  7. strategy:
  8. type: {{ .Values.updateStrategy }}
  9. selector:
  10. matchLabels: {{ include "common.labels.selectorLabels" . | nindent 6 }}
  11. template:
  12. metadata:
  13. name: {{ template "common.names.fullname" . }}
  14. labels: {{ include "common.labels.selectorLabels" . | nindent 8 }}
  15. spec:
  16. # FIXME: Let's please remove hostnetwork when upstream hostport issue is sorted out with kube-router
  17. hostNetwork: true
  18. containers:
  19. - name: {{ .Chart.Name }}
  20. {{ if .Values.enableResourceLimits }}
  21. resources:
  22. limits:
  23. cpu: {{ .Values.cpuLimit }}
  24. memory: {{ .Values.memLimit }}
  25. {{ end }}
  26. tty: true
  27. {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
  28. volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
  29. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  30. - name: extrappvolume-{{ $index }}
  31. mountPath: {{ $hostPathConfiguration.mountPath }}
  32. {{ end }}
  33. ports:
  34. - name: chia-network
  35. protocol: TCP
  36. containerPort: 8444
  37. hostPort: 8444
  38. - name: machinaris-ui
  39. protocol: TCP
  40. containerPort: 8926
  41. - name: machinaris-api
  42. protocol: TCP
  43. containerPort: 8927
  44. hostPort: 8927
  45. {{ $envList := (default list .Values.environmentVariables) }}
  46. {{ $envList = mustAppend $envList (dict "name" "TZ" "value" $.Values.timezone) }}
  47. {{ $envList = mustAppend $envList (dict "name" "worker_address" "value" $.Values.nodeIP) }}
  48. {{ include "common.containers.allEnvironmentVariables" (dict "environmentVariables" $envList) | nindent 10 }}
  49. volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
  50. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  51. - name: extrappvolume-{{ $index }}
  52. hostPath:
  53. path: {{ $hostPathConfiguration.hostPath }}
  54. {{ end }}