v1alpha1

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the kubestack v1alpha1 API group +kubebuilder:object:generate=true +groupName=kubestack.nicklasfrahm.dev

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "kubestack.nicklasfrahm.dev", Version: "v1alpha1"}

	// 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 Connection

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

	Spec   ConnectionSpec   `json:"spec,omitempty"`
	Status ConnectionStatus `json:"status,omitempty"`
}

Connection is the Schema for the connections API

func (*Connection) DeepCopy

func (in *Connection) DeepCopy() *Connection

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

func (*Connection) DeepCopyInto

func (in *Connection) DeepCopyInto(out *Connection)

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

func (*Connection) DeepCopyObject

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

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

type ConnectionList

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

ConnectionList contains a list of Connection

func (*ConnectionList) DeepCopy

func (in *ConnectionList) DeepCopy() *ConnectionList

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

func (*ConnectionList) DeepCopyInto

func (in *ConnectionList) DeepCopyInto(out *ConnectionList)

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

func (*ConnectionList) DeepCopyObject

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

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

type ConnectionReference

type ConnectionReference struct {
	// Namespace of the connection.
	Namespace string `json:"namespace,omitempty"`
	// Name of the connection.
	//+kubebuilder:validation:Required
	Name string `json:"name"`
}

ConnectionReference is the reference to the connection that the interface is associated with.

func (*ConnectionReference) DeepCopy

func (in *ConnectionReference) DeepCopy() *ConnectionReference

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

func (*ConnectionReference) DeepCopyInto

func (in *ConnectionReference) DeepCopyInto(out *ConnectionReference)

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

type ConnectionSpec

type ConnectionSpec struct {
	// Host is the host to connect to.
	//+kubebuilder:validation:Required
	Host string `json:"host"`

	// Port is the port to connect to.
	Port int `json:"port,omitempty"`

	// Protocol is the protocol used to connect to the host.
	// Currently only supports `SSH`.
	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Enum=SSH
	Protocol Protocol `json:"protocol"`

	// SSH contains additional SSH connection options.
	SSH ConnectionSpecSSHOptions `json:"ssh,omitempty"`

	// SecretRef is the reference to a secret containing sensitive connection credentials.
	//+kubebuilder:validation:Required
	SecretRef corev1.SecretReference `json:"secretRef"`
}

ConnectionSpec defines the desired state of Connection.

func (*ConnectionSpec) DeepCopy

func (in *ConnectionSpec) DeepCopy() *ConnectionSpec

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

func (*ConnectionSpec) DeepCopyInto

func (in *ConnectionSpec) DeepCopyInto(out *ConnectionSpec)

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

type ConnectionSpecSSHOptions

type ConnectionSpecSSHOptions struct {
	// Fingerprint is the SSH host key fingerprint in the format `{algorithm}:{hash}`.
	Fingerprint string `json:"fingerprint,omitempty"`
	// User is the SSH user to connect as.
	User string `json:"user,omitempty"`
	// ProxyHost is the SSH proxy host to connect to.
	ProxyHost string `json:"proxyHost,omitempty"`
	// ProxyPort is the SSH proxy port to connect to.
	ProxyPort int `json:"proxyPort,omitempty"`
	// ProxyFingerprint is the SSH proxy host key fingerprint in the format `{algorithm}:{hash}`.
	ProxyFingerprint string `json:"proxyFingerprint,omitempty"`
	// ProxyUser is the SSH proxy user to connect as.
	ProxyUser string `json:"proxyUser,omitempty"`
}

ConnectionSpecSSHOptions defines the SSH connection options.

func (*ConnectionSpecSSHOptions) DeepCopy

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

func (*ConnectionSpecSSHOptions) DeepCopyInto

func (in *ConnectionSpecSSHOptions) DeepCopyInto(out *ConnectionSpecSSHOptions)

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

type ConnectionStatus

type ConnectionStatus struct {
	// OS contains information about the discovered operating system.
	OS OSInfo `json:"os,omitempty"`
}

ConnectionStatus defines the observed state of Connection.

func (*ConnectionStatus) DeepCopy

func (in *ConnectionStatus) DeepCopy() *ConnectionStatus

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

func (*ConnectionStatus) DeepCopyInto

func (in *ConnectionStatus) DeepCopyInto(out *ConnectionStatus)

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

type EthernetSpec

type EthernetSpec struct {
	// MACAddress allows to override the system-assigned address of the interface.
	//+kubebuilder:validation:Pattern=`^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$`
	MACAddress string `json:"macAddress,omitempty"`

	// AutoNegotiate specifies whether auto-negotiation is enabled.
	AutoNegotiate bool `json:"autoNegotiate,omitempty"`

	// Duplex mode configures the duplex mode being advertised by the interface.
	// When auto-negotiate is TRUE, this optionally sets the
	// duplex mode that will be advertised to the peer. If
	// unspecified, the interface should negotiate the duplex mode
	// directly (typically full-duplex). When auto-negotiate is
	// FALSE, this sets the duplex mode on the interface directly.
	//+kubebuilder:validation:Enum=Half;Full
	DuplexMode ocif.DuplexMode `json:"duplexMode,omitempty"`

	// PortSpeed configures the port speed being advertised by the interface.
	// When auto-negotiate is TRUE, this optionally sets the
	// port-speed mode that will be advertised to the peer for
	// negotiation. If unspecified, it is expected that the
	// interface will select the highest speed available based on
	// negotiation. When auto-negotiate is set to FALSE, sets the
	// link speed to a fixed value.
	PortSpeed ocif.EthernetSpeed `json:"portSpeed,omitempty"`

	// SwitchedVLAN specifies the VLAN configuration of the interface.
	SwitchedVLAN SwitchedVLANSpec `json:"switchedVLAN,omitempty"`
}

EthernetSpec defines the desired state of Ethernet.

func (*EthernetSpec) DeepCopy

func (in *EthernetSpec) DeepCopy() *EthernetSpec

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

func (*EthernetSpec) DeepCopyInto

func (in *EthernetSpec) DeepCopyInto(out *EthernetSpec)

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

type IPv4

type IPv4 struct {
	// Addresses is the list of IPv4 addresses assigned to the interface.
	Addresses []IPv4IP `json:"addresses,omitempty"`

	// Neighbors is the list of IPv4 neighbors.
	Neighbors []IPv4Neighbor `json:"neighbors,omitempty"`

	// DHCPClient enables DHCP client on the interface.
	DHCPClient bool `json:"dhcpClient,omitempty"`
}

IPv4 is the IPv4 configuration of an interface.

func (*IPv4) DeepCopy

func (in *IPv4) DeepCopy() *IPv4

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

func (*IPv4) DeepCopyInto

func (in *IPv4) DeepCopyInto(out *IPv4)

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

type IPv4IP

type IPv4IP struct {
	// Address is the IPv4 address.
	IP ocif.IPv4Address `json:"ip,omitempty"`
	// PrefixLength is the prefix length of the IPv4 address.
	PrefixLength uint8 `json:"prefixLength,omitempty"`
}

IPv4IP is the IPv4 address configuration of an interface.

func (*IPv4IP) DeepCopy

func (in *IPv4IP) DeepCopy() *IPv4IP

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

func (*IPv4IP) DeepCopyInto

func (in *IPv4IP) DeepCopyInto(out *IPv4IP)

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

type IPv4Neighbor

type IPv4Neighbor struct {
	// IP is the IPv4 address of the neighbor.
	IP ocif.IPv4Address `json:"ip,omitempty"`
	// LinkLayerAddress is the link layer address of the neighbor.
	// TODO: Implement physical address type and use it here.
	LinkLayerAddress string `json:"linkLayerAddress,omitempty"`
}

IPv4Neighbor is an IPv4 neighbor.

func (*IPv4Neighbor) DeepCopy

func (in *IPv4Neighbor) DeepCopy() *IPv4Neighbor

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

func (*IPv4Neighbor) DeepCopyInto

func (in *IPv4Neighbor) DeepCopyInto(out *IPv4Neighbor)

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

type Interface

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

	Spec   InterfaceSpec   `json:"spec,omitempty"`
	Status InterfaceStatus `json:"status,omitempty"`
}

Interface is the Schema for the interfaces API

func (*Interface) DeepCopy

func (in *Interface) DeepCopy() *Interface

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

func (*Interface) DeepCopyInto

func (in *Interface) DeepCopyInto(out *Interface)

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

func (*Interface) DeepCopyObject

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

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

type InterfaceList

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

InterfaceList contains a list of Interface

func (*InterfaceList) DeepCopy

func (in *InterfaceList) DeepCopy() *InterfaceList

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

func (*InterfaceList) DeepCopyInto

func (in *InterfaceList) DeepCopyInto(out *InterfaceList)

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

func (*InterfaceList) DeepCopyObject

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

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

type InterfaceSelector

type InterfaceSelector struct {
	// Name is the name of the interface.
	Name string `json:"name,omitempty"`
	// MACAddress is the MAC address of the interface.
	//+kubebuilder:validation:Pattern=`^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$`
	MACAddress string `json:"macAddress,omitempty"`
}

InterfaceSelector is the selector for the interface.

func (*InterfaceSelector) DeepCopy

func (in *InterfaceSelector) DeepCopy() *InterfaceSelector

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

func (*InterfaceSelector) DeepCopyInto

func (in *InterfaceSelector) DeepCopyInto(out *InterfaceSelector)

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

type InterfaceSpec

type InterfaceSpec struct {
	// ConnectionRef is the reference to the connection that this interface is associated with.
	//+kubebuilder:validation:Required
	ConnectionRef ConnectionReference `json:"connectionRef,omitempty"`

	// Selector allows to select the interface based on certain criteria.
	//+kubebuilder:validation:Required
	Selector InterfaceSelector `json:"selector,omitempty"`

	// Name allows to override the interface name.
	Name string `json:"name,omitempty"`

	// Type specifies the type of the interface.
	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Enum=EthernetCSMACD
	Type ocif.InterfaceType `json:"type"`

	// MTU specifies the maximum transmission unit of the interface.
	MTU int `json:"mtu,omitempty"`

	// Description provides human-readable information about the interface.
	//+kubebuilder:validation:Pattern=`^[a-zA-Z0-9.,-_ ]{1,255}$`
	Description string `json:"description,omitempty"`

	// Enabled specifies whether the interface is enabled.
	Enabled bool `json:"enabled,omitempty"`

	// Ethernet configures the Ethernet-specific properties of the interface.
	Ethernet EthernetSpec `json:"ethernet,omitempty"`

	// RoutedVLAN specifies the VLAN configuration of the interface.
	RoutedVLAN RoutedVLANSpec `json:"routedVLAN,omitempty"`
}

InterfaceSpec defines the desired state of Interface

func (*InterfaceSpec) DeepCopy

func (in *InterfaceSpec) DeepCopy() *InterfaceSpec

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

func (*InterfaceSpec) DeepCopyInto

func (in *InterfaceSpec) DeepCopyInto(out *InterfaceSpec)

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

type InterfaceStatus

type InterfaceStatus struct {
}

InterfaceStatus defines the observed state of Interface

func (*InterfaceStatus) DeepCopy

func (in *InterfaceStatus) DeepCopy() *InterfaceStatus

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

func (*InterfaceStatus) DeepCopyInto

func (in *InterfaceStatus) DeepCopyInto(out *InterfaceStatus)

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

type OSInfo

type OSInfo struct {
	// Name is the name of the operating system.
	Name string `json:"name"`
	// Version is the version of the operating system.
	Version string `json:"version"`
}

OSInfo describes the operating system of a system.

func (*OSInfo) DeepCopy

func (in *OSInfo) DeepCopy() *OSInfo

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

func (*OSInfo) DeepCopyInto

func (in *OSInfo) DeepCopyInto(out *OSInfo)

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

type Protocol

type Protocol string

Protocol is the protocol used to connect to the host.

const (
	// ProtocolSSH is the TCP protocol.
	ProtocolSSH Protocol = "SSH"
)

type RoutedVLANSpec

type RoutedVLANSpec struct {
	// VLANID is the VLAN ID of the routed VLAN.
	//+kubebuilder:validation:Minimum=1
	//+kubebuilder:validation:Maximum=4094
	VLAN int `json:"vlan,omitempty"`

	// IPv4 configures the IPv4 address of the interface.
	IPv4 IPv4 `json:"ipv4,omitempty"`
}

RoutedVLANSpec defines the desired state of a routed VLAN.

func (*RoutedVLANSpec) DeepCopy

func (in *RoutedVLANSpec) DeepCopy() *RoutedVLANSpec

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

func (*RoutedVLANSpec) DeepCopyInto

func (in *RoutedVLANSpec) DeepCopyInto(out *RoutedVLANSpec)

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

type SwitchedVLANSpec

type SwitchedVLANSpec struct {
	// InterfaceMode is the VLAN mode.
	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Enum=Access;Trunk
	InterfaceMode string `json:"interfaceMode"`
	// NativeVLAN is the native VLAN.
	//+kubebuilder:validation:Minimum=1
	//+kubebuilder:validation:Maximum=4094
	NativeVLAN int `json:"nativeVLAN,omitempty"`
	// AccessVLAN is the access VLAN.
	//+kubebuilder:validation:Minimum=1
	//+kubebuilder:validation:Maximum=4094
	AccessVLAN int `json:"accessVLAN,omitempty"`
	// TrunkVLANs is the list of trunk VLANs.
	TrunkVLANs []int `json:"trunkVLANs,omitempty"`
}

SwitchedVLANSpec defines the desired state of a switched VLAN.

func (*SwitchedVLANSpec) DeepCopy

func (in *SwitchedVLANSpec) DeepCopy() *SwitchedVLANSpec

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

func (*SwitchedVLANSpec) DeepCopyInto

func (in *SwitchedVLANSpec) DeepCopyInto(out *SwitchedVLANSpec)

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