Connections

Meshery Connections are managed and unmanaged resources that either through discovery or manual entry are tracked by Meshery. Connections can be assigned as resources to an Environment.

States and the Lifecycle of Connections

Meshery tracks the status of each connections throughout the connection’s lifecycle. Meshery is intentional about the currently assigned state and which state a connection may or may not transition to and from. To better understand connection states and their meaning, let’s consider an example in which you a Kubernetes cluster with Prometheus installed.

States for Kubernetes Cluster Connections

State: Discovered

All resources discovered by MeshSync’s multi-tier discovery or provided as part of config, and if Meshery can integrate, a connection with state as Discovered will be created. Though, the connection/resources are not tested for its reachability/usability i.e. Meshery has not made an attempt to connect or manage the connection.

When a connection has been discovered, it will be listed in the MeshSync browser / Connections table in Meshery UI. You can self transition a particular connection to Register / Ignore state.

Example: MeshSync discovers Prometheus components and inform Meshery Server about available Prometheus connection, but Meshery is yet to connect and start scraping metrics.

State: Registered

The connection in this state have been verified for its use and reachability but not yet being used. Almost all reachable connections will auto transition to Registered state from Discovered state and it is upto the user what to do with this connection (i.e. User needs to administratively process the connection). It can be transitioned to Connected, Maintenance and Not Found.

Example: User manually selects the registered Prometheus connection and transition to the connected state (i.e. User administratively processes the connection).

State: Connected

The connection in this state is administratively processed and being actively managed by Meshery. User can interface and invoke set of actions with the connection.
From this state the transition can happen to either Maintenance or Ignore state.
Auto transition to Disconnected state will occur if Meshery can no longer communicate with the connection, which can occur due to connectivity issue/AuthN-AuthZ/connection was deleted outside Meshery or any other issue.

Example: Meshery is communicating with Prometheus APIs to scrape metrics and present it in the UI.

Certain connections can auto-transition to connected state.

State: Ignored

The connection is administratively processed to be ignored from Meshery’s view of management. Meshery will not re-discover this connection even when current user session gets expired.

Example: Meshery server will stop/not scrape metrics from Prometheus. Though, the previous data (if connected previously) will continue to exist and user needs to manually delete.

State: Maintenance

The connection is administratively processed to be offline for maintenance tasks. This is different from being Disconnected/Ignored.

State: Disconnected

The connection was previously discovered/registered/connected but is not available currently. This could happen due to connectivity issue/AuthN-AuthZ/connection was deleted outside meshery/administratively disconnected.

Example: Prometheus crashed/API token provided at time of registration is revoked.

State: Deleted

The connection is administratively processed to be deleted and removed from Meshery’s view of management. All the available/collected data will also be deleted.

Example: Prometheus metrics will no longer be accessible to you from the Meshery UI.

State: Not Found

User tried registering the connection manually but Meshery could not connect to it or if the connection is unavailable now. User can delete the connection or try re-registering.

Connections like Registration of Meshery server with remote provider (and few other connection types) can self transtion to the valid states.

Registering Connections with Remote Providers

To register a connection with a remote provider, you need to follow these steps:

  1. Obtain the necessary credentials or access tokens from the remote provider.
  2. Open the Meshery UI and navigate to the Connections page.
  3. Click on the “Add Connection” button.
  4. Fill in the required information, such as the provider type, name, and credentials.
  5. Click on the “Register” button to register the connection.

Once the connection is registered, Meshery will verify its reachability and usability. If successful, the connection will transition to the “Registered” state. From there, you can choose to administratively process the connection and transition it to the “Connected” state.

Note that some connections, such as the registration of Meshery server with remote providers, can self-transition to valid states.

For more information on the different states and the lifecycle of connections, refer to the documentation above.

Meshery Server Registration with Remote Providers

Meshery supports different kinds of connections, and each handles transitions between their statuses differently.