diff --git a/k8s/charts/seaweedfs/templates/filer-service-client.yaml b/k8s/charts/seaweedfs/templates/filer-service-client.yaml index 41251c897..d7618c4cb 100644 --- a/k8s/charts/seaweedfs/templates/filer-service-client.yaml +++ b/k8s/charts/seaweedfs/templates/filer-service-client.yaml @@ -1,3 +1,4 @@ +{{- if .Values.filer.enabled }} apiVersion: v1 kind: Service metadata: @@ -32,3 +33,4 @@ spec: selector: app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/component: filer +{{- end }} diff --git a/k8s/charts/seaweedfs/templates/filer-service.yaml b/k8s/charts/seaweedfs/templates/filer-service.yaml index 352a20676..ab7e98df8 100644 --- a/k8s/charts/seaweedfs/templates/filer-service.yaml +++ b/k8s/charts/seaweedfs/templates/filer-service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.filer.enabled }} apiVersion: v1 kind: Service metadata: @@ -44,3 +45,4 @@ spec: selector: app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/component: filer +{{- end }} diff --git a/k8s/charts/seaweedfs/templates/filer-servicemonitor.yaml b/k8s/charts/seaweedfs/templates/filer-servicemonitor.yaml index 8035d7ffb..d0aa6c8b8 100644 --- a/k8s/charts/seaweedfs/templates/filer-servicemonitor.yaml +++ b/k8s/charts/seaweedfs/templates/filer-servicemonitor.yaml @@ -1,3 +1,4 @@ +{{- if .Values.filer.enabled }} {{- if .Values.filer.metricsPort }} {{- if .Values.global.monitoring.enabled }} apiVersion: monitoring.coreos.com/v1 @@ -21,4 +22,5 @@ spec: app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/component: filer {{- end }} -{{- end }} \ No newline at end of file +{{- end }} +{{- end }} diff --git a/k8s/charts/seaweedfs/templates/filler-ingress.yaml b/k8s/charts/seaweedfs/templates/filler-ingress.yaml index 5580bb188..e5cc9a275 100644 --- a/k8s/charts/seaweedfs/templates/filler-ingress.yaml +++ b/k8s/charts/seaweedfs/templates/filler-ingress.yaml @@ -1,3 +1,4 @@ +{{- if .Values.filer.enabled }} {{- if .Values.filer.ingress.enabled }} {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} apiVersion: networking.k8s.io/v1 @@ -43,4 +44,5 @@ spec: {{- if .Values.filer.ingress.host }} host: {{ .Values.filer.ingress.host }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} +{{- end }} diff --git a/k8s/charts/seaweedfs/templates/master-ingress.yaml b/k8s/charts/seaweedfs/templates/master-ingress.yaml index 8a72b5ea3..7bac95809 100644 --- a/k8s/charts/seaweedfs/templates/master-ingress.yaml +++ b/k8s/charts/seaweedfs/templates/master-ingress.yaml @@ -1,3 +1,4 @@ +{{- if .Values.master.enabled }} {{- if .Values.master.ingress.enabled }} {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} apiVersion: networking.k8s.io/v1 @@ -44,3 +45,4 @@ spec: host: {{ .Values.master.ingress.host }} {{- end }} {{- end }} +{{- end }} diff --git a/k8s/charts/seaweedfs/templates/master-service.yaml b/k8s/charts/seaweedfs/templates/master-service.yaml index 978f9c881..9e69f94e5 100644 --- a/k8s/charts/seaweedfs/templates/master-service.yaml +++ b/k8s/charts/seaweedfs/templates/master-service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.master.enabled }} apiVersion: v1 kind: Service metadata: @@ -9,7 +10,7 @@ metadata: helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} app.kubernetes.io/managed-by: {{ .Release.Service }} annotations: - service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" + service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" spec: clusterIP: None publishNotReadyAddresses: true @@ -31,3 +32,4 @@ spec: selector: app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/component: master +{{- end }} diff --git a/k8s/charts/seaweedfs/templates/master-servicemonitor.yaml b/k8s/charts/seaweedfs/templates/master-servicemonitor.yaml index e9844fb8b..93715f031 100644 --- a/k8s/charts/seaweedfs/templates/master-servicemonitor.yaml +++ b/k8s/charts/seaweedfs/templates/master-servicemonitor.yaml @@ -1,3 +1,4 @@ +{{- if .Values.master.enabled }} {{- if .Values.master.metricsPort }} {{- if .Values.global.monitoring.enabled }} apiVersion: monitoring.coreos.com/v1 @@ -21,4 +22,5 @@ spec: app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/component: master {{- end }} -{{- end }} \ No newline at end of file +{{- end }} +{{- end }} diff --git a/k8s/charts/seaweedfs/templates/s3-service.yaml b/k8s/charts/seaweedfs/templates/s3-service.yaml index f111999fa..01d79ad74 100644 --- a/k8s/charts/seaweedfs/templates/s3-service.yaml +++ b/k8s/charts/seaweedfs/templates/s3-service.yaml @@ -1,3 +1,4 @@ +{{- if or .Values.s3.enabled .Values.filer.s3.enabled }} apiVersion: v1 kind: Service metadata: @@ -30,3 +31,4 @@ spec: selector: app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/component: {{ if .Values.s3.enabled }}s3{{ else }}filer{{ end }} +{{- end }} diff --git a/k8s/charts/seaweedfs/templates/s3-servicemonitor.yaml b/k8s/charts/seaweedfs/templates/s3-servicemonitor.yaml index 876f72dcd..7caf1a167 100644 --- a/k8s/charts/seaweedfs/templates/s3-servicemonitor.yaml +++ b/k8s/charts/seaweedfs/templates/s3-servicemonitor.yaml @@ -1,3 +1,4 @@ +{{- if or .Values.s3.enabled .Values.filer.s3.enabled }} {{- if .Values.s3.metricsPort }} {{- if .Values.global.monitoring.enabled }} apiVersion: monitoring.coreos.com/v1 @@ -21,4 +22,5 @@ spec: app: {{ template "seaweedfs.name" . }} component: s3 {{- end }} -{{- end }} \ No newline at end of file +{{- end }} +{{- end }} diff --git a/k8s/charts/seaweedfs/templates/secret-seaweedfs-db.yaml b/k8s/charts/seaweedfs/templates/secret-seaweedfs-db.yaml index 9a1aca91d..5b7a81038 100644 --- a/k8s/charts/seaweedfs/templates/secret-seaweedfs-db.yaml +++ b/k8s/charts/seaweedfs/templates/secret-seaweedfs-db.yaml @@ -1,3 +1,4 @@ +{{- if .Values.filer.enabled }} apiVersion: v1 kind: Secret type: Opaque @@ -17,3 +18,4 @@ stringData: password: "HardCodedPassword" # better to random generate and create in DB # password: {{ randAlphaNum 10 | sha256sum | b64enc | trunc 32 }} +{{- end }} diff --git a/k8s/charts/seaweedfs/templates/volume-service.yaml b/k8s/charts/seaweedfs/templates/volume-service.yaml index 67bfcacf1..1205f4fad 100644 --- a/k8s/charts/seaweedfs/templates/volume-service.yaml +++ b/k8s/charts/seaweedfs/templates/volume-service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.volume.enabled }} apiVersion: v1 kind: Service metadata: @@ -29,3 +30,4 @@ spec: selector: app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/component: volume +{{- end }} diff --git a/k8s/charts/seaweedfs/templates/volume-servicemonitor.yaml b/k8s/charts/seaweedfs/templates/volume-servicemonitor.yaml index d2ee8b4c7..c23e4dec0 100644 --- a/k8s/charts/seaweedfs/templates/volume-servicemonitor.yaml +++ b/k8s/charts/seaweedfs/templates/volume-servicemonitor.yaml @@ -1,3 +1,4 @@ +{{- if .Values.volume.enabled }} {{- if .Values.volume.metricsPort }} {{- if .Values.global.monitoring.enabled }} apiVersion: monitoring.coreos.com/v1 @@ -21,4 +22,5 @@ spec: app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/component: volume {{- end }} -{{- end }} \ No newline at end of file +{{- end }} +{{- end }}