Browse Source

helm enable resource for template (#5268)

enable resource for template
pull/5272/head
cuisongliu 11 months ago
committed by GitHub
parent
commit
9abd3a90c3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      k8s/charts/seaweedfs/templates/filer-service-client.yaml
  2. 2
      k8s/charts/seaweedfs/templates/filer-service.yaml
  3. 4
      k8s/charts/seaweedfs/templates/filer-servicemonitor.yaml
  4. 4
      k8s/charts/seaweedfs/templates/filler-ingress.yaml
  5. 2
      k8s/charts/seaweedfs/templates/master-ingress.yaml
  6. 4
      k8s/charts/seaweedfs/templates/master-service.yaml
  7. 4
      k8s/charts/seaweedfs/templates/master-servicemonitor.yaml
  8. 2
      k8s/charts/seaweedfs/templates/s3-service.yaml
  9. 4
      k8s/charts/seaweedfs/templates/s3-servicemonitor.yaml
  10. 2
      k8s/charts/seaweedfs/templates/secret-seaweedfs-db.yaml
  11. 2
      k8s/charts/seaweedfs/templates/volume-service.yaml
  12. 4
      k8s/charts/seaweedfs/templates/volume-servicemonitor.yaml

2
k8s/charts/seaweedfs/templates/filer-service-client.yaml

@ -1,3 +1,4 @@
{{- if .Values.filer.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -32,3 +33,4 @@ spec:
selector: selector:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: filer app.kubernetes.io/component: filer
{{- end }}

2
k8s/charts/seaweedfs/templates/filer-service.yaml

@ -1,3 +1,4 @@
{{- if .Values.filer.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -44,3 +45,4 @@ spec:
selector: selector:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: filer app.kubernetes.io/component: filer
{{- end }}

4
k8s/charts/seaweedfs/templates/filer-servicemonitor.yaml

@ -1,3 +1,4 @@
{{- if .Values.filer.enabled }}
{{- if .Values.filer.metricsPort }} {{- if .Values.filer.metricsPort }}
{{- if .Values.global.monitoring.enabled }} {{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
@ -21,4 +22,5 @@ spec:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: filer app.kubernetes.io/component: filer
{{- end }} {{- end }}
{{- end }}
{{- end }}
{{- end }}

4
k8s/charts/seaweedfs/templates/filler-ingress.yaml

@ -1,3 +1,4 @@
{{- if .Values.filer.enabled }}
{{- if .Values.filer.ingress.enabled }} {{- if .Values.filer.ingress.enabled }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
@ -43,4 +44,5 @@ spec:
{{- if .Values.filer.ingress.host }} {{- if .Values.filer.ingress.host }}
host: {{ .Values.filer.ingress.host }} host: {{ .Values.filer.ingress.host }}
{{- end }} {{- end }}
{{- end }}
{{- end }}
{{- end }}

2
k8s/charts/seaweedfs/templates/master-ingress.yaml

@ -1,3 +1,4 @@
{{- if .Values.master.enabled }}
{{- if .Values.master.ingress.enabled }} {{- if .Values.master.ingress.enabled }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
@ -44,3 +45,4 @@ spec:
host: {{ .Values.master.ingress.host }} host: {{ .Values.master.ingress.host }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }}

4
k8s/charts/seaweedfs/templates/master-service.yaml

@ -1,3 +1,4 @@
{{- if .Values.master.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -9,7 +10,7 @@ metadata:
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
annotations: annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec: spec:
clusterIP: None clusterIP: None
publishNotReadyAddresses: true publishNotReadyAddresses: true
@ -31,3 +32,4 @@ spec:
selector: selector:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: master app.kubernetes.io/component: master
{{- end }}

4
k8s/charts/seaweedfs/templates/master-servicemonitor.yaml

@ -1,3 +1,4 @@
{{- if .Values.master.enabled }}
{{- if .Values.master.metricsPort }} {{- if .Values.master.metricsPort }}
{{- if .Values.global.monitoring.enabled }} {{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
@ -21,4 +22,5 @@ spec:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: master app.kubernetes.io/component: master
{{- end }} {{- end }}
{{- end }}
{{- end }}
{{- end }}

2
k8s/charts/seaweedfs/templates/s3-service.yaml

@ -1,3 +1,4 @@
{{- if or .Values.s3.enabled .Values.filer.s3.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -30,3 +31,4 @@ spec:
selector: selector:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: {{ if .Values.s3.enabled }}s3{{ else }}filer{{ end }} app.kubernetes.io/component: {{ if .Values.s3.enabled }}s3{{ else }}filer{{ end }}
{{- end }}

4
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.s3.metricsPort }}
{{- if .Values.global.monitoring.enabled }} {{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
@ -21,4 +22,5 @@ spec:
app: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
component: s3 component: s3
{{- end }} {{- end }}
{{- end }}
{{- end }}
{{- end }}

2
k8s/charts/seaweedfs/templates/secret-seaweedfs-db.yaml

@ -1,3 +1,4 @@
{{- if .Values.filer.enabled }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
type: Opaque type: Opaque
@ -17,3 +18,4 @@ stringData:
password: "HardCodedPassword" password: "HardCodedPassword"
# better to random generate and create in DB # better to random generate and create in DB
# password: {{ randAlphaNum 10 | sha256sum | b64enc | trunc 32 }} # password: {{ randAlphaNum 10 | sha256sum | b64enc | trunc 32 }}
{{- end }}

2
k8s/charts/seaweedfs/templates/volume-service.yaml

@ -1,3 +1,4 @@
{{- if .Values.volume.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -29,3 +30,4 @@ spec:
selector: selector:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: volume app.kubernetes.io/component: volume
{{- end }}

4
k8s/charts/seaweedfs/templates/volume-servicemonitor.yaml

@ -1,3 +1,4 @@
{{- if .Values.volume.enabled }}
{{- if .Values.volume.metricsPort }} {{- if .Values.volume.metricsPort }}
{{- if .Values.global.monitoring.enabled }} {{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
@ -21,4 +22,5 @@ spec:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: volume app.kubernetes.io/component: volume
{{- end }} {{- end }}
{{- end }}
{{- end }}
{{- end }}
Loading…
Cancel
Save