register

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CredName            = "fleet-agent" // same as AgentConfigName
	Kubeconfig          = "kubeconfig"
	Token               = "token"
	Values              = "values"
	DeploymentNamespace = "deploymentNamespace"
	ClusterNamespace    = "clusterNamespace"
	ClusterName         = "clusterName"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentInfo

type AgentInfo struct {
	// ClusterNamespace is the namespace on upstream, e.g. cluster-fleet-ID
	ClusterNamespace string
	ClusterName      string
	ClientConfig     clientcmd.ClientConfig
}

func Get added in v0.10.0

func Get(ctx context.Context, namespace string, cfg *rest.Config) (*AgentInfo, *config.Config, error)

Get a registration token from the local cluster and fail if it does not exist. This does not create a new registration process and only works after registration has been completed.

func Register

func Register(ctx context.Context, namespace string, config *rest.Config) (*AgentInfo, error)

Register creates a fleet-agent secret with the upstream kubeconfig, by running the registration process with the upstream cluster. For the initial registration, the fleet-agent-bootstrap secret must exist on the local cluster.

Jump to

Keyboard shortcuts

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