Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Extension Registration

Overview

Extensions need to be registered with the agent. There are multiple ways to do that:

Kubernetes Auto Registration

The agent is looking for services and pods with an annotation steadybit.com/extension-auto-registration. These annotations are already added to our extensions if you use our official Helm charts.

Permissions

In order to automatically discover and register extensions present in the Kubernetes cluster, the agent needs access to pod and service definitions via the Kubernetes API.

Appropriate permissions are already configured in the official Helm charts by creating a (cluster) role granting get, list and watch on pods and services and a corresponding (cluster) role binding to a service account used for the agent pod. The used rules property is listed below.

rules:
  - apiGroups: [ "" ]
    resources:
      - "services"
      - "pods"
    verbs: [ "get", "list", "watch" ]

Kubernetes Auto Registration fine-tuning

If you want to fine-tune the auto registration, you can configure the mechanism to:

  • include only extension pods matching a given label selector

  • exclude extension pods matching a given label selector

  • include only extensions from a specific namespace

Using Environment Variables

You can specify environment variables via agent.env files or directly via the command line.

Please note that these environment variables are index-based (referred to as n) to register multiple extension instances.

Valid types are:

Environment Variable (n refers to the index of the extension's instance) (type refers to the type of the extension's endpoint)

Required

Description

STEADYBIT_AGENT_type_EXTENSIONS_n_URL

yes

Fully-qualified URL of the endpoint, e.g., http://my-extension.steadybit-extension.svc.cluster.local:8080/actions

STEADYBIT_AGENT_type_EXTENSIONS_n_METHOD

Optional HTTP method to use. Default: GET

STEADYBIT_AGENT_type_EXTENSIONS_n_BASIC_USERNAME

Optional basic authentication username to use within HTTP requests.

STEADYBIT_AGENT_type_EXTENSIONS_n_BASIC_PASSWORD

Optional basic authentication password to use within HTTP requests.

Example: To register, e.g., two ACTION extensions, where the second one requires basic authentication, you use

  • STEADYBIT_AGENT_ACTIONS_EXTENSIONS_0_URL,

  • STEADYBIT_AGENT_ACTIONS_EXTENSIONS_1_URL,

  • STEADYBIT_AGENT_ACTIONS_EXTENSIONS_1_BASIC_USERNAME and

  • STEADYBIT_AGENT_ACTIONS_EXTENSIONS_1_BASIC_PASSWORD.

You can also register extensions without specifying the type, e.g., STEADYBIT_AGENT_EXTENSIONS_REGISTRATIONS_0_URL. In this case, the agent will try all known types.

Environment Variable (n refers to the index of the extension's instance)

Required

Description

STEADYBIT_AGENT_EXTENSIONS_REGISTRATIONS_n_URL

yes

Fully-qualified URL of the endpoint, e.g., http://my-extension.steadybit-extension.svc.cluster.local:8080/actions

STEADYBIT_AGENT_EXTENSIONS_REGISTRATIONS_n_METHOD

Optional HTTP method to use. Default: GET

STEADYBIT_AGENT_EXTENSIONS_REGISTRATIONS_n_BASIC_USERNAME

Optional basic authentication username to use within HTTP requests.

STEADYBIT_AGENT_EXTENSIONS_REGISTRATIONS_n_BASIC_PASSWORD

Optional basic authentication password to use within HTTP requests.

Using Configuration Files

Linux package installations use this approach by default. The extensions' package installer writes configuration files to /etc/steadybit/extensions.d/extension-*.yaml which are read by the agent.

The content of each file is a YAML document with the following structure:

Using the Agent API

You can also register extensions via the Agent API.

Extension registrations are persisted using the configured persistence provider. With each agent restart, the agent will re-register these manual extension registrations.

You can find detailed information about the agent API in the Agent API documentation.

Example:

POST http://localhost:42899/extensions

Verify registered extensions

To check which extensions are registered in the agent, you need to take a look at the agent's logs.

Example output:

Last updated

Was this helpful?