fix helm install error for No such file or directory (#5250)
* weed/shell: Cluster check other disk types (#5245) * week/shell: Cluster check other disk types The `cluster.check` command only took the empty (`""`) and `hdd` disk types into consideration, but a cluster with only `ssd` or `nvme` disk types would be equally valid. This commit simply checks that _any_ disk type is defined, and that some volumes are available for it. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> * weed/shell: Replace loop that copies slice Use the following construct instead of a `for` loop: ```golang x = append(x, y...) ``` See https://staticcheck.dev/docs/checks#S1011. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> * weed/shell: Check disk types when filer is in use Filer stores its metadata logs in generic (i.e. `""`) or HDD disk type volumes, so make sure those disk types exist and have volumes associated with them when Filer is deployed in the cluster. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> --------- Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> * weed/shell: Cluster check other disk types (#5245) * week/shell: Cluster check other disk types The `cluster.check` command only took the empty (`""`) and `hdd` disk types into consideration, but a cluster with only `ssd` or `nvme` disk types would be equally valid. This commit simply checks that _any_ disk type is defined, and that some volumes are available for it. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> * weed/shell: Replace loop that copies slice Use the following construct instead of a `for` loop: ```golang x = append(x, y...) ``` See https://staticcheck.dev/docs/checks#S1011. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> * weed/shell: Check disk types when filer is in use Filer stores its metadata logs in generic (i.e. `""`) or HDD disk type volumes, so make sure those disk types exist and have volumes associated with them when Filer is deployed in the cluster. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> --------- Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> * fix helm install error for No such file or directory --------- Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> Co-authored-by: Benoît Knecht <bknecht@protonmail.ch>
This commit is contained in:
@@ -59,11 +59,11 @@ spec:
|
|||||||
image: {{ template "volume.image" . }}
|
image: {{ template "volume.image" . }}
|
||||||
imagePullPolicy: {{ .Values.global.imagePullPolicy | default "IfNotPresent" }}
|
imagePullPolicy: {{ .Values.global.imagePullPolicy | default "IfNotPresent" }}
|
||||||
command: [ '/bin/sh', '-c' ]
|
command: [ '/bin/sh', '-c' ]
|
||||||
args: [ 'ls {{range $dir := .Values.volume.dataDirs }}/{{$dir.name}}/*.idx {{end}} && xargs -I {} mv {} /idx/' ]
|
args: [ '{{range $dir := .Values.volume.dataDirs }}if ls /{{$dir.name}}/*.idx >/dev/null 2>&1; then mv /{{$dir.name}}/*.idx /idx/ ; fi; {{end}}' ]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: idx
|
- name: idx
|
||||||
mountPath: /idx
|
mountPath: /idx
|
||||||
{{- range $dir := .Values.volume.dataDirs }}
|
{{- range $dir := .Values.volume.dataDirs }}
|
||||||
- name: {{ $dir.name }}
|
- name: {{ $dir.name }}
|
||||||
mountPath: /{{ $dir.name }}
|
mountPath: /{{ $dir.name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -237,7 +237,7 @@ spec:
|
|||||||
{{- if eq $dir.type "existingClaim" }}
|
{{- if eq $dir.type "existingClaim" }}
|
||||||
- name: {{ $dir.name }}
|
- name: {{ $dir.name }}
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ $dir.claimName }}
|
claimName: {{ $dir.claimName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -252,7 +252,7 @@ spec:
|
|||||||
{{- if eq .Values.volume.idx.type "existingClaim" }}
|
{{- if eq .Values.volume.idx.type "existingClaim" }}
|
||||||
- name: idx
|
- name: idx
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ .Values.volume.idx.claimName }}
|
claimName: {{ .Values.volume.idx.claimName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ spec:
|
|||||||
{{- if eq .Values.volume.logs.type "existingClaim" }}
|
{{- if eq .Values.volume.logs.type "existingClaim" }}
|
||||||
- name: logs
|
- name: logs
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ .Values.volume.logs.claimName }}
|
claimName: {{ .Values.volume.logs.claimName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.global.enableSecurity }}
|
{{- if .Values.global.enableSecurity }}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ master:
|
|||||||
size: ""
|
size: ""
|
||||||
storageClass: ""
|
storageClass: ""
|
||||||
hostPathPrefix: /storage
|
hostPathPrefix: /storage
|
||||||
|
|
||||||
## @param master.sidecars Add additional sidecar containers to the master pod(s)
|
## @param master.sidecars Add additional sidecar containers to the master pod(s)
|
||||||
## e.g:
|
## e.g:
|
||||||
## sidecars:
|
## sidecars:
|
||||||
@@ -256,16 +256,16 @@ volume:
|
|||||||
# maxVolumes: 0 # If set to zero on non-windows OS, the limit will be auto configured. (default "7")
|
# maxVolumes: 0 # If set to zero on non-windows OS, the limit will be auto configured. (default "7")
|
||||||
|
|
||||||
dataDirs:
|
dataDirs:
|
||||||
- name: data1
|
- name: data1
|
||||||
type: "hostPath"
|
type: "hostPath"
|
||||||
hostPathPrefix: /ssd
|
hostPathPrefix: /ssd
|
||||||
maxVolumes: 0
|
maxVolumes: 0
|
||||||
|
|
||||||
#- name: data2
|
# - name: data2
|
||||||
# type: "persistentVolumeClaim"
|
# type: "persistentVolumeClaim"
|
||||||
# storageClass: "yourClassNameOfChoice"
|
# storageClass: "yourClassNameOfChoice"
|
||||||
# size: "800Gi"
|
# size: "800Gi"
|
||||||
# maxVolumes: 0
|
# maxVolumes: 0
|
||||||
|
|
||||||
# idx can be defined by:
|
# idx can be defined by:
|
||||||
#
|
#
|
||||||
@@ -310,7 +310,7 @@ volume:
|
|||||||
|
|
||||||
# Adjust jpg orientation when uploading.
|
# Adjust jpg orientation when uploading.
|
||||||
imagesFixOrientation: false
|
imagesFixOrientation: false
|
||||||
|
|
||||||
## @param volume.sidecars Add additional sidecar containers to the volume pod(s)
|
## @param volume.sidecars Add additional sidecar containers to the volume pod(s)
|
||||||
## e.g:
|
## e.g:
|
||||||
## sidecars:
|
## sidecars:
|
||||||
@@ -464,7 +464,7 @@ filer:
|
|||||||
size: ""
|
size: ""
|
||||||
storageClass: ""
|
storageClass: ""
|
||||||
hostPathPrefix: /storage
|
hostPathPrefix: /storage
|
||||||
|
|
||||||
## @param filer.sidecars Add additional sidecar containers to the filer pod(s)
|
## @param filer.sidecars Add additional sidecar containers to the filer pod(s)
|
||||||
## e.g:
|
## e.g:
|
||||||
## sidecars:
|
## sidecars:
|
||||||
@@ -657,7 +657,7 @@ s3:
|
|||||||
|
|
||||||
# Suffix of the host name, {bucket}.{domainName}
|
# Suffix of the host name, {bucket}.{domainName}
|
||||||
domainName: ""
|
domainName: ""
|
||||||
|
|
||||||
## @param s3.sidecars Add additional sidecar containers to the s3 pod(s)
|
## @param s3.sidecars Add additional sidecar containers to the s3 pod(s)
|
||||||
## e.g:
|
## e.g:
|
||||||
## sidecars:
|
## sidecars:
|
||||||
|
|||||||
Reference in New Issue
Block a user