deployment.yaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {{ include "common.storage.hostPathValidate" .Values }}
  2. {{- if hasKey . "common" }}
  3. {{- $_ := unset .common "nameSuffix" }}
  4. {{- end }}
  5. apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
  6. kind: Deployment
  7. metadata:
  8. name: {{ template "common.names.fullname" . }}
  9. labels: {{ include "common.labels" . | nindent 4 }}
  10. spec:
  11. strategy:
  12. type: {{ .Values.updateStrategy }}
  13. selector:
  14. matchLabels: {{ include "common.labels.selectorLabels" . | nindent 6 }}
  15. template:
  16. metadata:
  17. name: {{ template "common.names.fullname" . }}
  18. labels: {{ include "common.labels.selectorLabels" . | nindent 8 }}
  19. spec:
  20. # FIXME: Let's please remove hostnetwork when upstream hostport issue is sorted out with kube-router
  21. hostNetwork: true
  22. containers:
  23. - name: {{ .Chart.Name }}
  24. {{- include "resourceLimits" . | nindent 10 }}
  25. tty: true
  26. {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
  27. volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
  28. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  29. - name: extrappvolume-{{ $index }}
  30. mountPath: {{ $hostPathConfiguration.mountPath }}
  31. {{ end }}
  32. {{ include "common.containers.configurePorts" .Values | nindent 10 }}
  33. {{ include "allEnvironmentVariables" (dict "defaultEnv" (dict "TZ" .Values.timezone "worker_address" .Values.nodeIP "worker_api_port" .Values.apiPort "controller_api_port" .Values.apiPort "farmer_port" .Values.farmerPort "blockchains" "chia" "plots_dir" .Values.appVolumeMounts.plots.mountPath "mode" "fullnode") "environmentVariables" .Values.environmentVariables) | nindent 10 }}
  34. volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
  35. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  36. - name: extrappvolume-{{ $index }}
  37. hostPath:
  38. path: {{ $hostPathConfiguration.hostPath }}
  39. {{ end }}