Skip to content

Commit ac90908

Browse files
Merge pull request #205 from vihangm/vihang/tls_probes
bug: Update default probes to work with tls enabled
2 parents c7dbdda + 5b84a81 commit ac90908

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

charts/openfga/templates/deployment.yaml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,25 +402,58 @@ spec:
402402
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }}
403403
{{- else if .Values.readinessProbe.enabled }}
404404
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readinessProbe "enabled") "context" $) | nindent 12 }}
405+
{{- if .Values.grpc.tls.enabled }}
405406
exec:
406-
command: ["grpc_health_probe", "-addr={{ .Values.grpc.addr }}"]
407+
command:
408+
- grpc_health_probe
409+
- -addr={{ .Values.grpc.addr }}
410+
- -tls
411+
- -tls-ca-cert={{ .Values.grpc.tls.ca }}
412+
- -tls-client-cert={{ .Values.grpc.tls.cert }}
413+
- -client-tls-key={{ .Values.grpc.tls.key }}
414+
{{- else }}
415+
grpc:
416+
port: {{ (split ":" .Values.grpc.addr)._1 }}
417+
{{- end }}
407418
{{- end }}
408419

409420
{{- if .Values.customLivenessProbe }}
410421
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }}
411422
{{- else if .Values.livenessProbe.enabled }}
412423
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.livenessProbe "enabled") "context" $) | nindent 12 }}
424+
{{- if .Values.grpc.tls.enabled }}
425+
exec:
426+
command:
427+
- grpc_health_probe
428+
- -addr={{ .Values.grpc.addr }}
429+
- -tls
430+
- -tls-ca-cert={{ .Values.grpc.tls.ca }}
431+
- -tls-client-cert={{ .Values.grpc.tls.cert }}
432+
- -tls-client-key={{ .Values.grpc.tls.key }}
433+
{{- else }}
413434
grpc:
414435
port: {{ (split ":" .Values.grpc.addr)._1 }}
415436
{{- end }}
437+
{{- end }}
416438

417439
{{- if .Values.customStartupProbe }}
418440
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }}
419441
{{- else if .Values.startupProbe.enabled }}
420442
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.startupProbe "enabled") "context" $) | nindent 12 }}
443+
{{- if .Values.grpc.tls.enabled }}
444+
exec:
445+
command:
446+
- grpc_health_probe
447+
- -addr={{ .Values.grpc.addr }}
448+
- -tls
449+
- -tls-ca-cert={{ .Values.grpc.tls.ca }}
450+
- -tls-client-cert={{ .Values.grpc.tls.cert }}
451+
- -tls-client-key={{ .Values.grpc.tls.key }}
452+
{{- else }}
421453
grpc:
422454
port: {{ (split ":" .Values.grpc.addr)._1 }}
423455
{{- end }}
456+
{{- end }}
424457

425458
resources:
426459
{{- toYaml .Values.resources | nindent 12 }}

charts/openfga/values.schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,13 @@
402402
"description": "enables or disables transport layer security (TLS)",
403403
"default": false
404404
},
405+
"ca": {
406+
"type": [
407+
"string",
408+
"null"
409+
],
410+
"description": "the (absolute) file path of the CA certificate to use for the TLS connection"
411+
},
405412
"cert": {
406413
"type": [
407414
"string",

charts/openfga/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ grpc:
227227
enabled: false
228228
cert:
229229
key:
230+
ca:
230231

231232
http:
232233
enabled: true

0 commit comments

Comments
 (0)