Commit 8f1d1e84 authored by Waqar Ahmed's avatar Waqar Ahmed

Update ipfs deployment to have volume mounts rendered by library chart

parent 502e7001
...@@ -18,67 +18,35 @@ spec: ...@@ -18,67 +18,35 @@ spec:
- name: init-init - name: init-init
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
command: ['/bin/sh', '-c', '[ ! -e /data/ipfs/config ] && (/usr/local/bin/ipfs init ; chown -R 1000:100 /data/ipfs) ; exit 0'] command: ['/bin/sh', '-c', '[ ! -e /data/ipfs/config ] && (/usr/local/bin/ipfs init ; chown -R 1000:100 /data/ipfs) ; exit 0']
volumeMounts: {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }}
- name: data
mountPath: /data/ipfs
- name: staging
mountPath: /export
- name: init-api - name: init-api
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
command: ['/usr/local/bin/ipfs', 'config', 'Addresses.API', "/ip4/0.0.0.0/tcp/{{ .Values.service.apiPort}}"] command: ['/usr/local/bin/ipfs', 'config', 'Addresses.API', "/ip4/0.0.0.0/tcp/{{ .Values.service.apiPort}}"]
volumeMounts: {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }}
- name: data
mountPath: /data/ipfs
- name: staging
mountPath: /export
- name: init-gateway - name: init-gateway
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
command: ['/usr/local/bin/ipfs', 'config', 'Addresses.Gateway', "/ip4/0.0.0.0/tcp/{{ .Values.service.gatewayPort}}"] command: ['/usr/local/bin/ipfs', 'config', 'Addresses.Gateway', "/ip4/0.0.0.0/tcp/{{ .Values.service.gatewayPort}}"]
volumeMounts: {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }}
- name: data
mountPath: /data/ipfs
- name: staging
mountPath: /export
- name: init-swarm - name: init-swarm
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
command: ['/usr/local/bin/ipfs', 'config', '--json', 'Addresses.Swarm', "[\"/ip4/0.0.0.0/tcp/{{ .Values.service.swarmPort}}\",\"/ip4/0.0.0.0/tcp/{{ .Values.service.swarmPort}}/quic\"]" ] command: ['/usr/local/bin/ipfs', 'config', '--json', 'Addresses.Swarm', "[\"/ip4/0.0.0.0/tcp/{{ .Values.service.swarmPort}}\",\"/ip4/0.0.0.0/tcp/{{ .Values.service.swarmPort}}/quic\"]" ]
volumeMounts: {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }}
- name: data
mountPath: /data/ipfs
- name: staging
mountPath: /export
- name: init-access-origin - name: init-access-origin
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
command: ['/usr/local/bin/ipfs', 'config', '--json', 'API.HTTPHeaders.Access-Control-Allow-Origin', "[\"*\"]" ] command: ['/usr/local/bin/ipfs', 'config', '--json', 'API.HTTPHeaders.Access-Control-Allow-Origin', "[\"*\"]" ]
volumeMounts: {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }}
- name: data
mountPath: /data/ipfs
- name: staging
mountPath: /export
- name: init-access-methods - name: init-access-methods
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
command: ['/usr/local/bin/ipfs', 'config', '--json', 'API.HTTPHeaders.Access-Control-Allow-Methods', "[\"PUT\",\"POST\"]" ] command: ['/usr/local/bin/ipfs', 'config', '--json', 'API.HTTPHeaders.Access-Control-Allow-Methods', "[\"PUT\",\"POST\"]" ]
volumeMounts: {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }}
- name: data
mountPath: /data/ipfs
- name: staging
mountPath: /export
- name: init-chown - name: init-chown
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
command: ['chown', '1000:100', '/data/ipfs/config'] command: ['chown', '1000:100', '/data/ipfs/config']
volumeMounts: {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }}
- name: data
mountPath: /data/ipfs
- name: staging
mountPath: /export
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
volumeMounts: {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }}
- name: data
mountPath: /data/ipfs
- name: staging
mountPath: /export
ports: ports:
- name: swarm - name: swarm
containerPort: 9401 containerPort: 9401
...@@ -86,12 +54,5 @@ spec: ...@@ -86,12 +54,5 @@ spec:
containerPort: 9501 containerPort: 9501
- name: gateway - name: gateway
containerPort: 9880 containerPort: 9880
{{- if .Values.environment }} {{ include "common.containers.environmentVariables" (dict "environmentVariables" .Values.environment) | nindent 10 }}
env: {{ include "common.storage.allAppVolumes" .Values | nindent 6 }}
{{ include "common.containers.environmentVariables" (dict "environmentVariables" .Values.environment) | nindent 12 }}
{{- end }}
volumes:
{{ $vols := list }}
{{ $vols = mustAppend $vols (dict "name" "data" "emptyDirVolumes" .Values.emptyDirVolumes "hostPathEnabled" .Values.ipfsDataHostPathEnabled "pathField" .Values.ipfsDataHostPath "datasetName" (.Values.ipfsDataVolume | default dict).datasetName ) }}
{{ $vols = mustAppend $vols (dict "name" "staging" "emptyDirVolumes" .Values.emptyDirVolumes "hostPathEnabled" .Values.ipfsStagingHostPath "pathField" .Values.ipfsStagingHostPath "datasetName" (.Values.ipfsStagingVolume | default dict).datasetName ) }}
{{ include "common.storage.volumesConfiguration" (dict "ixVolumes" .Values.ixVolumes "volumes" $vols) | nindent 8 }}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment