Summary
Currently, when KubeBlocks creates database accounts, the generated secrets only contain username and password fields. It would be helpful to also include connection details like host, port, and database name in the same secret.
Current Behavior
The account secrets generated by KubeBlocks currently look like this:
apiVersion: v1
data:
password: eTI1YTliMkhENA==
username: cG9zdGdyZXM=
kind: Secret
# ... metadata
type: Opaque
Proposed Enhancement
Include additional connection parameters in the secret:
apiVersion: v1
data:
username: cG9zdGdyZXM=
password: eTI1YTliMkhENA==
host: <base64-encoded-host>
port: <base64-encoded-port>
database: <base64-encoded-database-name>
kind: Secret
Benefits
- Simplified application configuration - Applications can get all connection details from a single secret
- Better developer experience - Reduces the need to manually lookup service endpoints and ports
- Consistency - Follows patterns used by other database operators in the ecosystem
- Reduced configuration errors - Less chance of misconfiguring connection parameters
Use Case
When deploying applications that need to connect to KubeBlocks-managed databases, developers currently need to:
- Get credentials from the account secret
- Separately lookup the service hostname and port
- Determine the correct database name
With this enhancement, all connection details would be available in one place.
Questions/Considerations
- How should we handle cases where there are multiple possible hosts (e.g., read/write endpoints)?
- How should we handle cases where there are multiple databases?
I'm not entirely sure if this is the best approach, so I'd love to hear the community's thoughts on this proposal.
Summary
Currently, when KubeBlocks creates database accounts, the generated secrets only contain
usernameandpasswordfields. It would be helpful to also include connection details likehost,port, anddatabasename in the same secret.Current Behavior
The account secrets generated by KubeBlocks currently look like this:
Proposed Enhancement
Include additional connection parameters in the secret:
Benefits
Use Case
When deploying applications that need to connect to KubeBlocks-managed databases, developers currently need to:
With this enhancement, all connection details would be available in one place.
Questions/Considerations
I'm not entirely sure if this is the best approach, so I'd love to hear the community's thoughts on this proposal.