v1alpha2

package
v0.35.8 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package v1alpha2 contains API Schema definitions for the vpc v1alpha2 API group. It is public API group for the VPCs and Externals APIs. Intended to be used by the user. +kubebuilder:object:generate=true +groupName=vpc.githedgehog.com

Index

Constants

View Source
const DefaultIPv4Namespace = "default"
View Source
const KindExternalPeering = "ExternalPeering"
View Source
const KindIPv4Namespace = "IPv4Namespace"
View Source
const KindVPC = "VPC"
View Source
const KindVPCAttachment = "VPCAttachment"
View Source
const KindVPCPeering = "VPCPeering"

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "vpc.githedgehog.com", Version: "v1alpha2"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	LabelPrefix          = "fabric.githedgehog.com/"
	LabelVPC             = LabelName("vpc")
	LabelVPC1            = LabelName("vpc1")
	LabelVPC2            = LabelName("vpc2")
	LabelSubnet          = LabelName("subnet")
	LabelIPv4NS          = LabelName("ipv4ns")
	LabelVLANNS          = LabelName("vlanns")
	LabelExternal        = LabelName("external")
	LabelNativeVLAN      = LabelName("nativevlan")
	LabelNativeVLANValue = "true"
	ListLabelValue       = "true"
)

Functions

func LabelName

func LabelName(name string) string

func ListLabel

func ListLabel(listType, val string) string

func ListLabelPrefix

func ListLabelPrefix(listType string) string

func ListLabelVPC

func ListLabelVPC(vpcName string) string

Types

type External

type External struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the desired state of the External
	Spec ExternalSpec `json:"spec,omitempty"`
	// Status is the observed state of the External
	Status ExternalStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;fabric;external,shortName=ext +kubebuilder:printcolumn:name="IPv4NS",type=string,JSONPath=`.spec.ipv4Namespace`,priority=0 +kubebuilder:printcolumn:name="InComm",type=string,JSONPath=`.spec.inboundCommunity`,priority=0 +kubebuilder:printcolumn:name="OutComm",type=string,JSONPath=`.spec.outboundCommunity`,priority=0 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 External object represents an external system connected to the Fabric and available to the specific IPv4Namespace. Users can do external peering with the external system by specifying the name of the External Object without need to worry about the details of how external system is attached to the Fabric.

func (*External) DeepCopy

func (in *External) DeepCopy() *External

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new External.

func (*External) DeepCopyInto

func (in *External) DeepCopyInto(out *External)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*External) DeepCopyObject

func (in *External) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*External) Default

func (external *External) Default()

func (*External) Validate

func (external *External) Validate(ctx context.Context, kube client.Reader, _ *meta.FabricConfig) (admission.Warnings, error)

type ExternalAttachment

type ExternalAttachment struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the desired state of the ExternalAttachment
	Spec ExternalAttachmentSpec `json:"spec,omitempty"`
	// Status is the observed state of the ExternalAttachment
	Status ExternalAttachmentStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;fabric;external,shortName=extattach +kubebuilder:printcolumn:name="External",type=string,JSONPath=`.spec.external`,priority=0 +kubebuilder:printcolumn:name="Connection",type=string,JSONPath=`.spec.connection`,priority=0 +kubebuilder:printcolumn:name="SwVLAN",type=string,JSONPath=`.spec.switch.vlan`,priority=1 +kubebuilder:printcolumn:name="SwIP",type=string,JSONPath=`.spec.switch.ip`,priority=1 +kubebuilder:printcolumn:name="NeighASN",type=string,JSONPath=`.spec.neighbor.asn`,priority=1 +kubebuilder:printcolumn:name="NeighIP",type=string,JSONPath=`.spec.neighbor.ip`,priority=1 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 ExternalAttachment is a definition of how specific switch is connected with external system (External object). Effectively it represents BGP peering between the switch and external system including all needed configuration.

func (*ExternalAttachment) DeepCopy

func (in *ExternalAttachment) DeepCopy() *ExternalAttachment

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAttachment.

func (*ExternalAttachment) DeepCopyInto

func (in *ExternalAttachment) DeepCopyInto(out *ExternalAttachment)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalAttachment) DeepCopyObject

func (in *ExternalAttachment) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ExternalAttachment) Default

func (attach *ExternalAttachment) Default()

func (*ExternalAttachment) Validate

type ExternalAttachmentList

type ExternalAttachmentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ExternalAttachment `json:"items"`
}

ExternalAttachmentList contains a list of ExternalAttachment

func (*ExternalAttachmentList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAttachmentList.

func (*ExternalAttachmentList) DeepCopyInto

func (in *ExternalAttachmentList) DeepCopyInto(out *ExternalAttachmentList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalAttachmentList) DeepCopyObject

func (in *ExternalAttachmentList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ExternalAttachmentList) GetItems added in v0.34.0

func (extAttachList *ExternalAttachmentList) GetItems() []meta.Object

type ExternalAttachmentNeighbor

type ExternalAttachmentNeighbor struct {
	// ASN is the ASN of the BGP neighbor
	ASN uint32 `json:"asn,omitempty"`
	// IP is the IP address of the BGP neighbor to peer with
	IP string `json:"ip,omitempty"`
}

ExternalAttachmentNeighbor defines the BGP neighbor configuration for the external attachment

func (*ExternalAttachmentNeighbor) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAttachmentNeighbor.

func (*ExternalAttachmentNeighbor) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalAttachmentSpec

type ExternalAttachmentSpec struct {
	// External is the name of the External object this attachment belongs to
	External string `json:"external,omitempty"`
	// Connection is the name of the Connection object this attachment belongs to (essentialy the name of the switch/port)
	Connection string `json:"connection,omitempty"`
	// Switch is the switch port configuration for the external attachment
	Switch ExternalAttachmentSwitch `json:"switch,omitempty"`
	// Neighbor is the BGP neighbor configuration for the external attachment
	Neighbor ExternalAttachmentNeighbor `json:"neighbor,omitempty"`
}

ExternalAttachmentSpec defines the desired state of ExternalAttachment

func (*ExternalAttachmentSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAttachmentSpec.

func (*ExternalAttachmentSpec) DeepCopyInto

func (in *ExternalAttachmentSpec) DeepCopyInto(out *ExternalAttachmentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalAttachmentStatus

type ExternalAttachmentStatus struct{}

ExternalAttachmentStatus defines the observed state of ExternalAttachment

func (*ExternalAttachmentStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAttachmentStatus.

func (*ExternalAttachmentStatus) DeepCopyInto

func (in *ExternalAttachmentStatus) DeepCopyInto(out *ExternalAttachmentStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalAttachmentSwitch

type ExternalAttachmentSwitch struct {
	// VLAN is the VLAN ID used for the subinterface on a switch port specified in the connection
	VLAN uint16 `json:"vlan,omitempty"`
	// IP is the IP address of the subinterface on a switch port specified in the connection
	IP string `json:"ip,omitempty"`
}

ExternalAttachmentSwitch defines the switch port configuration for the external attachment

func (*ExternalAttachmentSwitch) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAttachmentSwitch.

func (*ExternalAttachmentSwitch) DeepCopyInto

func (in *ExternalAttachmentSwitch) DeepCopyInto(out *ExternalAttachmentSwitch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalList

type ExternalList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []External `json:"items"`
}

ExternalList contains a list of External

func (*ExternalList) DeepCopy

func (in *ExternalList) DeepCopy() *ExternalList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalList.

func (*ExternalList) DeepCopyInto

func (in *ExternalList) DeepCopyInto(out *ExternalList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalList) DeepCopyObject

func (in *ExternalList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ExternalList) GetItems added in v0.34.0

func (extList *ExternalList) GetItems() []meta.Object

type ExternalPeering

type ExternalPeering struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the desired state of the ExternalPeering
	Spec ExternalPeeringSpec `json:"spec,omitempty"`
	// Status is the observed state of the ExternalPeering
	Status ExternalPeeringStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;fabric;external,shortName=extpeering;extpeer +kubebuilder:printcolumn:name="VPC",type=string,JSONPath=`.spec.permit.vpc.name`,priority=0 +kubebuilder:printcolumn:name="VPCSubnets",type=string,JSONPath=`.spec.permit.vpc.subnets`,priority=1 +kubebuilder:printcolumn:name="External",type=string,JSONPath=`.spec.permit.external.name`,priority=0 +kubebuilder:printcolumn:name="ExtPrefixes",type=string,JSONPath=`.spec.permit.external.prefixes`,priority=1 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 ExternalPeering is the Schema for the externalpeerings API

func (*ExternalPeering) DeepCopy

func (in *ExternalPeering) DeepCopy() *ExternalPeering

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalPeering.

func (*ExternalPeering) DeepCopyInto

func (in *ExternalPeering) DeepCopyInto(out *ExternalPeering)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalPeering) DeepCopyObject

func (in *ExternalPeering) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ExternalPeering) Default

func (peering *ExternalPeering) Default()

func (*ExternalPeering) Validate

func (peering *ExternalPeering) Validate(ctx context.Context, kube client.Reader, _ *meta.FabricConfig) (admission.Warnings, error)

type ExternalPeeringList

type ExternalPeeringList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ExternalPeering `json:"items"`
}

ExternalPeeringList contains a list of ExternalPeering

func (*ExternalPeeringList) DeepCopy

func (in *ExternalPeeringList) DeepCopy() *ExternalPeeringList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalPeeringList.

func (*ExternalPeeringList) DeepCopyInto

func (in *ExternalPeeringList) DeepCopyInto(out *ExternalPeeringList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalPeeringList) DeepCopyObject

func (in *ExternalPeeringList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ExternalPeeringList) GetItems added in v0.34.0

func (peeringList *ExternalPeeringList) GetItems() []meta.Object

type ExternalPeeringSpec

type ExternalPeeringSpec struct {
	// Permit defines the peering policy - which VPC and External to peer with and which subnets/prefixes to permit
	Permit ExternalPeeringSpecPermit `json:"permit,omitempty"`
}

ExternalPeeringSpec defines the desired state of ExternalPeering

func (*ExternalPeeringSpec) DeepCopy

func (in *ExternalPeeringSpec) DeepCopy() *ExternalPeeringSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalPeeringSpec.

func (*ExternalPeeringSpec) DeepCopyInto

func (in *ExternalPeeringSpec) DeepCopyInto(out *ExternalPeeringSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalPeeringSpecExternal

type ExternalPeeringSpecExternal struct {
	// Name is the name of the External to peer with
	Name string `json:"name,omitempty"`
	// Prefixes is the list of prefixes to permit from the External to the VPC
	Prefixes []ExternalPeeringSpecPrefix `json:"prefixes,omitempty"`
}

ExternalPeeringSpecExternal defines the External-side of the configuration to peer with

func (*ExternalPeeringSpecExternal) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalPeeringSpecExternal.

func (*ExternalPeeringSpecExternal) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalPeeringSpecPermit

type ExternalPeeringSpecPermit struct {
	// VPC is the VPC-side of the configuration to peer with
	VPC ExternalPeeringSpecVPC `json:"vpc,omitempty"`
	// External is the External-side of the configuration to peer with
	External ExternalPeeringSpecExternal `json:"external,omitempty"`
}

ExternalPeeringSpecPermit defines the peering policy - which VPC and External to peer with and which subnets/prefixes to permit

func (*ExternalPeeringSpecPermit) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalPeeringSpecPermit.

func (*ExternalPeeringSpecPermit) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalPeeringSpecPrefix

type ExternalPeeringSpecPrefix struct {
	// Prefix is the subnet to permit from the External to the VPC, e.g. 0.0.0.0/0 for any route including default route.
	// It matches any prefix length less than or equal to 32 effectively permitting all prefixes within the specified one.
	Prefix string `json:"prefix,omitempty"`
}

ExternalPeeringSpecPrefix defines the prefix to permit from the External to the VPC

func (*ExternalPeeringSpecPrefix) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalPeeringSpecPrefix.

func (*ExternalPeeringSpecPrefix) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalPeeringSpecVPC

type ExternalPeeringSpecVPC struct {
	// Name is the name of the VPC to peer with
	Name string `json:"name,omitempty"`
	// Subnets is the list of subnets to advertise from VPC to the External
	Subnets []string `json:"subnets,omitempty"`
}

ExternalPeeringSpecVPC defines the VPC-side of the configuration to peer with

func (*ExternalPeeringSpecVPC) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalPeeringSpecVPC.

func (*ExternalPeeringSpecVPC) DeepCopyInto

func (in *ExternalPeeringSpecVPC) DeepCopyInto(out *ExternalPeeringSpecVPC)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalPeeringStatus

type ExternalPeeringStatus struct{}

ExternalPeeringStatus defines the observed state of ExternalPeering

func (*ExternalPeeringStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalPeeringStatus.

func (*ExternalPeeringStatus) DeepCopyInto

func (in *ExternalPeeringStatus) DeepCopyInto(out *ExternalPeeringStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalSpec

type ExternalSpec struct {
	// IPv4Namespace is the name of the IPv4Namespace this External belongs to
	IPv4Namespace string `json:"ipv4Namespace,omitempty"`
	// InboundCommunity is the name of the inbound community to filter routes from the external system
	InboundCommunity string `json:"inboundCommunity,omitempty"`
	// OutboundCommunity is the name of the outbound community that all outbound routes will be stamped with
	OutboundCommunity string `json:"outboundCommunity,omitempty"`
}

ExternalSpec describes IPv4 namespace External belongs to and inbound/outbound communities which are used to filter routes from/to the external system.

func (*ExternalSpec) DeepCopy

func (in *ExternalSpec) DeepCopy() *ExternalSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalSpec.

func (*ExternalSpec) DeepCopyInto

func (in *ExternalSpec) DeepCopyInto(out *ExternalSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalStatus

type ExternalStatus struct{}

ExternalStatus defines the observed state of External

func (*ExternalStatus) DeepCopy

func (in *ExternalStatus) DeepCopy() *ExternalStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalStatus.

func (*ExternalStatus) DeepCopyInto

func (in *ExternalStatus) DeepCopyInto(out *ExternalStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IPv4Namespace

type IPv4Namespace struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the desired state of the IPv4Namespace
	Spec IPv4NamespaceSpec `json:"spec,omitempty"`
	// Status is the observed state of the IPv4Namespace
	Status IPv4NamespaceStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;wiring;fabric,shortName=ipns +kubebuilder:printcolumn:name="Subnets",type=string,JSONPath=`.spec.subnets`,priority=0 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 IPv4Namespace represents a namespace for VPC subnets allocation. All VPC subnets withing a single IPv4Namespace are non-overlapping. Users can create multiple IPv4Namespaces to allocate same VPC subnets.

func (*IPv4Namespace) DeepCopy

func (in *IPv4Namespace) DeepCopy() *IPv4Namespace

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv4Namespace.

func (*IPv4Namespace) DeepCopyInto

func (in *IPv4Namespace) DeepCopyInto(out *IPv4Namespace)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IPv4Namespace) DeepCopyObject

func (in *IPv4Namespace) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*IPv4Namespace) Default

func (ns *IPv4Namespace) Default()

func (*IPv4Namespace) Validate

func (ns *IPv4Namespace) Validate(_ context.Context, _ client.Reader, fabricCfg *meta.FabricConfig) (admission.Warnings, error)

type IPv4NamespaceList

type IPv4NamespaceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []IPv4Namespace `json:"items"`
}

IPv4NamespaceList contains a list of IPv4Namespace

func (*IPv4NamespaceList) DeepCopy

func (in *IPv4NamespaceList) DeepCopy() *IPv4NamespaceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv4NamespaceList.

func (*IPv4NamespaceList) DeepCopyInto

func (in *IPv4NamespaceList) DeepCopyInto(out *IPv4NamespaceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IPv4NamespaceList) DeepCopyObject

func (in *IPv4NamespaceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*IPv4NamespaceList) GetItems added in v0.34.0

func (ipNsList *IPv4NamespaceList) GetItems() []meta.Object

type IPv4NamespaceSpec

type IPv4NamespaceSpec struct {
	//+kubebuilder:validation:MinItems=1
	//+kubebuilder:validation:MaxItems=20
	// Subnets is the list of subnets to allocate VPC subnets from, couldn't overlap between each other and with Fabric reserved subnets
	Subnets []string `json:"subnets,omitempty"`
}

IPv4NamespaceSpec defines the desired state of IPv4Namespace

func (*IPv4NamespaceSpec) DeepCopy

func (in *IPv4NamespaceSpec) DeepCopy() *IPv4NamespaceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv4NamespaceSpec.

func (*IPv4NamespaceSpec) DeepCopyInto

func (in *IPv4NamespaceSpec) DeepCopyInto(out *IPv4NamespaceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IPv4NamespaceSpec) Labels

func (ns *IPv4NamespaceSpec) Labels() map[string]string

type IPv4NamespaceStatus

type IPv4NamespaceStatus struct{}

IPv4NamespaceStatus defines the observed state of IPv4Namespace

func (*IPv4NamespaceStatus) DeepCopy

func (in *IPv4NamespaceStatus) DeepCopy() *IPv4NamespaceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv4NamespaceStatus.

func (*IPv4NamespaceStatus) DeepCopyInto

func (in *IPv4NamespaceStatus) DeepCopyInto(out *IPv4NamespaceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VPC

type VPC struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the desired state of the VPC
	Spec VPCSpec `json:"spec,omitempty"`
	// Status is the observed state of the VPC
	Status VPCStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;fabric +kubebuilder:printcolumn:name="IPv4NS",type=string,JSONPath=`.spec.ipv4Namespace`,priority=0 +kubebuilder:printcolumn:name="VLANNS",type=string,JSONPath=`.spec.vlanNamespace`,priority=0 +kubebuilder:printcolumn:name="Subnets",type=string,JSONPath=`.spec.subnets`,priority=1 +kubebuilder:printcolumn:name="VNI",type=string,JSONPath=`.status.vni`,priority=1 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 VPC is Virtual Private Cloud, similar to the public cloud VPC it provides an isolated private network for the resources with support for multiple subnets each with user-provided VLANs and on-demand DHCP.

func (*VPC) DeepCopy

func (in *VPC) DeepCopy() *VPC

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPC.

func (*VPC) DeepCopyInto

func (in *VPC) DeepCopyInto(out *VPC)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VPC) DeepCopyObject

func (in *VPC) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VPC) Default

func (vpc *VPC) Default()

func (*VPC) Validate

func (vpc *VPC) Validate(ctx context.Context, kube client.Reader, fabricCfg *meta.FabricConfig) (admission.Warnings, error)

type VPCAttachment

type VPCAttachment struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the desired state of the VPCAttachment
	Spec VPCAttachmentSpec `json:"spec,omitempty"`
	// Status is the observed state of the VPCAttachment
	Status VPCAttachmentStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;fabric,shortName=vpcattach +kubebuilder:printcolumn:name="VPCSUBNET",type=string,JSONPath=`.spec.subnet`,priority=0 +kubebuilder:printcolumn:name="Connection",type=string,JSONPath=`.spec.connection`,priority=0 +kubebuilder:printcolumn:name="NativeVLAN",type=string,JSONPath=`.spec.nativeVLAN`,priority=0 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 VPCAttachment is the Schema for the vpcattachments API

func (*VPCAttachment) DeepCopy

func (in *VPCAttachment) DeepCopy() *VPCAttachment

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCAttachment.

func (*VPCAttachment) DeepCopyInto

func (in *VPCAttachment) DeepCopyInto(out *VPCAttachment)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VPCAttachment) DeepCopyObject

func (in *VPCAttachment) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VPCAttachment) Default

func (attach *VPCAttachment) Default()

func (*VPCAttachment) Validate

func (attach *VPCAttachment) Validate(ctx context.Context, kube client.Reader, _ *meta.FabricConfig) (admission.Warnings, error)

type VPCAttachmentList

type VPCAttachmentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VPCAttachment `json:"items"`
}

VPCAttachmentList contains a list of VPCAttachment

func (*VPCAttachmentList) DeepCopy

func (in *VPCAttachmentList) DeepCopy() *VPCAttachmentList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCAttachmentList.

func (*VPCAttachmentList) DeepCopyInto

func (in *VPCAttachmentList) DeepCopyInto(out *VPCAttachmentList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VPCAttachmentList) DeepCopyObject

func (in *VPCAttachmentList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VPCAttachmentList) GetItems added in v0.34.0

func (attachList *VPCAttachmentList) GetItems() []meta.Object

type VPCAttachmentSpec

type VPCAttachmentSpec struct {
	// Subnet is the full name of the VPC subnet to attach to, such as "vpc-1/default"
	Subnet string `json:"subnet,omitempty"`
	// Connection is the name of the connection to attach to the VPC
	Connection string `json:"connection,omitempty"`
	// NativeVLAN is the flag to indicate if the native VLAN should be used for attaching the VPC subnet
	NativeVLAN bool `json:"nativeVLAN,omitempty"`
}

VPCAttachmentSpec defines the desired state of VPCAttachment

func (*VPCAttachmentSpec) DeepCopy

func (in *VPCAttachmentSpec) DeepCopy() *VPCAttachmentSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCAttachmentSpec.

func (*VPCAttachmentSpec) DeepCopyInto

func (in *VPCAttachmentSpec) DeepCopyInto(out *VPCAttachmentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VPCAttachmentSpec) Labels

func (s *VPCAttachmentSpec) Labels() map[string]string

func (*VPCAttachmentSpec) SubnetName

func (s *VPCAttachmentSpec) SubnetName() string

func (*VPCAttachmentSpec) VPCName

func (s *VPCAttachmentSpec) VPCName() string

type VPCAttachmentStatus

type VPCAttachmentStatus struct{}

VPCAttachmentStatus defines the observed state of VPCAttachment

func (*VPCAttachmentStatus) DeepCopy

func (in *VPCAttachmentStatus) DeepCopy() *VPCAttachmentStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCAttachmentStatus.

func (*VPCAttachmentStatus) DeepCopyInto

func (in *VPCAttachmentStatus) DeepCopyInto(out *VPCAttachmentStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VPCDHCP

type VPCDHCP struct {
	// Relay is the DHCP relay IP address, if specified, DHCP server will be disabled
	Relay string `json:"relay,omitempty"`
	// Enable enables DHCP server for the subnet
	Enable bool `json:"enable,omitempty"`
	// Range (optional) is the DHCP range for the subnet if DHCP server is enabled
	Range *VPCDHCPRange `json:"range,omitempty"`
	// PXEURL (optional) to identify the pxe server to use to boot hosts connected to this segment such as http://10.10.10.99/bootfilename or tftp://10.10.10.99/bootfilename, http query strings are not supported
	PXEURL string `json:"pxeURL,omitempty"`
}

VPCDHCP defines the on-demand DHCP configuration for the subnet

func (*VPCDHCP) DeepCopy

func (in *VPCDHCP) DeepCopy() *VPCDHCP

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCDHCP.

func (*VPCDHCP) DeepCopyInto

func (in *VPCDHCP) DeepCopyInto(out *VPCDHCP)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VPCDHCPRange

type VPCDHCPRange struct {
	// Start is the start IP address of the DHCP range
	Start string `json:"start,omitempty"`
	// End is the end IP address of the DHCP range
	End string `json:"end,omitempty"`
}

VPCDHCPRange defines the DHCP range for the subnet if DHCP server is enabled

func (*VPCDHCPRange) DeepCopy

func (in *VPCDHCPRange) DeepCopy() *VPCDHCPRange

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCDHCPRange.

func (*VPCDHCPRange) DeepCopyInto

func (in *VPCDHCPRange) DeepCopyInto(out *VPCDHCPRange)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VPCList

type VPCList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VPC `json:"items"`
}

VPCList contains a list of VPC

func (*VPCList) DeepCopy

func (in *VPCList) DeepCopy() *VPCList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCList.

func (*VPCList) DeepCopyInto

func (in *VPCList) DeepCopyInto(out *VPCList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VPCList) DeepCopyObject

func (in *VPCList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VPCList) GetItems added in v0.34.0

func (vpcList *VPCList) GetItems() []meta.Object

type VPCPeer

type VPCPeer struct {
	//+kubebuilder:validation:MinItems=1
	//+kubebuilder:validation:MaxItems=10
	// Subnets is the list of subnets to advertise from current VPC to the peer VPC
	Subnets []string `json:"subnets,omitempty"`
}

func (*VPCPeer) DeepCopy

func (in *VPCPeer) DeepCopy() *VPCPeer

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCPeer.

func (*VPCPeer) DeepCopyInto

func (in *VPCPeer) DeepCopyInto(out *VPCPeer)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VPCPeering

type VPCPeering struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the desired state of the VPCPeering
	Spec VPCPeeringSpec `json:"spec,omitempty"`
	// Status is the observed state of the VPCPeering
	Status VPCPeeringStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;fabric,shortName=vpcpeer +kubebuilder:printcolumn:name="VPC1",type=string,JSONPath=`.metadata.labels.fabric\.githedgehog\.com/vpc1`,priority=0 +kubebuilder:printcolumn:name="VPC2",type=string,JSONPath=`.metadata.labels.fabric\.githedgehog\.com/vpc2`,priority=0 +kubebuilder:printcolumn:name="Remote",type=string,JSONPath=`.spec.remote`,priority=0 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 VPCPeering represents a peering between two VPCs with corresponding filtering rules. Minimal example of the VPC peering showing vpc-1 to vpc-2 peering with all subnets allowed:

spec:
  permit:
  - vpc-1: {}
    vpc-2: {}

func (*VPCPeering) DeepCopy

func (in *VPCPeering) DeepCopy() *VPCPeering

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCPeering.

func (*VPCPeering) DeepCopyInto

func (in *VPCPeering) DeepCopyInto(out *VPCPeering)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VPCPeering) DeepCopyObject

func (in *VPCPeering) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VPCPeering) Default

func (peering *VPCPeering) Default()

func (*VPCPeering) Validate

func (peering *VPCPeering) Validate(ctx context.Context, kube client.Reader, fabricCfg *meta.FabricConfig) (admission.Warnings, error)

type VPCPeeringList

type VPCPeeringList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VPCPeering `json:"items"`
}

VPCPeeringList contains a list of VPCPeering

func (*VPCPeeringList) DeepCopy

func (in *VPCPeeringList) DeepCopy() *VPCPeeringList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCPeeringList.

func (*VPCPeeringList) DeepCopyInto

func (in *VPCPeeringList) DeepCopyInto(out *VPCPeeringList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VPCPeeringList) DeepCopyObject

func (in *VPCPeeringList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VPCPeeringList) GetItems added in v0.34.0

func (peeringList *VPCPeeringList) GetItems() []meta.Object

type VPCPeeringSpec

type VPCPeeringSpec struct {
	Remote string `json:"remote,omitempty"`
	//+kubebuilder:validation:MinItems=1
	//+kubebuilder:validation:MaxItems=10
	// Permit defines a list of the peering policies - which VPC subnets will have access to the peer VPC subnets.
	Permit []map[string]VPCPeer `json:"permit,omitempty"`
}

VPCPeeringSpec defines the desired state of VPCPeering

func (*VPCPeeringSpec) DeepCopy

func (in *VPCPeeringSpec) DeepCopy() *VPCPeeringSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCPeeringSpec.

func (*VPCPeeringSpec) DeepCopyInto

func (in *VPCPeeringSpec) DeepCopyInto(out *VPCPeeringSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VPCPeeringSpec) VPCs

func (s *VPCPeeringSpec) VPCs() (string, string, error)

type VPCPeeringStatus

type VPCPeeringStatus struct{}

VPCPeeringStatus defines the observed state of VPCPeering

func (*VPCPeeringStatus) DeepCopy

func (in *VPCPeeringStatus) DeepCopy() *VPCPeeringStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCPeeringStatus.

func (*VPCPeeringStatus) DeepCopyInto

func (in *VPCPeeringStatus) DeepCopyInto(out *VPCPeeringStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VPCSpec

type VPCSpec struct {
	// Subnets is the list of VPC subnets to configure
	Subnets map[string]*VPCSubnet `json:"subnets,omitempty"`
	// IPv4Namespace is the name of the IPv4Namespace this VPC belongs to (if not specified, "default" is used)
	IPv4Namespace string `json:"ipv4Namespace,omitempty"`
	// VLANNamespace is the name of the VLANNamespace this VPC belongs to (if not specified, "default" is used)
	VLANNamespace string `json:"vlanNamespace,omitempty"`
	// DefaultIsolated sets default bahivour for isolated mode for the subnets (disabled by default)
	DefaultIsolated bool `json:"defaultIsolated,omitempty"`
	// DefaultRestricted sets default bahivour for restricted mode for the subnets (disabled by default)
	DefaultRestricted bool `json:"defaultRestricted,omitempty"`
	// Permit defines a list of the access policies between the subnets within the VPC - each policy is a list of subnets that have access to each other.
	// It's applied on top of the subnet isolation flag and if subnet isn't isolated it's not required to have it in a permit list while if vpc is marked
	// as isolated it's required to have it in a permit list to have access to other subnets.
	Permit [][]string `json:"permit,omitempty"`
	// StaticRoutes is the list of additional static routes for the VPC
	StaticRoutes []VPCStaticRoute `json:"staticRoutes,omitempty"`
}

VPCSpec defines the desired state of VPC. At least one subnet is required.

func (*VPCSpec) DeepCopy

func (in *VPCSpec) DeepCopy() *VPCSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCSpec.

func (*VPCSpec) DeepCopyInto

func (in *VPCSpec) DeepCopyInto(out *VPCSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VPCSpec) IsSubnetIsolated

func (vpc *VPCSpec) IsSubnetIsolated(subnetName string) bool

func (*VPCSpec) IsSubnetRestricted

func (vpc *VPCSpec) IsSubnetRestricted(subnetName string) bool

type VPCStaticRoute added in v0.35.5

type VPCStaticRoute struct {
	// Prefix for the static route (mandatory), e.g. 10.42.0.0/24
	Prefix string `json:"prefix,omitempty"`
	// NextHops for the static route (at least one is required), e.g. 10.99.0.0
	NextHops []string `json:"nextHops,omitempty"`
}

VPCStaticRoute defines the static route for the VPC

func (*VPCStaticRoute) DeepCopy added in v0.35.5

func (in *VPCStaticRoute) DeepCopy() *VPCStaticRoute

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCStaticRoute.

func (*VPCStaticRoute) DeepCopyInto added in v0.35.5

func (in *VPCStaticRoute) DeepCopyInto(out *VPCStaticRoute)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VPCStatus

type VPCStatus struct{}

VPCStatus defines the observed state of VPC

func (*VPCStatus) DeepCopy

func (in *VPCStatus) DeepCopy() *VPCStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCStatus.

func (*VPCStatus) DeepCopyInto

func (in *VPCStatus) DeepCopyInto(out *VPCStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VPCSubnet

type VPCSubnet struct {
	// Subnet is the subnet CIDR block, such as "10.0.0.0/24", should belong to the IPv4Namespace and be unique within the namespace
	Subnet string `json:"subnet,omitempty"`
	// DHCP is the on-demand DHCP configuration for the subnet
	DHCP VPCDHCP `json:"dhcp,omitempty"`
	// VLAN is the VLAN ID for the subnet, should belong to the VLANNamespace and be unique within the namespace
	VLAN string `json:"vlan,omitempty"`
	// Isolated is the flag to enable isolated mode for the subnet which means no access to and from the other subnets within the VPC
	Isolated *bool `json:"isolated,omitempty"`
	// Restricted is the flag to enable restricted mode for the subnet which means no access between hosts within the subnet itself
	Restricted *bool `json:"restricted,omitempty"`
}

VPCSubnet defines the VPC subnet configuration

func (*VPCSubnet) DeepCopy

func (in *VPCSubnet) DeepCopy() *VPCSubnet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCSubnet.

func (*VPCSubnet) DeepCopyInto

func (in *VPCSubnet) DeepCopyInto(out *VPCSubnet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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