addon

package
v0.13.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PolicyAddonPauseAnnotation = "policy-addon-pause"
	PolicyLogLevelAnnotation   = "log-level"
)

Variables

View Source
var Scheme = runtime.NewScheme()

Functions

func GetAndAddAgent

func GetAndAddAgent(
	ctx context.Context,
	mgr addonmanager.AddonManager,
	addonName string,
	controllerContext *controllercmd.ControllerContext,
	getAgent func(*controllercmd.ControllerContext) (agent.AgentAddon, error),
) error

func GetLogLevel

func GetLogLevel(component string, level string) int8

getLogLevel verifies the user-provided log level against Zap, returning 0 if the check fails.

func IsOldKubernetes added in v0.11.0

func IsOldKubernetes(cluster *clusterv1.ManagedCluster) bool

IsOldKubernetes returns a boolean for whether a cluster is running an older Kubernetes that doesn't support current leader election methods.

func NewRegistrationOption

func NewRegistrationOption(
	controllerContext *controllercmd.ControllerContext,
	addonName string,
	agentPermissionFiles []string,
	filesystem embed.FS,
) *agent.RegistrationOption

Types

type GlobalValues

type GlobalValues struct {
	ImagePullPolicy string            `json:"imagePullPolicy,"`
	ImagePullSecret string            `json:"imagePullSecret"`
	ImageOverrides  map[string]string `json:"imageOverrides,"`
	ProxyConfig     map[string]string `json:"proxyConfig,"`
}

type PolicyAgentAddon

type PolicyAgentAddon struct {
	agent.AgentAddon
	// contains filtered or unexported fields
}

PolicyAgentAddon wraps the AgentAddon created from the addonfactory to override some behavior

func (*PolicyAgentAddon) Manifests

type UserArgs

type UserArgs struct {
	LogEncoder  string `json:"logEncoder,omitempty"`
	LogLevel    int8   `json:"logLevel,omitempty"`
	PkgLogLevel int8   `json:"pkgLogLevel,omitempty"`
}

type UserValues

type UserValues struct {
	GlobalValues GlobalValues `json:"global,"`
	UserArgs     UserArgs     `json:"args,"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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