registrator

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registrator

type Registrator struct {
	// contains filtered or unexported fields
}

Registrator is used to ensure that the agent that will be running on the cluster is fully registered. If the agent is not it will perform an automatic agent registration using the provided client id and client secret credentials.

func New

func New(bcloudApiClient bcloudapi.Client, k8sAPI *k8s.KubernetesAPI, agentMetadataConfigMap string) *Registrator

New creates a new Registrator.

func (*Registrator) EnsureRegistered

func (ar *Registrator) EnsureRegistered(ctx context.Context) (*bcloudapi.AgentInfo, error)

EnsureRegistered performes agent registration if necessary. It inspects the config map containing the agent metadata and decides whether this is a new agent that needs to be registered.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL