From ca102a0b0b1d2491443638e4b0e3f6339ad2805e Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 17 Feb 2023 19:04:43 -0600 Subject: [PATCH] compatibility patch for csi driver (#4208) * compatibility patch for csi driver * added namespace to all component parameters * added namespace to all component parameters * dereference in range * added namespace to values.yml defaults * added namespace to s3 component --- k8s/helm_charts2/templates/filer-statefulset.yaml | 2 +- k8s/helm_charts2/templates/master-statefulset.yaml | 4 ++-- k8s/helm_charts2/templates/s3-deployment.yaml | 2 +- k8s/helm_charts2/templates/volume-statefulset.yaml | 4 ++-- k8s/helm_charts2/values.yaml | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/k8s/helm_charts2/templates/filer-statefulset.yaml b/k8s/helm_charts2/templates/filer-statefulset.yaml index ad1325609..4b616fde1 100644 --- a/k8s/helm_charts2/templates/filer-statefulset.yaml +++ b/k8s/helm_charts2/templates/filer-statefulset.yaml @@ -162,7 +162,7 @@ spec: -s3.auditLogConfig=/etc/sw/filer_s3_auditLogConfig.json \ {{- end }} {{- end }} - -master={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }} + -master={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master.{{ $.Release.Namespace }}:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }} volumeMounts: - name: seaweedfs-filer-log-volume mountPath: "/logs/" diff --git a/k8s/helm_charts2/templates/master-statefulset.yaml b/k8s/helm_charts2/templates/master-statefulset.yaml index 1584387fd..91a4eba67 100644 --- a/k8s/helm_charts2/templates/master-statefulset.yaml +++ b/k8s/helm_charts2/templates/master-statefulset.yaml @@ -133,8 +133,8 @@ spec: {{- if .Values.master.garbageThreshold }} -garbageThreshold={{ .Values.master.garbageThreshold }} \ {{- end }} - -ip=${POD_NAME}.${SEAWEEDFS_FULLNAME}-master \ - -peers={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }} + -ip=${POD_NAME}.${SEAWEEDFS_FULLNAME}-master.{{ .Release.Namespace }} \ + -peers={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master.{{ .Release.Namespace }}:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }} volumeMounts: - name : data-{{ .Release.Namespace }} mountPath: /data diff --git a/k8s/helm_charts2/templates/s3-deployment.yaml b/k8s/helm_charts2/templates/s3-deployment.yaml index a13c0790a..d4541a632 100644 --- a/k8s/helm_charts2/templates/s3-deployment.yaml +++ b/k8s/helm_charts2/templates/s3-deployment.yaml @@ -105,7 +105,7 @@ spec: {{- if .Values.s3.auditLogConfig }} -auditLogConfig=/etc/sw/s3_auditLogConfig.json \ {{- end }} - -filer={{ template "seaweedfs.name" . }}-filer-client:{{ .Values.filer.port }} + -filer={{ template "seaweedfs.name" . }}-filer-client.{{ .Release.Namespace }}:{{ .Values.filer.port }} volumeMounts: - name: logs mountPath: "/logs/" diff --git a/k8s/helm_charts2/templates/volume-statefulset.yaml b/k8s/helm_charts2/templates/volume-statefulset.yaml index 86592252f..41946e2b3 100644 --- a/k8s/helm_charts2/templates/volume-statefulset.yaml +++ b/k8s/helm_charts2/templates/volume-statefulset.yaml @@ -138,9 +138,9 @@ spec: -fileSizeLimitMB={{ .Values.volume.fileSizeLimitMB }} \ {{- end }} -minFreeSpacePercent={{ .Values.volume.minFreeSpacePercent }} \ - -ip=${POD_NAME}.${SEAWEEDFS_FULLNAME}-volume \ + -ip=${POD_NAME}.${SEAWEEDFS_FULLNAME}-volume.{{ .Release.Namespace }} \ -compactionMBps={{ .Values.volume.compactionMBps }} \ - -mserver={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }} + -mserver={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master.{{ $.Release.Namespace }}:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }} volumeMounts: - name: data mountPath: "{{ .Values.volume.dir }}/" diff --git a/k8s/helm_charts2/values.yaml b/k8s/helm_charts2/values.yaml index 21d031eb5..d14058a81 100644 --- a/k8s/helm_charts2/values.yaml +++ b/k8s/helm_charts2/values.yaml @@ -22,8 +22,8 @@ global: replicationPlacment: "001" extraEnvironmentVars: WEED_CLUSTER_DEFAULT: "sw" - WEED_CLUSTER_SW_MASTER: "seaweedfs-master:9333" - WEED_CLUSTER_SW_FILER: "seaweedfs-filer-client:8888" + WEED_CLUSTER_SW_MASTER: "seaweedfs-master.seaweedfs:9333" + WEED_CLUSTER_SW_FILER: "seaweedfs-filer-client.seaweedfs:8888" image: registry: ""