Browse Source

helm: address gemini-code-assist review comments

- Make PVC accessModes configurable to support ReadWriteMany for
  multi-replica deployments (defaults to ReadWriteOnce)
- Use configured readiness probe paths in post-install bucket hook
  instead of hardcoded paths, respecting custom configurations
pull/7639/head
chrislu 6 days ago
parent
commit
73cb289c21
  1. 2
      k8s/charts/seaweedfs/templates/all-in-one/all-in-one-pvc.yaml
  2. 9
      k8s/charts/seaweedfs/templates/shared/post-install-bucket-hook.yaml
  3. 3
      k8s/charts/seaweedfs/values.yaml

2
k8s/charts/seaweedfs/templates/all-in-one/all-in-one-pvc.yaml

@ -17,7 +17,7 @@ metadata:
{{- end }}
spec:
accessModes:
- ReadWriteOnce
{{- toYaml (.Values.allInOne.data.accessModes | default (list "ReadWriteOnce")) | nindent 4 }}
{{- if .Values.allInOne.data.storageClass }}
storageClassName: {{ .Values.allInOne.data.storageClass }}
{{- end }}

9
k8s/charts/seaweedfs/templates/shared/post-install-bucket-hook.yaml

@ -97,8 +97,13 @@ spec:
echo "Service at $url failed to become ready within 5 minutes"
exit 1
}
wait_for_service "http://$WEED_CLUSTER_SW_MASTER/cluster/status"
wait_for_service "http://$WEED_CLUSTER_SW_FILER/"
{{- if .Values.allInOne.enabled }}
wait_for_service "http://$WEED_CLUSTER_SW_MASTER{{ .Values.allInOne.readinessProbe.httpGet.path }}"
wait_for_service "http://$WEED_CLUSTER_SW_FILER{{ .Values.filer.readinessProbe.httpGet.path }}"
{{- else }}
wait_for_service "http://$WEED_CLUSTER_SW_MASTER{{ .Values.master.readinessProbe.httpGet.path }}"
wait_for_service "http://$WEED_CLUSTER_SW_FILER{{ .Values.filer.readinessProbe.httpGet.path }}"
{{- end }}
{{- range $createBuckets }}
exec /bin/echo \
"s3.bucket.create --name {{ .name }}" |\

3
k8s/charts/seaweedfs/values.yaml

@ -1176,6 +1176,9 @@ allInOne:
claimName: seaweedfs-data-pvc # Name of the PVC to use (for existingClaim type)
size: "" # Size of the PVC (for persistentVolumeClaim type)
storageClass: "" # Storage class for the PVC
# accessModes for the PVC. Default is ["ReadWriteOnce"].
# For multi-replica deployments, use ["ReadWriteMany"] with a compatible storage class.
accessModes: []
annotations: {} # Annotations for the PVC
# Health checks

Loading…
Cancel
Save