controller

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: Apache-2.0, MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Type is the type of Extension resource.
	Type = "shoot-fleet-agent"
	// ControllerName is the name of the shoot fleet agent service controller.
	ControllerName = "shoot_fleet_agent"
	// FinalizerSuffix is the finalizer suffix for the shoot fleet agent service controller.
	FinalizerSuffix = "shoot-fleet-agent"
)
View Source
const ActuatorName = "shoot-fleet-agent-actuator"

ActuatorName is the name of the Fleet agent actuator.

View Source
const DefaultConfigKey = "default"

DefaultConfigKey is the name of default config key.

View Source
const KubeconfigKey = "kubeconfig"

KubeconfigKey key in KubeconfigSecretName secret that holds kubeconfig for Shoot

View Source
const KubeconfigSecretName = "kubecfg"

KubeconfigSecretName name of secret that holds kubeconfig for Shoot

Variables

View Source
var (
	// DefaultAddOptions are the default AddOptions for AddToManager.
	DefaultAddOptions = AddOptions{}
)

Functions

func AddToManager

func AddToManager(mgr manager.Manager) error

AddToManager adds a controller with the default Options to the given Controller Manager.

func AddToManagerWithOptions

func AddToManagerWithOptions(mgr manager.Manager, opts controller.Options, config controllerconfig.Config) error

AddToManagerWithOptions adds a controller with the given Options to the given manager. The opts.Reconciler is being set with a newly instantiated actuator.

func NewActuator

func NewActuator(config config.Config) extension.Actuator

NewActuator returns an actuator responsible for Extension resources.

Types

type AddOptions

type AddOptions struct {
	// ControllerOptions contains options for the controller.
	ControllerOptions controller.Options
	// ServiceConfig contains configuration for the shoot fleet agent service.
	ServiceConfig controllerconfig.Config
	// IgnoreOperationAnnotation specifies whether to ignore the operation annotation or not.
	IgnoreOperationAnnotation bool
}

AddOptions are options to apply when adding the shoot fleet agent service controller to the manager.

type FleetManager

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

FleetManager serves as main communication point with external Fleet Manager

func NewManagerForConfig

func NewManagerForConfig(c *rest.Config, namespace string) (*FleetManager, error)

NewManagerForConfig constructs new manager with given config operating in given namespace

func (*FleetManager) CreateCluster

func (f *FleetManager) CreateCluster(ctx context.Context, cluster *v1alpha1.Cluster) (*v1alpha1.Cluster, error)

CreateCluster registers a cluster in remote fleet

func (*FleetManager) CreateKubeconfigSecret

func (f *FleetManager) CreateKubeconfigSecret(ctx context.Context, secret *corev1.Secret) (*corev1.Secret, error)

CreateKubeconfigSecret registers a clusters kubeconfig secret in remote fleet

func (*FleetManager) DeleteCluster

func (f *FleetManager) DeleteCluster(ctx context.Context, clusterName string) error

DeleteCluster deletes a cluster registration in remote fleet

func (*FleetManager) DeleteKubeconfigSecret

func (f *FleetManager) DeleteKubeconfigSecret(ctx context.Context, secretName string) error

DeleteKubeconfigSecret deletes a clusters kubeconfig secret in remote fleet

func (*FleetManager) GetCluster

func (f *FleetManager) GetCluster(ctx context.Context, clusterName string) (*v1alpha1.Cluster, error)

GetCluster gets a cluster registration from remote fleet

func (*FleetManager) UpdateCluster

func (f *FleetManager) UpdateCluster(ctx context.Context, cluster *v1alpha1.Cluster) (*v1alpha1.Cluster, error)

UpdateCluster updates a cluster registration in remote fleet

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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