deployment.yaml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. annotations:
  7. rollme: {{ randAlphaNum 5 | quote }}
  8. spec:
  9. strategy:
  10. type: {{ .Values.updateStrategy }}
  11. selector:
  12. matchLabels: {{ include "common.labels.selectorLabels" . | nindent 6 }}
  13. template:
  14. metadata:
  15. name: {{ template "common.names.fullname" . }}
  16. labels: {{ include "common.labels.selectorLabels" . | nindent 8 }}
  17. spec:
  18. # FIXME: Let's please remove hostnetwork when upstream hostport issue is sorted out with kube-router
  19. hostNetwork: {{ include "hostNetworkingEnabled" . }}
  20. containers:
  21. - name: {{ .Chart.Name }}
  22. {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
  23. volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
  24. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  25. - name: extrappvolume-{{ $index }}
  26. mountPath: {{ $hostPathConfiguration.mountPath }}
  27. {{ end }}
  28. ports:
  29. - name: chia-network
  30. protocol: TCP
  31. containerPort: 8444
  32. hostPort: null
  33. - name: chia-farmer
  34. protocol: TCP
  35. containerPort: 8447
  36. hostPort: null
  37. {{ $envList := (default list .Values.environmentVariables) }}
  38. {{ $envList = mustAppend $envList (dict "name" "keys" "value" "/plots/keyfile") }}
  39. {{ $envList = mustAppend $envList (dict "name" "farmr" "value" $.Values.farmr_env) }}
  40. {{ include "common.containers.allEnvironmentVariables" (dict "environmentVariables" $envList) | nindent 10 }}
  41. volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
  42. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  43. - name: extrappvolume-{{ $index }}
  44. hostPath:
  45. path: {{ $hostPathConfiguration.hostPath }}
  46. {{ end }}