Skip to content

Commit

Permalink
fix(helm): add OIDC configuration checks to prevent nil pointer deref…
Browse files Browse the repository at this point in the history
…erence in Permify deployment template
  • Loading branch information
tolgaOzen committed Jun 11, 2024
1 parent 81883e2 commit 8cf1d87
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/permify/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ description: Helm charts for deploying and managing Permify in Kubernetes enviro
type: application

# The version of the Helm chart.
version: 0.3.2
version: 0.3.3

# The specific application version that this Helm chart is designed to deploy.
appVersion: "v0.9.0"
appVersion: "v0.9.1"

# Keywords associated with the Helm chart for searchability.
keywords:
Expand Down
24 changes: 22 additions & 2 deletions charts/permify/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,26 @@ spec:
value: "{{ .Values.app.authn.oidc.audience }}"
{{- end }}

{{- if .Values.app.authn.oidc.refresh_interval }}
- name: PERMIFY_AUTHN_OIDC_REFRESH_INTERVAL
value: "{{ .Values.app.authn.oidc.refresh_interval }}"
{{- end }}

{{- if .Values.app.authn.oidc.backoff_interval }}
- name: PERMIFY_AUTHN_OIDC_BACKOFF_INTERVAL
value: "{{ .Values.app.authn.oidc.backoff_interval }}"
{{- end }}

{{- if .Values.app.authn.oidc.backoff_max_retries }}
- name: PERMIFY_AUTHN_OIDC_BACKOFF_RETRIES
value: "{{ .Values.app.authn.oidc.backoff_max_retries }}"
{{- end }}

{{- if .Values.app.authn.oidc.valid_methods }}
- name: PERMIFY_AUTHN_OIDC_VALID_METHODS
value: {{ join "," .Values.app.authn.oidc.valid_methods }}
{{- end }}

{{- end }}

{{- end }}
Expand Down Expand Up @@ -284,12 +304,12 @@ spec:
key: "uri"
{{- end }}

{{- if .Values.app.database.writer.uri }}
{{- if .Values.app.database.writer }}
- name: PERMIFY_DATABASE_WRITER_URI
value: "{{ .Values.app.database.writer.uri }}"
{{- end }}

{{- if .Values.app.database.reader.uri }}
{{- if .Values.app.database.reader }}
- name: PERMIFY_DATABASE_READER_URI
value: "{{ .Values.app.database.reader.uri }}"
{{- end }}
Expand Down

0 comments on commit 8cf1d87

Please sign in to comment.