Bridge

A Bridge is a piece of software that bridges between ConfigHub and live resources in Kubernetes, and other services or systems under management in the future. It translates the ConfigHub Apply, Destroy, Refresh, and Import operations into the correct calls for a given API. It also receives events from the service about in-progress operations as well as resource data and status and passes it back to ConfigHub.

ConfigHub's service supports some built-in bridges, which may be accessed using "server workers", which are indicated in the BridgeWorker API via ProvidedInfo.IsServerWorker. Such a BridgeWorker can be used to create Targets, with ProviderType OCI or ConfigHub. It is currently recommended that you use the built-in OCI bridge to publish configuration to the OCI endpoint.

Experimentally, Bridges can also run inside Workers. Bridges don't need to worry about the specific communications protocol, authentication, connection heartbeating or connection failure handling. The Worker is responsible for this. This protocol is expected to change in the future.

The Worker must run in an environment where the contained Bridges have the necessary access to infrastructure credentials and have network access to the infrastructure control planes they need to communicate with.

For example, if a Worker is hosting a Kubernetes API bridge, then the Bridge must be able to access the relevant Kubernetes API credentials, e.g. via a local kubeconfig file and the targeted Kubernetes API endpoint must be accesible from where the Worker is running. Such a worker would typically run in the Kubernetes cluster, similar to a GitOps Operator.

ConfigHub provides a prebuilt binary executable and container image consisting of a Worker and a number of experimental Bridges, including a Kubernetes API bridge, though it is not as mature as existing GitOps tools. You may implement your own Bridge code and compile it together with the ConfigHub provider Worker component and Bridge components. Currently, Go is the only supported programming language for this kind of customization.