v1

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the netpool v1 API group +kubebuilder:object:generate=true +groupName=netpool.kanod.io

Index

Constants

View Source
const (
	// Value to put in a baremetalpool pause annotation to tell it is managed
	// by the nework operator.
	PausedValue = "kanod.io/networks"
	// ManadatoryAnnotation is the name of the annotation to add to a
	// baremetalpool to tell which networks are mandatory (comma separated
	// list of names. Resources are in the same namespace).
	MandatoryAnnotation = "baremetalpool.kanod.io/mandatory-networks"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "netpool.kanod.io", Version: "v1"}

	// 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 BareMetalPoolBinding added in v0.1.0

type BareMetalPoolBinding struct {
	// Name of the baremetal pool
	Name string `json:"name"`
	// Name of the binding used in labels on baremetalhost
	BindingName string `json:"bindingName"`
}

BareMetalPoolBinding defines a link between a BareMetalPool and the network.

func (*BareMetalPoolBinding) DeepCopy added in v0.1.0

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

func (*BareMetalPoolBinding) DeepCopyInto added in v0.1.0

func (in *BareMetalPoolBinding) DeepCopyInto(out *BareMetalPoolBinding)

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

type DhcpConfig added in v0.0.8

type DhcpConfig struct {
	// Subnet IP/mask address
	SubnetPrefix string `json:"subnetPrefix"`

	// Subnet range start
	SubnetStart string `json:"subnetStart"`

	// Subnet range end
	SubnetEnd string `json:"subnetEnd"`

	// DomainNameServers
	DomainNameServers []string `json:"domainNameServers,omitempty"`

	// Gateway IP/mask address
	GatewayIP string `json:"gatewayIp,omitempty"`

	// Subnet DHCP server address
	DhcpServerIP string `json:"dhcpServerIp"`
}

DhcpConfig contains the dhcp params associated with the networkdefinition

func (*DhcpConfig) DeepCopy added in v0.0.8

func (in *DhcpConfig) DeepCopy() *DhcpConfig

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

func (*DhcpConfig) DeepCopyInto added in v0.0.8

func (in *DhcpConfig) DeepCopyInto(out *DhcpConfig)

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

type DhcpMode added in v0.1.2

type DhcpMode string

DhcpMode represents the operational mode of the DHCP server for the subnet If the mode is “pxe“, the server will provide the options to reach a ipxe boot server in both bios and uefi mode and an ipxe configuration. If the mode is “dhcp“ the server will only supply a dhcp address. Finally when it is “none“, the dhcp server will not be activated (no DhcpConfig generated)

const (
	// The back-end must supply a dhcp server
	ModeDhcp DhcpMode = "dhcp"
	// The back-end must supply a dhcp server supporting PXE
	ModePxe DhcpMode = "pxe"
	// No handling of IP address by Kanod
	ModeNone DhcpMode = "none"
)

type Network

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

	Spec   NetworkSpec   `json:"spec,omitempty"`
	Status NetworkStatus `json:"status,omitempty"`
}

+kubebuilder:printcolumn:name="POOLS",type=string,JSONPath=`.status.pools` Network is the Schema for the networks API

func (*Network) DeepCopy

func (in *Network) DeepCopy() *Network

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

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

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

func (*Network) DeepCopyObject

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

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

type NetworkList

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

NetworkList contains a list of Network

func (*NetworkList) DeepCopy

func (in *NetworkList) DeepCopy() *NetworkList

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

func (*NetworkList) DeepCopyInto

func (in *NetworkList) DeepCopyInto(out *NetworkList)

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

func (*NetworkList) DeepCopyObject

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

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

type NetworkSpec

type NetworkSpec struct {
	// NetworkDefinition name identifying the network on the network broker
	NetworkDefinitionName string `json:"networkDefinitionName,omitempty"`
	// List of BareMetalPools whose servers are connected to the network
	BareMetalPoolList []BareMetalPoolBinding `json:"bareMetalPoolList,omitempty"`
	// Name of the secret associated to the NetworkDefinitionName
	NetworkDefinitionCredentialName string `json:"networkDefinitionCredentialName"`
	// Address of the network broker
	BrokernetAddress string `json:"brokernetAddress"`
	// BrokerConfig is the name of the configmap containing the broker CA
	BrokerConfig string `json:"brokerConfig"`
	// IPPool is the name of an optional IPPool that will be associated to the
	// network
	IPPool string `json:"ipPool,omitempty"`
	// Cluster is the name of the cluster for which the network is
	// defined. This optional parameter is only necessary for pivot when
	// an IPPool is defined.
	Cluster string `json:"cluster,omitempty"`
	// DhcpMode defines the mode of
	DhcpMode DhcpMode `json:"dhcpMode"`
}

NetworkSpec defines the desired state of Network

func (*NetworkSpec) DeepCopy

func (in *NetworkSpec) DeepCopy() *NetworkSpec

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

func (*NetworkSpec) DeepCopyInto

func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec)

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

type NetworkState added in v0.1.6

type NetworkState string
const (
	Initialized NetworkState = "Initialized"
	PoolSync    NetworkState = "PoolSync"
	BrokerSync  NetworkState = "BrokerSync"
	DhcpSync    NetworkState = "DhcpSync"
	Ready       NetworkState = "Ready"
)

type NetworkStatus

type NetworkStatus struct {
	// Status
	// +optional
	State NetworkState `json:"state"`
	// +optional
	Pools string `json:"pools"`
	// +optional
	DhcpConf DhcpConfig `json:"dhcpConfig"`
}

NetworkStatus defines the observed state of Network

func (*NetworkStatus) DeepCopy

func (in *NetworkStatus) DeepCopy() *NetworkStatus

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

func (*NetworkStatus) DeepCopyInto

func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus)

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