{"id":19236853,"url":"https://github.com/crunchydata/crunchy-bridge-operator","last_synced_at":"2025-06-30T19:06:29.779Z","repository":{"id":37904083,"uuid":"368272445","full_name":"CrunchyData/crunchy-bridge-operator","owner":"CrunchyData","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-19T20:59:13.000Z","size":347,"stargazers_count":3,"open_issues_count":1,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-01T10:35:30.562Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CrunchyData.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-17T17:41:18.000Z","updated_at":"2023-07-21T05:26:15.000Z","dependencies_parsed_at":"2022-09-01T20:02:25.048Z","dependency_job_id":null,"html_url":"https://github.com/CrunchyData/crunchy-bridge-operator","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrunchyData%2Fcrunchy-bridge-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrunchyData%2Fcrunchy-bridge-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrunchyData%2Fcrunchy-bridge-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrunchyData%2Fcrunchy-bridge-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrunchyData","download_url":"https://codeload.github.com/CrunchyData/crunchy-bridge-operator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250002304,"owners_count":21359091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T16:23:42.691Z","updated_at":"2025-04-21T05:32:38.784Z","avatar_url":"https://github.com/CrunchyData.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crunchy Bridge Operator\n\n## Building the Operator\n**if you are using podman instead of docker set CONTAINER_ENGINE as podman** `export CONTAINER_ENGINE=podman`\n- Build Operator `make build`\n- For build and push the operator image, operator-bundle image and operator-catalog image to a registry run:  `make release`**make sure change the registry under -  `Makefile` and set `ORG` with your own Quay.io Org!**\n- `make release` is commented out while the release process is being considered\n- For more make commands run `make help`\n- see [operator-sdk documentation](https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/) for further info\n\n## Running the Operator\n\n### Prerequisite Tools\n\n* golang 1.15+\n* operator-sdk v1.7 or later\n* (OCP 4.6.1) or later \n* [OpenShift command line tool](https://developers.redhat.com/openshift/command-line-tools)\n\n**Run as a local instance**:\n\n- `make install run INSTALL_NAMESPACE=\u003cyour_target_namespace\u003e `\n\n**Deploy \u0026 run on a cluster:**\n- `oc project \u003cyour_target_namespace\u003e`\n- `make deploy`\n- When finished, remove deployment via:\n    - `make  undeploy`\n\n**Deploy via OLM on cluster:**\n- **Make sure to edit `Makefile` and set `ORG` with your own Quay.io Org!**\n- **Next edit the [catalog-source.yaml](config/samples/catalog-source.yaml) template to indicate your new Quay.io org image**  \n- `make release catalog-update`\n- search the Crunchy Bridge Operator in OperatorHub, click on install.\n\n## Test Database as a Service (DBaaS) on OpenShift  \n\nThe Crunchy Bridge Operator is integrated with the [Red Hat Database-as-a-Service (DBaaS) Operator](https://github.com/RHEcosystemAppEng/dbaas-operator) which allows application developers to import database instances and connect to the databases through the [Service Binding Operator](https://github.com/redhat-developer/service-binding-operator). More information can be found [here](https://github.com/RHEcosystemAppEng/dbaas-operator#readme).\n\nNote that both the DBaaS Operator and Crunchy Bridge Operator should be installed through the [Operator Lifecyle Manager (OLM)](https://github.com/operator-framework/operator-lifecycle-manager).\n\n\n**1.** Check DBaaS Registration\n\nIf the DBaaS Operator has been deployed in the OpenShift Cluster, the Crunchy Bridge Operator automatically creates a cluster level [DBaaSProvider](https://github.com/RHEcosystemAppEng/dbaas-operator/blob/main/config/crd/bases/dbaas.redhat.com_dbaasproviders.yaml) custom resource (CR) object `crunchy-bridge-registration` to automatically register itself with the DBaaS Operator.\n\n```\napiVersion: dbaas.redhat.com/v1alpha1\nkind: DBaaSProvider\nmetadata:\n  name: crunchy-bridge-registration\n  labels:\n    related-to: dbaas-operator\n    type: dbaas-provider-registration\nspec:\n  provider:\n    name: Red Hat DBaaS / Crunchy Bridge\n    displayName: Crunchy Bridge managed PostgreSQL\n    displayDescription: The Crunchy Bridge Fully Managed Postgres as a Service.\n    icon:\n      base64data: \u003c\u003e\n      mediatype: image/png\n  inventoryKind: CrunchyBridgeInventory\n  connectionKind: CrunchyBridgeConnection\n  credentialFields:\n    - key: publicApiKey\n      displayName: Public API Key\n      type: string\n      required: true\n    - key: privateApiSecret\n      displayName: Private API Secret\n      type: maskedstring\n      required: true\n```\nIf the crunchy bridge Operator is undeployed with the OLM, the above registration CR gets cleaned up automatically.\n\n**2.** Creating a Secret \n\nAdministrator will first create the secret with Application ID and Application Secret, for creating a secret. See more, [API Reference](https://docs.crunchybridge.com/api/getting_started)\n\n```\nkubectl create secret generic crunchy-bridge-api-key  --from-literal=\"publicApiKey=\u003cApplication ID\u003e\"   --from-literal=\"privateApiSecret=\u003cApplication Secret\u003e\"   -n crunchy-bridge-operator-system\n```\n**3.** Creating  `CrunchyBridgeInventory` Custom Resource\n\nAdministrator will creates a [DBaaSInventory](https://github.com/RHEcosystemAppEng/dbaas-operator/blob/main/config/crd/bases/dbaas.redhat.com_dbaasinventories.yaml) CR for CrunchyBrige. \nThe DBaaS Operator automatically creates a CrunchyBridgeInventory CR, and the crunchy-bridge Operator discovers the clusters and  instances, and sets the result in the CR status.\n\nThe CRs status will be updated with list of clusters, as seen below\n\nexample: \n```\nInstances:\n    Extra Info:\n      Cpu:            1\n      created_at:     2021-04-01 19:36:19.937782 +0000 UTC\n      is_ha:          false\n      major_version:  13\n      Memory:         2\n      provider_id:    aws\n      region_id:      us-east-1\n      Storage:        100\n      team_id:        vp6hlxjcl5g73furjiztcrr2vi\n      updated_at:     2021-06-04 21:30:57.53937 +0000 UTC\n    Instance ID:      475ow3natngrhaffymv7fbxmha\n    Name:             sampledatabasse\n\n```\n**3.** Creating `CrunchyBridgeConnection` Custom resource\n\nNow the application developer can create a [DBaaSConnection](https://github.com/RHEcosystemAppEng/dbaas-operator/blob/main/config/crd/bases/dbaas.redhat.com_dbaasconnections.yaml) CR\nfor connection to the Crunchy database instance using from the list of instances, the DBaaS Operator automatically creates CrunchyBridgeConnection \nCR. The crunchy Operator stores the db user credentials in a kubernetes secret, and the remaining connection information in a configmap, and then updates the CrunchyBridgeConnection CR status.\n\nThe CRs status will be updated with connection details of specified instance ID as seen example:\n```\n  connectionInfoRef:\n   name: crunchy-bridge-db-conn-cm-k8rkv // name of configmap contains connection info like host, port, datbase name\n  credentialsRef:\n   name: crunchy-bridge-db-credentials-vmml2 // name of secret contains username and password\n```\n## Links\n\n* [Operator SDK](https://github.com/operator-framework/operator-sdk)\n* [DBaaS Operator](https://github.com/RHEcosystemAppEng/dbaas-operator)\n* [API Reference](https://docs.crunchybridge.com/api/getting_started)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrunchydata%2Fcrunchy-bridge-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrunchydata%2Fcrunchy-bridge-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrunchydata%2Fcrunchy-bridge-operator/lists"}