Skip to content

Commit

Permalink
feat: specify a secret for the datastore URI (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Arvela authored May 1, 2023
1 parent aa11dfc commit 58b19a2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/openfga/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: openfga
description: A Kubernetes Helm chart for the OpenFGA project.

type: application
version: 0.1.12
version: 0.1.13
appVersion: "v1.0.1"

home: "https://openfga.github.io/helm-charts/charts/openfga"
Expand Down
6 changes: 6 additions & 0 deletions charts/openfga/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ spec:
{{- if .Values.datastore.uri }}
- name: OPENFGA_DATASTORE_URI
value: "{{ .Values.datastore.uri }}"
{{- else if .Values.datastore.uriSecret }}
- name: OPENFGA_DATASTORE_URI
valueFrom:
secretKeyRef:
name: "{{ .Values.datastore.uriSecret }}"
key: "uri"
{{- end }}

{{- if .Values.datastore.maxCacheSize }}
Expand Down
4 changes: 4 additions & 0 deletions charts/openfga/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
"uri": {
"type":["string", "null"]
},
"uriSecret": {
"type":["string", "null"],
"description": "the secret name where to get the datastore URI, it expects a key named uri to exist in the secret"
},
"maxCacheSize": {
"type": ["integer", "null"],
"description": "the maximum number of cache keys that the storage cache can store before evicting old keys"
Expand Down
1 change: 1 addition & 0 deletions charts/openfga/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ telemetry:
datastore:
engine: memory
uri:
uriSecret:
maxCacheSize:
maxOpenConns:
maxIdleConns:
Expand Down

0 comments on commit 58b19a2

Please sign in to comment.