deployment.yaml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
  21. volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
  22. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  23. - name: extrappvolume-{{ $index }}
  24. mountPath: {{ $hostPathConfiguration.mountPath }}
  25. {{ end }}
  26. ports:
  27. - name: chia-network
  28. protocol: TCP
  29. containerPort: 8444
  30. hostPort: 8444
  31. {{ $envList := (default list .Values.environmentVariables) }}
  32. {{ $envList = mustAppend $envList (dict "name" "keys" "value" "/plots/keyfile") }}
  33. {{ $envList = mustAppend $envList (dict "name" "farmr" "value" $.Values.farmr_env) }}
  34. {{ include "common.containers.allEnvironmentVariables" (dict "environmentVariables" $envList) | nindent 10 }}
  35. volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
  36. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  37. - name: extrappvolume-{{ $index }}
  38. hostPath:
  39. path: {{ $hostPathConfiguration.hostPath }}
  40. {{ end }}