agent

package
v0.5.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package agent builds manifests for creating a managed fleet-agent. (fleetcontroller)

Index

Constants

View Source
const (
	DefaultName = "fleet-agent"
)

Variables

View Source
var (
	DebugLevel = 0
)
View Source
var (
	ErrNoHostInConfig = errors.New("failed to find cluster server parameter")
)

Functions

func AgentWithConfig added in v0.5.0

func AgentWithConfig(ctx context.Context, agentNamespace, controllerNamespace, agentScope string, cg *client.Getter, output io.Writer, tokenName string, opts *Options) error

AgentWithConfig writes the agent manifest to the given writer. It includes an updated agent token secret from the cluster. It finds or creates the agent config inside a configmap.

This is used when importing a cluster.

func GetCAFromConfig added in v0.5.0

func GetCAFromConfig(rawConfig clientcmdapi.Config) ([]byte, error)

func GetHostFromConfig added in v0.5.0

func GetHostFromConfig(rawConfig clientcmdapi.Config) (string, error)

func Manifest

func Manifest(namespace string, agentScope string, opts ManifestOptions) []runtime.Object

Manifest builds and returns a deployment manifest for the fleet-agent with a cluster role, two service accounts and a network policy

This is called by both, import and manageagent.

Types

type ConfigOptions added in v0.5.0

type ConfigOptions struct {
	Labels   map[string]string
	ClientID string
}

type ManifestOptions added in v0.5.0

type ManifestOptions struct {
	AgentEnvVars          []corev1.EnvVar
	AgentImage            string
	AgentImagePullPolicy  string
	CheckinInterval       string
	Generation            string
	PrivateRepoURL        string
	SystemDefaultRegistry string
}

type Options added in v0.5.0

type Options struct {
	ManifestOptions
	ConfigOptions
	CA   []byte
	Host string
	NoCA bool // unused
}

Jump to

Keyboard shortcuts

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