Skip to content

Commit 7db6362

Browse files
committed
Add dedicated openfga datastore override type for ace chart
Signed-off-by: Imtiaz Uddin <imtiaz@appscode.com>
1 parent 802ccc5 commit 7db6362

4 files changed

Lines changed: 36 additions & 4 deletions

File tree

apis/installer/v1alpha1/ace_ace_types.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,23 @@ type AceTrickster struct {
177177
}
178178

179179
type AceOpenfga struct {
180-
Enabled bool `json:"enabled"`
181-
DatastoreURI string `json:"datastoreURI"`
180+
Enabled bool `json:"enabled"`
181+
DatastoreURI string `json:"datastoreURI"`
182+
Datastore *AceOpenfgaDatastore `json:"datastore,omitempty"`
182183
*OpenfgaSpec `json:",inline,omitempty"`
183184
}
184185

186+
// AceOpenfgaDatastore exposes the subset of openfga datastore connection
187+
// settings that can be overridden from the ace chart. It intentionally
188+
// shadows the inlined OpenfgaSpec.Datastore so that ace/values.yaml only
189+
// carries these knobs instead of the full upstream datastore schema.
190+
type AceOpenfgaDatastore struct {
191+
// +optional
192+
MaxOpenConns string `json:"maxOpenConns,omitempty"`
193+
// +optional
194+
ConnMaxIdleTime string `json:"connMaxIdleTime,omitempty"`
195+
}
196+
185197
type AceS3proxy struct {
186198
Enabled bool `json:"enabled"`
187199
*S3proxySpec `json:",inline,omitempty"`

apis/installer/v1alpha1/zz_generated.deepcopy.go

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/ace/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The following table lists the configurable parameters of the `ace` chart and the
6565
| s3proxy.enabled | | <code>false</code> |
6666
| openfga.enabled | | <code>false</code> |
6767
| openfga.datastoreURI | | <code>""</code> |
68-
| openfga.datastore.maxOpenConns | | <code>20</code> |
68+
| openfga.datastore.maxOpenConns | | <code>"20"</code> |
6969
| openfga.datastore.connMaxIdleTime | | <code>"10m"</code> |
7070
| pgoutbox.enabled | | <code>false</code> |
7171
| outbox-syncer.enabled | | <code>false</code> |

charts/ace/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ openfga:
8080
enabled: false
8181
datastoreURI: ""
8282
datastore:
83-
maxOpenConns: 20
83+
maxOpenConns: "20"
8484
connMaxIdleTime: "10m"
8585
## configured in lib-selfhost
8686
# securityContext: # +doc-gen:break

0 commit comments

Comments
 (0)