deployment.yaml 2.2 KB

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