controller

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0, MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ActuatorName is only used for the logger instance
	ActuatorName = "acl-actuator"
	// ResourceNameSeed is name of the managedResource object
	ResourceNameSeed = "acl-seed"
	// ChartNameSeed name of the helm chart
	ChartNameSeed = "seed"
	// IngressNamespace is the namespace of the istio
	IngressNamespace = "istio-ingress"
	// HashAnnotationName name of annotation for triggering the envoyfilter webhook
	// DEPRECATED: Remove after annotation has been removed from all EnvoyFilters
	HashAnnotationName = "acl-ext-rule-hash"
	// ImageName is used for the image vector override.
	// This is currently not implemented correctly.
	// TODO implement
	ImageName = "image-name"
)
View Source
const (
	// Type is the type of Extension resource.
	Type = "acl"
)

Variables

View Source
var (
	ErrSpecAction            = errors.New("action must either be 'ALLOW' or 'DENY'")
	ErrSpecRule              = errors.New("rule must be present")
	ErrSpecType              = errors.New("type must either be 'direct_remote_ip', 'remote_ip' or 'source_ip'")
	ErrSpecCIDR              = errors.New("CIDRs must not be empty")
	ErrNoExtensionsFound     = errors.New("could not list any extensions")
	ErrNoAdvertisedAddresses = errors.New("advertised addresses are not available, likely because cluster creation has not yet completed")
)

Error variables for controller pkg

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

Functions

func AddToManager

func AddToManager(ctx context.Context, mgr manager.Manager) error

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

func AddToManagerWithOptions

func AddToManagerWithOptions(ctx context.Context, mgr manager.Manager, opts *AddOptions) 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 HashData

func HashData(data interface{}) (string, error)

HashData returns a 16 char hash for the given object.

func NewActuator

func NewActuator(mgr manager.Manager, cfg config.Config) extension.Actuator

NewActuator returns an actuator responsible for Extension resources.

func ValidateExtensionSpec

func ValidateExtensionSpec(spec *ExtensionSpec) error

ValidateExtensionSpec checks if the ExtensionSpec exists, and if its action, type and CIDRs are valid.

Types

type AddOptions

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

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

type ExtensionSpec

type ExtensionSpec struct {
	// Rule contain the user-defined Access Control Rule
	Rule *envoyfilters.ACLRule `json:"rule"`
}

ExtensionSpec is the content of the ProviderConfig of the acl extension object

type ExtensionState added in v1.0.0

type ExtensionState struct {
	IstioNamespace *string `json:"istioNamespace"`
}

ExtensionState contains the State of the Extension

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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