Make the Datastore Schema (DB Name or etcd Prefix) configurable #548
SimonKienzler
started this conversation in
Feature Requests
Replies: 2 comments 3 replies
-
@SimonKienzler LGTM, it's a feature request raised also by other adopters in stealth mode. Are you up to work on this? I think that we could extend the apiGroup: kamaji.clastix.io/v1alpha1
kind: TenantControlPlane
metadata:
...
spec:
dataStore: default # name of the Kamaji DataStore
dataStorePrefix: override # or default with the mutating webhook we already have in place to `${NAMESPACE_NAME}_${TCP_NAME}` |
Beta Was this translation helpful? Give feedback.
2 replies
-
@prometherion What do you think regarding
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I envision a feature that allows Kamaji users to control the database name resp. the etcd prefix used by a specific TCP upon creation. Currently, this value is auto-generated based on the
Namespace
andName
metadata of the TCP.Current Behavior
Currently, when creating a TCP, the
DataStoreStorageConfig
resource is responsible for creating aSecret
that contains (among other connection credentials) the so-calledDB_SCHEMA
key. The value of this key is subsequently used by theDatastoreSetup
resource to bootstrap the configuredDatastore
. Depending on the type of datastore, theDB_SCHEMA
value is used differently:etcd
, the value becomes the key prefix under which all resources of the TCP are stored,In the
DataStoreStorageConfig
resource, thecoalesceFn()
is responsible for either reading the existing schema name from the TCP status or create a new one:kamaji/internal/resources/datastore/datastore_storage_config.go
Lines 124 to 131 in 28a098a
Envisioned Behavior
I think the easiest way to make the schema name configurable would be an additional field in the TCP spec, e.g. called
DatastoreSchemaName
. We would then implement an additional "fallback behavior" in thecoalesceFn
that checks if this field ist set:Benefits
Datastore
CR for it and configure the correct (existing) prefixes.)Challenges
Alternatives
Related Discussions
Happy about any feedback regarding this idea or counter-proposals!
Beta Was this translation helpful? Give feedback.
All reactions