diff options
| author | Alexandre Viau <alexandre@alexandreviau.net> | 2023-08-28 23:44:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-28 20:44:09 -0700 |
| commit | 271c51f273f368c01ef2ed14bc2d8966e63cccdb (patch) | |
| tree | d0b7de371ca96c250cc094f09e55e3f076bdeb9e /k8s | |
| parent | 03389bf8441d6130bc36b4a1732e5dc12fb8fd2e (diff) | |
| download | seaweedfs-271c51f273f368c01ef2ed14bc2d8966e63cccdb.tar.xz seaweedfs-271c51f273f368c01ef2ed14bc2d8966e63cccdb.zip | |
helm: allow setting master.toml config (#4797)
Diffstat (limited to 'k8s')
| -rw-r--r-- | k8s/charts/seaweedfs/templates/master-configmap.yaml | 15 | ||||
| -rw-r--r-- | k8s/charts/seaweedfs/templates/master-statefulset.yaml | 7 | ||||
| -rw-r--r-- | k8s/charts/seaweedfs/values.yaml | 4 |
3 files changed, 26 insertions, 0 deletions
diff --git a/k8s/charts/seaweedfs/templates/master-configmap.yaml b/k8s/charts/seaweedfs/templates/master-configmap.yaml new file mode 100644 index 000000000..73155e87d --- /dev/null +++ b/k8s/charts/seaweedfs/templates/master-configmap.yaml @@ -0,0 +1,15 @@ +{{- if .Values.master.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "seaweedfs.name" . }}-master-config + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: {{ template "seaweedfs.name" . }} + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} +data: + master.toml: |- + {{ .Values.master.config | nindent 4 }} +{{- end }} diff --git a/k8s/charts/seaweedfs/templates/master-statefulset.yaml b/k8s/charts/seaweedfs/templates/master-statefulset.yaml index e8563ff9b..ba4b54c27 100644 --- a/k8s/charts/seaweedfs/templates/master-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/master-statefulset.yaml @@ -142,6 +142,10 @@ spec: - name: seaweedfs-master-log-volume mountPath: "/logs/" {{- end }} + - name: master-config + readOnly: true + mountPath: /etc/seaweedfs/master.toml + subPath: master.toml {{- if .Values.global.enableSecurity }} - name: security-config readOnly: true @@ -212,6 +216,9 @@ spec: path: {{ .Values.master.data.hostPathPrefix }}/seaweed-master/ type: DirectoryOrCreate {{- end }} + - name: master-config + configMap: + name: {{ template "seaweedfs.name" . }}-master-config {{- if .Values.global.enableSecurity }} - name: security-config configMap: diff --git a/k8s/charts/seaweedfs/values.yaml b/k8s/charts/seaweedfs/values.yaml index 1f24d221c..af73cda93 100644 --- a/k8s/charts/seaweedfs/values.yaml +++ b/k8s/charts/seaweedfs/values.yaml @@ -62,6 +62,10 @@ master: # Disable http request, only gRpc operations are allowed disableHttp: false + config: |- + # Enter any extra configuration for master.toml here. + # It may be be a multi-line string. + # can use ANY storage-class , example with local-path-provisioner # data: # type: "persistentVolumeClaim" |
