From 15ee46de98e3ffbbd364b2c6efb7b2f255e25f84 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Thu, 9 May 2024 16:48:46 -0400 Subject: [PATCH 1/2] Adding ListUsers --- charts/openfga/Chart.yaml | 4 +-- charts/openfga/templates/deployment.yaml | 10 +++++++ charts/openfga/values.schema.json | 35 +++++++++++++++++++++++- charts/openfga/values.yaml | 3 ++ 4 files changed, 49 insertions(+), 3 deletions(-) diff --git a/charts/openfga/Chart.yaml b/charts/openfga/Chart.yaml index 5c83d4b..f47eead 100644 --- a/charts/openfga/Chart.yaml +++ b/charts/openfga/Chart.yaml @@ -3,8 +3,8 @@ name: openfga description: A Kubernetes Helm chart for the OpenFGA project. type: application -version: 0.2.3 -appVersion: "v1.5.3" +version: 0.2.4 +appVersion: "v1.5.4" home: "https://openfga.github.io/helm-charts" icon: https://github.com/openfga/community/raw/main/brand-assets/icon/color/openfga-icon-color.svg diff --git a/charts/openfga/templates/deployment.yaml b/charts/openfga/templates/deployment.yaml index 5619655..a34681a 100644 --- a/charts/openfga/templates/deployment.yaml +++ b/charts/openfga/templates/deployment.yaml @@ -258,6 +258,16 @@ spec: value: "{{ .Values.listObjectsMaxResults }}" {{- end }} + {{- if .Values.listUsersDeadline }} + - name: OPENFGA_LIST_USERS_DEADLINE + value: "{{ .Values.listUsersDeadline }}" + {{- end }} + + {{- if .Values.listUsersMaxResults }} + - name: OPENFGA_LIST_USERS_MAX_RESULTS + value: "{{ .Values.listUsersMaxResults }}" + {{- end }} + {{- if .Values.checkQueryCache.enabled }} - name: OPENFGA_CHECK_QUERY_CACHE_ENABLED value: "{{ .Values.checkQueryCache.enabled }}" diff --git a/charts/openfga/values.schema.json b/charts/openfga/values.schema.json index 392c43a..66c5369 100644 --- a/charts/openfga/values.schema.json +++ b/charts/openfga/values.schema.json @@ -609,7 +609,12 @@ "experimentals": { "type": "array", "description": "a list of experimental features to enable", - "default": [] + "default": [], + "examples": ["enable-list-users"], + "items": { + "type": "string", + "enum": ["enable-list-users"] + } }, "maxTuplesPerWrite": { "type": [ @@ -648,6 +653,14 @@ "description": "the maximum allowed number of concurrent reads in a single ListObjects query", "default": 4294967295 }, + "maxConcurrentReadsForListUsers": { + "type": [ + "integer", + "null" + ], + "description": "the maximum allowed number of concurrent reads in a single ListUsers query", + "default": 4294967295 + }, "changelogHorizonOffset": { "type": [ "integer", @@ -690,6 +703,26 @@ ], "description": "the maximum results to return in ListObjects responses" }, + "listUsersDeadline": { + "type": [ + "string", + "null" + ], + "description": "the timeout deadline (as a duration) for serving ListUsers requests", + "format": "duration", + "examples": [ + "3s", + "1m", + "200ms" + ] + }, + "listUsersMaxResults": { + "type": [ + "integer", + "null" + ], + "description": "the maximum results to return in ListUsers responses" + }, "requestDurationDatastoreQueryCountBuckets": { "description": "datastore query count buckets used to label the histogram metric for measuring request duration.", "type": "array", diff --git a/charts/openfga/values.yaml b/charts/openfga/values.yaml index b585d13..89369f0 100644 --- a/charts/openfga/values.yaml +++ b/charts/openfga/values.yaml @@ -262,11 +262,14 @@ maxTypesPerAuthorizationModel: maxAuthorizationModelSizeInBytes: maxConcurrentReadsForCheck: maxConcurrentReadsForListObjects: +maxConcurrentReadsForListUsers: changelogHorizonOffset: resolveNodeLimit: resolveNodeBreadthLimit: listObjectsDeadline: listObjectsMaxResults: +listUsersDeadline: +listUsersMaxResults: requestDurationDatastoreQueryCountBuckets: [50, 200] allowWriting1_0Models: allowEvaluating1_0Models: From b07f3f809b4abffe96fddbdb5a1346b237a954d9 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Thu, 9 May 2024 17:29:58 -0400 Subject: [PATCH 2/2] Adding max concurrent reads env var --- charts/openfga/templates/deployment.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/charts/openfga/templates/deployment.yaml b/charts/openfga/templates/deployment.yaml index a34681a..d4e2cf4 100644 --- a/charts/openfga/templates/deployment.yaml +++ b/charts/openfga/templates/deployment.yaml @@ -115,6 +115,21 @@ spec: - name: OPENFGA_DATASTORE_CONN_MAX_LIFETIME value: "{{ .Values.datastore.connMaxLifetime }}" {{- end }} + + {{- if .Values.maxConcurrentReadsForCheck }} + - name: OPENFGA_MAX_CONCURRENT_READS_FOR_CHECK + value: "{{ .Values.maxConcurrentReadsForCheck }}" + {{- end }} + + {{- if .Values.maxConcurrentReadsForListObjects }} + - name: OPENFGA_MAX_CONCURRENT_READS_FOR_LIST_OBJECTS + value: "{{ .Values.maxConcurrentReadsForListObjects }}" + {{- end }} + + {{- if .Values.maxConcurrentReadsForListUsers }} + - name: OPENFGA_MAX_CONCURRENT_READS_FOR_LIST_USERS + value: "{{ .Values.maxConcurrentReadsForListUsers }}" + {{- end }} {{- if .Values.experimentals }} - name: OPENFGA_EXPERIMENTALS