addon

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 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 CommonAgentInstallNamespaceFromDeploymentConfigFunc added in v0.14.0

func CommonAgentInstallNamespaceFromDeploymentConfigFunc(
	adcgetter utils.AddOnDeploymentConfigGetter,
) func(*addonapiv1alpha1.ManagedClusterAddOn) (string, error)

func GetAndAddAgent

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

func GetClusterVendor added in v0.15.0

func GetClusterVendor(cluster *clusterv1.ManagedCluster) string

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 GetManagedClusterClient added in v0.14.0

func GetManagedClusterClient(ctx context.Context, kubeConfig *rest.Config) (*clusterv1client.Clientset, error)

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
}

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