v1alpha2

package
v0.35.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha2 contains API Schema definitions for the dhcp v1alpha2 API group. It is the primary internal API group for the intended Hedgehog DHCP server configuration and storing leases as well as making them available to the end user through API. Not intended to be modified by the user. +kubebuilder:object:generate=true +groupName=dhcp.githedgehog.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "dhcp.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
)

Functions

This section is empty.

Types

type DHCPAllocated

type DHCPAllocated struct {
	// Allocated IP address
	IP string `json:"ip"`
	// Expiry time of the lease
	Expiry metav1.Time `json:"expiry"`
	// Hostname from DHCP request
	Hostname string `json:"hostname"`
}

DHCPAllocated is a single allocated IP with expiry time and hostname from DHCP requests, it's effectively a DHCP lease

func (*DHCPAllocated) DeepCopy

func (in *DHCPAllocated) DeepCopy() *DHCPAllocated

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

func (*DHCPAllocated) DeepCopyInto

func (in *DHCPAllocated) DeepCopyInto(out *DHCPAllocated)

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

type DHCPSubnet

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

	// Spec is the desired state of the DHCPSubnet
	Spec DHCPSubnetSpec `json:"spec,omitempty"`
	// Status is the observed state of the DHCPSubnet
	Status DHCPSubnetStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;fabric,shortName=dhcp +kubebuilder:printcolumn:name="Subnet",type=string,JSONPath=`.spec.subnet`,priority=0 +kubebuilder:printcolumn:name="CIDRBlock",type=string,JSONPath=`.spec.cidrBlock`,priority=0 +kubebuilder:printcolumn:name="Gateway",type=string,JSONPath=`.spec.gateway`,priority=0 +kubebuilder:printcolumn:name="StartIP",type=string,JSONPath=`.spec.startIP`,priority=0 +kubebuilder:printcolumn:name="EndIP",type=string,JSONPath=`.spec.endIP`,priority=0 +kubebuilder:printcolumn:name="VRF",type=string,JSONPath=`.spec.vrf`,priority=1 +kubebuilder:printcolumn:name="CircuitID",type=string,JSONPath=`.spec.circuitID`,priority=1 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 DHCPSubnet is the configuration (spec) for the Hedgehog DHCP server and storage for the leases (status). It's primary internal API group, but it makes allocated IPs / leases information available to the end user through API. Not intended to be modified by the user.

func (*DHCPSubnet) DeepCopy

func (in *DHCPSubnet) DeepCopy() *DHCPSubnet

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

func (*DHCPSubnet) DeepCopyInto

func (in *DHCPSubnet) DeepCopyInto(out *DHCPSubnet)

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

func (*DHCPSubnet) DeepCopyObject

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

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

type DHCPSubnetList

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

DHCPSubnetList contains a list of DHCPSubnet

func (*DHCPSubnetList) DeepCopy

func (in *DHCPSubnetList) DeepCopy() *DHCPSubnetList

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

func (*DHCPSubnetList) DeepCopyInto

func (in *DHCPSubnetList) DeepCopyInto(out *DHCPSubnetList)

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

func (*DHCPSubnetList) DeepCopyObject

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

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

type DHCPSubnetSpec

type DHCPSubnetSpec struct {
	// Full VPC subnet name (including VPC name), such as "vpc-0/default"
	Subnet string `json:"subnet"`
	// CIDR block to use for VPC subnet, such as "10.10.10.0/24"
	CIDRBlock string `json:"cidrBlock"`
	// Gateway, such as 10.10.10.1
	Gateway string `json:"gateway"`
	// Start IP from the CIDRBlock to allocate IPs, such as 10.10.10.10
	StartIP string `json:"startIP"`
	// End IP from the CIDRBlock to allocate IPs, such as 10.10.10.99
	EndIP string `json:"endIP"`
	// VRF name to identify specific VPC (will be added to DHCP packets by DHCP relay in suboption 151), such as "VrfVvpc-1" as it's named on switch
	VRF string `json:"vrf"`
	// VLAN ID to identify specific subnet withing the VPC, such as "Vlan1000" as it's named on switch
	CircuitID string `json:"circuitID"`
	// 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"`
}

DHCPSubnetSpec defines the desired state of DHCPSubnet

func (*DHCPSubnetSpec) DeepCopy

func (in *DHCPSubnetSpec) DeepCopy() *DHCPSubnetSpec

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

func (*DHCPSubnetSpec) DeepCopyInto

func (in *DHCPSubnetSpec) DeepCopyInto(out *DHCPSubnetSpec)

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

type DHCPSubnetStatus

type DHCPSubnetStatus struct {
	// Allocated is a map of allocated IPs with expiry time and hostname from DHCP requests
	Allocated map[string]DHCPAllocated `json:"allocated,omitempty"`
}

DHCPSubnetStatus defines the observed state of DHCPSubnet

func (*DHCPSubnetStatus) DeepCopy

func (in *DHCPSubnetStatus) DeepCopy() *DHCPSubnetStatus

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

func (*DHCPSubnetStatus) DeepCopyInto

func (in *DHCPSubnetStatus) DeepCopyInto(out *DHCPSubnetStatus)

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