deployment.yaml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {{- if hasKey . "common" }}
  2. {{- $_ := unset .common "nameSuffix" }}
  3. {{- end }}
  4. apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
  5. kind: Deployment
  6. metadata:
  7. name: {{ template "common.names.fullname" . }}
  8. labels: {{ include "common.labels" . | nindent 4 }}
  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: true
  21. containers:
  22. - name: {{ .Chart.Name }}
  23. {{- include "resourceLimits" . | nindent 10 }}
  24. tty: true
  25. {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
  26. volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
  27. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  28. - name: extrappvolume-{{ $index }}
  29. mountPath: {{ $hostPathConfiguration.mountPath }}
  30. {{ end }}
  31. {{ include "common.containers.configurePorts" .Values | nindent 10 }}
  32. {{ 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 }}
  33. volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
  34. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  35. - name: extrappvolume-{{ $index }}
  36. hostPath:
  37. path: {{ $hostPathConfiguration.hostPath }}
  38. {{ end }}