crunchydata / crunchy-bridge-operator Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
WHAT
cluster provisioning CR required to set the team id, current operator implementation using by default personal team and don't have the option to get other teams id, as have the option of drop-down selecting the particular team on UI shown in the screenshot.
How
add a new controller which lists the team id/name in CR status or any other the best way.
Done
all the team details associated with the user should be retrieved.
Update the DBaaS controller to obtain the api key and secret from its spec and populate a secret named crunchy-bridge-operator-api-key
.
The example for creating from CLI:
kubectl create secret generic crunchy-bridge-operator-api-key \
--from-literal="publicApiKey=<bridge_api_key>" \
--from-literal="privateApiSecret=<bridge_api_secret>" \
-n crunchy-bridge
On initialization, the CrunchyBridge operator required to creates a RegistrationConfigMap that is used to inform the DBaaS operator.
ConfigMap Example:
apiVersion: v1
kind: ConfigMap
metadata:
name: crunchy-bridge-provider-registration
namespace: <namespace>
labels:
related-to: dbaas-operator
type: dbaas-provider-registration
data:
provider: Crunchy Bridge managed PostgreSQL
inventory_kind: CrunchyBridgeInventory
connection_kind: CrunchyBridgeConnection
credentials_fields: |
publicApiKey.name: <some field>
publicApiKey.masked: false
privateApiSecret.name: <some other field>
privateApiSecret.masked: true
The ConfigMap includes the name of the provider (e.g., “Crunchy Bridge managed PostgreSQL”). The inventory_crd and connection_crd kinds and the credential_fields keys
The Confgmap required to be created within a specified namespace for example dbaas-operator namespace and before the initialization of inventory/connection CRS or without having any prior knowledge about it.
From DBaaS UI flow, the user entered the wrong credentials and still able to see the list of inventories
Steps:
1-The first-time user entered the correct credentials and successfully get the list of inventories.
2- in the next attempt, the user entered the wrong credentials information, on the UI and was still able to get the inventories list and able to connect with the database from UI.
Current public API interface does not return the user credential information with the cluster information, provide a mechanism by which to obtain this info.
SetLogin returns an error type but only ever returns nil.
This appears to be a holdover from an earlier version where the initialization could have returned an error.
Remove the error return and cleanup client calls
Based on the design diagram from the DBaaS operator, the CrunchyBridge operator required to create CRDs and Controllers for integration with the DBaaS operator.
CRDs has shown in blue are required to defined by a CrunchyBridge operator
CRD spec and status will follow the same structure defined by the DBaaS operator
Update the DBaaS controller to populate its spec details with a list of the BridgeCluster items collected via BridgeCluster API object statuses.
The CRD's status will contain the following fields useful for populating the list:
id
- matching the cluster id known to the APIname
- matches the spec-required name for the clusterbinding
with the following minimum sub-fields:
database
host
username
password
connection_string
At this time the cluster will only have its default provisioned user provided in this binding detail.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.