| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- {{- $ref := . }}
- {{- range $coinName := $ref.Values.coins }}
- {{- $coinEnabled := get $ref.Values (printf "%vEnabled" $coinName) }}
- {{- if $coinEnabled }}
- {{- $coin := get $ref.Values $coinName }}
- {{- $_ := set $ref "common" (dict "nameSuffix" $coinName) }}
- {{- $_ := set $coin.volumeMounts "plots" $ref.Values.appVolumeMounts.plots }}
- {{- $_ := set $coin.volumeMounts "plotting" $ref.Values.appVolumeMounts.plotting }}
- apiVersion: {{ template "common.capabilities.deployment.apiVersion" $ref }}
- kind: Deployment
- metadata:
- name: {{ template "common.names.fullname" $ref }}
- labels: {{ include "common.labels" $ref | nindent 4 }}
- spec:
- strategy:
- type: {{ $ref.Values.updateStrategy }}
- selector:
- matchLabels: {{ include "common.labels.selectorLabels" $ref | nindent 6 }}
- template:
- metadata:
- name: {{ template "common.names.fullname" $ref }}
- labels: {{ include "common.labels.selectorLabels" $ref | nindent 8 }}
- spec:
- hostNetwork: true
- {{- include "initContainers" (dict "nodeIP" $ref.Values.nodeIP "apiPort" $ref.Values.machinarisApiPort "coinName" $coinName ) | nindent 6 }}
- containers:
- - name: {{ $ref.Chart.Name }}
- {{- include "resourceLimits" $ref | nindent 10 }}
- tty: true
- {{ include "common.containers.imageConfig" (dict "repository" $ref.Values.image.repository "tag" $ref.Values.image.tag "pullPolicy" $ref.Values.image.pullPolicy "postfix" $ref.common.nameSuffix) | nindent 10 }}
- {{ include "common.containers.configurePorts" $coin | nindent 10 }}
- volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" (dict "appVolumeMounts" $coin.volumeMounts "ixVolumes" $ref.Values.ixVolumes) | nindent 12 }}
- {{ range $index, $hostPathConfiguration := $ref.Values.extraAppVolumeMounts }}
- - name: extrappvolume-{{ $index }}
- mountPath: {{ $hostPathConfiguration.mountPath }}
- {{ end }}
- {{ include "allEnvironmentVariables" (dict "defaultEnv" (dict "TZ" $ref.Values.timezone "worker_address" $ref.Values.nodeIP "worker_api_port" $coin.apiPort "controller_host" $ref.Values.nodeIP "controller_api_port" $ref.Values.apiPort "farmer_port" $coin.farmerPort "blockchains" $coinName "plots_dir" $ref.Values.appVolumeMounts.plots.mountPath "mode" "fullnode") "environmentVariables" $coin.environmentVariables) | nindent 10 }}
- volumes: {{ include "common.storage.configureAppVolumes" (dict "appVolumeMounts" $coin.volumeMounts "ixVolumes" $ref.Values.ixVolumes) | nindent 8 }}
- {{ range $index, $hostPathConfiguration := $ref.Values.extraAppVolumeMounts }}
- - name: extrappvolume-{{ $coinName }}-{{ $index }}
- hostPath:
- path: {{ $hostPathConfiguration.hostPath }}
- {{ end }}
- ---
- {{- end }}
- {{- end }}
|