infraflow

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0, MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultVPCRoutingConfigRegional is a constant for VPC Routing configuration option that enables regional routing.
	DefaultVPCRoutingConfigRegional = "REGIONAL"
	// DefaultAggregationInterval is the default value for the aggregation interval.
	DefaultAggregationInterval = "INTERVAL_5_MIN"
	// DefaultFlowSampling is the default value for the flow sampling.
	DefaultFlowSampling = 0.5
	// DefaultMetadata is the default value for the Flow Logs metadata.
	DefaultMetadata = "EXCLUDE_ALL_METADATA"
)
View Source
const (
	// ObjectKeyServiceAccount is the key to store the service account object.
	ObjectKeyServiceAccount = "service-account"
	// ObjectKeyVPC is the key to store the VPC object.
	ObjectKeyVPC = "vpc"
	// ObjectKeyNodeSubnet is the key to store the nodes subnet object.
	ObjectKeyNodeSubnet = "subnet-nodes"
	// ObjectKeyInternalSubnet is the key to store the internal subnet object.
	ObjectKeyInternalSubnet = "subnet-internal"
	// ObjectKeyRouter router is the key for the CloudRouter.
	ObjectKeyRouter = "router"
	// ObjectKeyNAT is the key for the .CloudNAT object.
	ObjectKeyNAT = "nat"
	// ObjectKeyIPAddress is the key for the IP Address slice.
	ObjectKeyIPAddress = "addresses/ip"
)
View Source
const (
	// FlowStateKind is the kind used for the FlowState type.
	FlowStateKind = "FlowState"
)

Variables

View Source
var (
	// SchemeGroupVersion is the SchemeGroupVersion for use with the FlowState object.
	SchemeGroupVersion = v1alpha1.SchemeGroupVersion
)

Functions

func GetObject

func GetObject[T any](wb shared.Whiteboard, key string) T

GetObject returns the object and attempts to cast it to the specified type.

func IsJSONFlowState

func IsJSONFlowState(raw []byte) (bool, error)

IsJSONFlowState returns true if the provided JSON is a valid FlowState

Types

type FlowReconciler

type FlowReconciler struct {
	*shared.BasicFlowContext
	// contains filtered or unexported fields
}

FlowReconciler is capable of reconciling and deleting the infrastructure for a shoot.

func NewFlowReconciler

func NewFlowReconciler(
	ctx context.Context,
	log logr.Logger,
	infra *extensionsv1alpha1.Infrastructure,
	cluster *controller.Cluster,
	c client.Client,
) (*FlowReconciler, error)

NewFlowReconciler returns a new FlowReconciler.

func (*FlowReconciler) Delete

func (c *FlowReconciler) Delete(ctx context.Context) error

Delete is used to destroy the infrastructure.

func (*FlowReconciler) Reconcile

Reconcile reconciles the infrastructure

type FlowState

type FlowState struct {
	metav1.TypeMeta
	Data map[string]string `json:"data"`
}

FlowState stores information about the infrastructure state for use with the FlowReconciler.

func NewFlowState

func NewFlowState() *FlowState

NewFlowState creates a new FlowState object.

func NewFlowStateFromJSON

func NewFlowStateFromJSON(raw []byte) (*FlowState, error)

NewFlowStateFromJSON unmarshals from JSON or YAML. Returns nil if input contains no kind field with value "FlowState".

func (*FlowState) HasValidVersion

func (f *FlowState) HasValidVersion() bool

HasValidVersion checks if flow version is supported.

func (*FlowState) ToJSON

func (f *FlowState) ToJSON() ([]byte, error)

ToJSON marshals state as JSON

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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