Fix jwt error in Filer pod (k8s) (#7960)
* Avoid JWT error on liveprobeness * fix jwt error * address comments * lint --------- Co-authored-by: Chris Lu <chris.lu@gmail.com>
This commit is contained in:
@@ -263,7 +263,7 @@ spec:
|
|||||||
mountPath: /usr/local/share/ca-certificates/filer/
|
mountPath: /usr/local/share/ca-certificates/filer/
|
||||||
- name: client-cert
|
- name: client-cert
|
||||||
readOnly: true
|
readOnly: true
|
||||||
mountPath: /usr/local/share/ca-certificates/client/
|
mountPath: /usr/local/share/ca-certificates/client
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ tpl .Values.filer.extraVolumeMounts . | nindent 12 | trim }}
|
{{ tpl .Values.filer.extraVolumeMounts . | nindent 12 | trim }}
|
||||||
ports:
|
ports:
|
||||||
@@ -281,12 +281,18 @@ spec:
|
|||||||
name: swfs-s3-tls
|
name: swfs-s3-tls
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- $isJwtEnabled := or .Values.global.securityConfig.jwtSigning.filerWrite .Values.global.securityConfig.jwtSigning.filerRead }}
|
||||||
{{- if .Values.filer.readinessProbe.enabled }}
|
{{- if .Values.filer.readinessProbe.enabled }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
|
{{- if or $isJwtEnabled .Values.filer.readinessProbe.tcpSocket }}
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ if $isJwtEnabled }}{{ .Values.filer.port }}{{ else }}{{ .Values.filer.readinessProbe.tcpSocket.port }}{{ end }}
|
||||||
|
{{- else }}
|
||||||
httpGet:
|
httpGet:
|
||||||
path: {{ .Values.filer.readinessProbe.httpGet.path }}
|
path: {{ .Values.filer.readinessProbe.httpGet.path }}
|
||||||
port: {{ .Values.filer.port }}
|
port: {{ .Values.filer.port }}
|
||||||
scheme: {{ .Values.filer.readinessProbe.httpGet.scheme }}
|
scheme: {{ .Values.filer.readinessProbe.httpGet.scheme }}
|
||||||
|
{{- end }}
|
||||||
initialDelaySeconds: {{ .Values.filer.readinessProbe.initialDelaySeconds }}
|
initialDelaySeconds: {{ .Values.filer.readinessProbe.initialDelaySeconds }}
|
||||||
periodSeconds: {{ .Values.filer.readinessProbe.periodSeconds }}
|
periodSeconds: {{ .Values.filer.readinessProbe.periodSeconds }}
|
||||||
successThreshold: {{ .Values.filer.readinessProbe.successThreshold }}
|
successThreshold: {{ .Values.filer.readinessProbe.successThreshold }}
|
||||||
@@ -295,10 +301,15 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.filer.livenessProbe.enabled }}
|
{{- if .Values.filer.livenessProbe.enabled }}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
|
{{- if or $isJwtEnabled .Values.filer.livenessProbe.tcpSocket }}
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ if $isJwtEnabled }}{{ .Values.filer.port }}{{ else }}{{ .Values.filer.livenessProbe.tcpSocket.port }}{{ end }}
|
||||||
|
{{- else }}
|
||||||
httpGet:
|
httpGet:
|
||||||
path: {{ .Values.filer.livenessProbe.httpGet.path }}
|
path: {{ .Values.filer.livenessProbe.httpGet.path }}
|
||||||
port: {{ .Values.filer.port }}
|
port: {{ .Values.filer.port }}
|
||||||
scheme: {{ .Values.filer.livenessProbe.httpGet.scheme }}
|
scheme: {{ .Values.filer.livenessProbe.httpGet.scheme }}
|
||||||
|
{{- end }}
|
||||||
initialDelaySeconds: {{ .Values.filer.livenessProbe.initialDelaySeconds }}
|
initialDelaySeconds: {{ .Values.filer.livenessProbe.initialDelaySeconds }}
|
||||||
periodSeconds: {{ .Values.filer.livenessProbe.periodSeconds }}
|
periodSeconds: {{ .Values.filer.livenessProbe.periodSeconds }}
|
||||||
successThreshold: {{ .Values.filer.livenessProbe.successThreshold }}
|
successThreshold: {{ .Values.filer.livenessProbe.successThreshold }}
|
||||||
|
|||||||
@@ -261,10 +261,10 @@ master:
|
|||||||
tls: []
|
tls: []
|
||||||
|
|
||||||
extraEnvironmentVars:
|
extraEnvironmentVars:
|
||||||
WEED_MASTER_VOLUME_GROWTH_COPY_1: '7'
|
WEED_MASTER_VOLUME_GROWTH_COPY_1: "7"
|
||||||
WEED_MASTER_VOLUME_GROWTH_COPY_2: '6'
|
WEED_MASTER_VOLUME_GROWTH_COPY_2: "6"
|
||||||
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
|
# used to configure livenessProbe on master-server containers
|
||||||
#
|
#
|
||||||
@@ -348,16 +348,16 @@ volume:
|
|||||||
# maxVolumes: 0 # If set to zero on non-windows OS, the limit will be auto configured. (default "7")
|
# maxVolumes: 0 # If set to zero on non-windows OS, the limit will be auto configured. (default "7")
|
||||||
|
|
||||||
dataDirs:
|
dataDirs:
|
||||||
- name: data1
|
- name: data1
|
||||||
type: "hostPath"
|
type: "hostPath"
|
||||||
hostPathPrefix: /ssd
|
hostPathPrefix: /ssd
|
||||||
maxVolumes: 0
|
maxVolumes: 0
|
||||||
|
|
||||||
# - name: data2
|
# - name: data2
|
||||||
# type: "persistentVolumeClaim"
|
# type: "persistentVolumeClaim"
|
||||||
# storageClass: "yourClassNameOfChoice"
|
# storageClass: "yourClassNameOfChoice"
|
||||||
# size: "800Gi"
|
# size: "800Gi"
|
||||||
# maxVolumes: 0
|
# maxVolumes: 0
|
||||||
|
|
||||||
# This will automatically create a job for patching Kubernetes resources if the dataDirs type is 'persistentVolumeClaim' and the size has changed.
|
# This will automatically create a job for patching Kubernetes resources if the dataDirs type is 'persistentVolumeClaim' and the size has changed.
|
||||||
resizeHook:
|
resizeHook:
|
||||||
@@ -397,7 +397,6 @@ volume:
|
|||||||
# limit background compaction or copying speed in mega bytes per second
|
# limit background compaction or copying speed in mega bytes per second
|
||||||
compactionMBps: "50"
|
compactionMBps: "50"
|
||||||
|
|
||||||
|
|
||||||
# Volume server's rack name
|
# Volume server's rack name
|
||||||
rack: null
|
rack: null
|
||||||
|
|
||||||
@@ -846,14 +845,14 @@ filer:
|
|||||||
|
|
||||||
# secret env variables
|
# secret env variables
|
||||||
secretExtraEnvironmentVars: {}
|
secretExtraEnvironmentVars: {}
|
||||||
# WEED_POSTGRES_USERNAME:
|
# WEED_POSTGRES_USERNAME:
|
||||||
# secretKeyRef:
|
# secretKeyRef:
|
||||||
# name: postgres-credentials
|
# name: postgres-credentials
|
||||||
# key: username
|
# key: username
|
||||||
# WEED_POSTGRES_PASSWORD:
|
# WEED_POSTGRES_PASSWORD:
|
||||||
# secretKeyRef:
|
# secretKeyRef:
|
||||||
# name: postgres-credentials
|
# name: postgres-credentials
|
||||||
# key: password
|
# key: password
|
||||||
|
|
||||||
s3:
|
s3:
|
||||||
enabled: false
|
enabled: false
|
||||||
@@ -1232,7 +1231,6 @@ worker:
|
|||||||
# Admin server to connect to
|
# Admin server to connect to
|
||||||
adminServer: ""
|
adminServer: ""
|
||||||
|
|
||||||
|
|
||||||
# Worker capabilities - comma-separated list
|
# Worker capabilities - comma-separated list
|
||||||
# Available: vacuum, balance, erasure_coding
|
# Available: vacuum, balance, erasure_coding
|
||||||
# Default: "vacuum,balance,erasure_coding" (all capabilities)
|
# Default: "vacuum,balance,erasure_coding" (all capabilities)
|
||||||
|
|||||||
Reference in New Issue
Block a user