Browse Source

improve k8s probes templating in helm chart (#4805)

pull/4807/head
fibbanachi 1 year ago
committed by GitHub
parent
commit
7374ceecda
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 32
      k8s/charts/seaweedfs/templates/filer-statefulset.yaml
  2. 32
      k8s/charts/seaweedfs/templates/master-statefulset.yaml
  3. 32
      k8s/charts/seaweedfs/templates/s3-deployment.yaml
  4. 32
      k8s/charts/seaweedfs/templates/volume-statefulset.yaml
  5. 103
      k8s/charts/seaweedfs/values.yaml

32
k8s/charts/seaweedfs/templates/filer-statefulset.yaml

@ -224,26 +224,30 @@ spec:
name: metrics name: metrics
- containerPort: {{ .Values.filer.grpcPort }} - containerPort: {{ .Values.filer.grpcPort }}
#name: swfs-filer-grpc #name: swfs-filer-grpc
{{- if .Values.filer.readinessProbe.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /
path: {{ .Values.filer.readinessProbe.httpGet.path }}
port: {{ .Values.filer.port }} port: {{ .Values.filer.port }}
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 15
successThreshold: 1
failureThreshold: 100
timeoutSeconds: 10
scheme: {{ .Values.filer.readinessProbe.scheme }}
initialDelaySeconds: {{ .Values.filer.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.filer.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.filer.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.filer.readinessProbe.failureThreshold }}
timeoutSeconds: {{ .Values.filer.readinessProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.filer.livenessProbe.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /
path: {{ .Values.filer.livenessProbe.httpGet.path }}
port: {{ .Values.filer.port }} port: {{ .Values.filer.port }}
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 30
successThreshold: 1
failureThreshold: 5
timeoutSeconds: 10
scheme: {{ .Values.filer.livenessProbe.scheme }}
initialDelaySeconds: {{ .Values.filer.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.filer.livenessProbe.periodSeconds }}
successThreshold: {{ .Values.filer.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.filer.livenessProbe.failureThreshold }}
timeoutSeconds: {{ .Values.filer.livenessProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.filer.resources }} {{- if .Values.filer.resources }}
resources: resources:
{{ tpl .Values.filer.resources . | nindent 12 | trim }} {{ tpl .Values.filer.resources . | nindent 12 | trim }}

32
k8s/charts/seaweedfs/templates/master-statefulset.yaml

@ -177,26 +177,30 @@ spec:
{{- end }} {{- end }}
- containerPort: {{ .Values.master.grpcPort }} - containerPort: {{ .Values.master.grpcPort }}
#name: swfs-master-grpc #name: swfs-master-grpc
{{- if .Values.master.readinessProbe.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /cluster/status
path: {{ .Values.master.readinessProbe.httpGet.path }}
port: {{ .Values.master.port }} port: {{ .Values.master.port }}
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 45
successThreshold: 2
failureThreshold: 100
timeoutSeconds: 10
scheme: {{ .Values.master.readinessProbe.scheme }}
initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.master.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }}
timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.master.livenessProbe.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /cluster/status
path: {{ .Values.master.livenessProbe.httpGet.path }}
port: {{ .Values.master.port }} port: {{ .Values.master.port }}
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 30
successThreshold: 1
failureThreshold: 4
timeoutSeconds: 10
scheme: {{ .Values.master.livenessProbe.scheme }}
initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }}
successThreshold: {{ .Values.master.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }}
timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.master.resources }} {{- if .Values.master.resources }}
resources: resources:
{{ tpl .Values.master.resources . | nindent 12 | trim }} {{ tpl .Values.master.resources . | nindent 12 | trim }}

32
k8s/charts/seaweedfs/templates/s3-deployment.yaml

@ -146,26 +146,30 @@ spec:
- containerPort: {{ .Values.s3.metricsPort }} - containerPort: {{ .Values.s3.metricsPort }}
name: "metrics" name: "metrics"
{{- end }} {{- end }}
{{- if .Values.s3.readinessProbe.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /status
path: {{ .Values.s3.readinessProbe.httpGet.path }}
port: {{ .Values.s3.port }} port: {{ .Values.s3.port }}
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 15
successThreshold: 1
failureThreshold: 100
timeoutSeconds: 10
scheme: {{ .Values.s3.readinessProbe.scheme }}
initialDelaySeconds: {{ .Values.s3.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.s3.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.s3.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.s3.readinessProbe.failureThreshold }}
timeoutSeconds: {{ .Values.s3.readinessProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.s3.livenessProbe.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /status
path: {{ .Values.s3.livenessProbe.httpGet.path }}
port: {{ .Values.s3.port }} port: {{ .Values.s3.port }}
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 60
successThreshold: 1
failureThreshold: 20
timeoutSeconds: 10
scheme: {{ .Values.s3.livenessProbe.scheme }}
initialDelaySeconds: {{ .Values.s3.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.s3.livenessProbe.periodSeconds }}
successThreshold: {{ .Values.s3.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.s3.livenessProbe.failureThreshold }}
timeoutSeconds: {{ .Values.s3.livenessProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.s3.resources }} {{- if .Values.s3.resources }}
resources: resources:
{{ tpl .Values.s3.resources . | nindent 12 | trim }} {{ tpl .Values.s3.resources . | nindent 12 | trim }}

32
k8s/charts/seaweedfs/templates/volume-statefulset.yaml

@ -183,26 +183,30 @@ spec:
{{- end }} {{- end }}
- containerPort: {{ .Values.volume.grpcPort }} - containerPort: {{ .Values.volume.grpcPort }}
name: swfs-vol-grpc name: swfs-vol-grpc
{{- if .Values.volume.readinessProbe.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /status
path: {{ .Values.volume.readinessProbe.httpGet.path }}
port: {{ .Values.volume.port }} port: {{ .Values.volume.port }}
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 15
successThreshold: 1
failureThreshold: 100
timeoutSeconds: 30
scheme: {{ .Values.volume.readinessProbe.scheme }}
initialDelaySeconds: {{ .Values.volume.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.volume.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.volume.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.volume.readinessProbe.failureThreshold }}
timeoutSeconds: {{ .Values.volume.readinessProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.volume.livenessProbe.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /status
path: {{ .Values.volume.livenessProbe.httpGet.path }}
port: {{ .Values.volume.port }} port: {{ .Values.volume.port }}
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 90
successThreshold: 1
failureThreshold: 4
timeoutSeconds: 30
scheme: {{ .Values.volume.livenessProbe.scheme }}
initialDelaySeconds: {{ .Values.volume.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.volume.livenessProbe.periodSeconds }}
successThreshold: {{ .Values.volume.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.volume.livenessProbe.failureThreshold }}
timeoutSeconds: {{ .Values.volume.livenessProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.volume.resources }} {{- if .Values.volume.resources }}
resources: resources:
{{ tpl .Values.volume.resources . | nindent 12 | trim }} {{ tpl .Values.volume.resources . | nindent 12 | trim }}

103
k8s/charts/seaweedfs/values.yaml

@ -160,6 +160,32 @@ master:
WEED_MASTER_VOLUME_GROWTH_COPY_3: 3 WEED_MASTER_VOLUME_GROWTH_COPY_3: 3
WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1 WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1
# used to configure livenessProbe on master-server containers
#
livenessProbe:
enabled: true
httpGet:
path: /cluster/status
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 30
successThreshold: 1
failureThreshold: 4
timeoutSeconds: 10
# used to configure readinessProbe on master-server containers
#
readinessProbe:
enabled: true
httpGet:
path: /cluster/status
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 45
successThreshold: 2
failureThreshold: 100
timeoutSeconds: 10
volume: volume:
enabled: true enabled: true
repository: null repository: null
@ -277,6 +303,32 @@ volume:
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
serviceAccountName: "" serviceAccountName: ""
# used to configure livenessProbe on volume-server containers
#
livenessProbe:
enabled: true
httpGet:
path: /status
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 90
successThreshold: 1
failureThreshold: 4
timeoutSeconds: 30
# used to configure readinessProbe on volume-server containers
#
readinessProbe:
enabled: true
httpGet:
path: /status
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 15
successThreshold: 1
failureThreshold: 100
timeoutSeconds: 30
filer: filer:
enabled: true enabled: true
repository: null repository: null
@ -431,6 +483,31 @@ filer:
# directories under this folder will be automatically creating a separate bucket # directories under this folder will be automatically creating a separate bucket
WEED_FILER_BUCKETS_FOLDER: "/buckets" WEED_FILER_BUCKETS_FOLDER: "/buckets"
# used to configure livenessProbe on filer containers
#
livenessProbe:
enabled: true
httpGet:
path: /
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 30
successThreshold: 1
failureThreshold: 5
timeoutSeconds: 10
# used to configure readinessProbe on filer containers
#
readinessProbe:
enabled: true
httpGet:
path: /
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 15
successThreshold: 1
failureThreshold: 100
timeoutSeconds: 10
# secret env variables # secret env variables
secretExtraEnvironmentVars: [] secretExtraEnvironmentVars: []
@ -518,6 +595,32 @@ s3:
storageClass: "" storageClass: ""
hostPathPrefix: /storage hostPathPrefix: /storage
# used to configure livenessProbe on s3 containers
#
livenessProbe:
enabled: true
httpGet:
path: /status
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 60
successThreshold: 1
failureThreshold: 20
timeoutSeconds: 10
# used to configure readinessProbe on s3 containers
#
readinessProbe:
enabled: true
httpGet:
path: /status
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 15
successThreshold: 1
failureThreshold: 100
timeoutSeconds: 10
certificates: certificates:
commonName: "SeaweedFS CA" commonName: "SeaweedFS CA"
ipAddresses: [] ipAddresses: []

Loading…
Cancel
Save