Giter Club home page Giter Club logo

crunchy-bridge-operator's People

Contributors

jeremyary avatar jianrongzhang89 avatar olavtar avatar redhathameed avatar tchughesiv avatar wilybrace avatar xieshenzh avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

crunchy-bridge-operator's Issues

Add CR for listing teams names

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.
Screen Shot 2021-11-16 at 4 19 13 PM

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 dbaas controller to populate api key

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

Create a Crunchy Bridge Provider Registration ConfigMap Required by DBaaS

On initialization, the CrunchyBridge operator required to creates a RegistrationConfigMap that is used to inform the DBaaS operator.
ProviderRegistrationCM

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.

API Fetching inventories list with wrong credentials

From DBaaS UI flow, the user entered the wrong credentials and still able to see the list of inventories

image

image (1)

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.

SetLogin has no meaningful error

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

Add explicit error for bad login status to bridge api client

  • Update the login manager to have reattempts on errors and forbidden state (especially to handle forced rotated credential case)
  • Update the client library to explicitly return forbidden status or other login state failures as no functions will work correctly when login state has not been achieved

Create Controllers and CRDs based on DBaaS operator design

Based on the design diagram from the DBaaS operator, the CrunchyBridge operator required to create CRDs and Controllers for integration with the DBaaS operator.

Screenshot from 2021-06-01 17-20-09

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 dbaas controller to populate cluster info list

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 API
  • name - matches the spec-required name for the cluster
  • binding 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.