storagenetwork

package
v1.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerName                  = "harvester-storage-network-controller"
	StorageNetworkAnnotation        = "storage-network.settings.harvesterhci.io"
	ReplicaStorageNetworkAnnotation = StorageNetworkAnnotation + "/replica"
	PausedStorageNetworkAnnotation  = StorageNetworkAnnotation + "/paused"
	HashStorageNetworkAnnotation    = StorageNetworkAnnotation + "/hash"
	NadStorageNetworkAnnotation     = StorageNetworkAnnotation + "/net-attach-def"
	OldNadStorageNetworkAnnotation  = StorageNetworkAnnotation + "/old-net-attach-def"

	HashStorageNetworkLabel = HashStorageNetworkAnnotation

	StorageNetworkNetAttachDefPrefix    = "storagenetwork-"
	StorageNetworkNetAttachDefNamespace = "harvester-system"

	BridgeSuffix = "-br"
	CNIVersion   = "0.3.1"
	DefaultPVID  = 1
	DefaultCNI   = "bridge"
	DefaultIPAM  = "whereabouts"

	// status
	ReasonInProgress         = "In Progress"
	ReasonCompleted          = "Completed"
	MsgRestartPod            = "Restarting Pods"
	MsgStopPod               = "Stopping Pods"
	MsgWaitForVolumes        = "Waiting for all volumes detached: %s"
	MsgUpdateLonghornSetting = "Update Longhorn setting"
)

Variables

This section is empty.

Functions

func Register

func Register(ctx context.Context, management *config.Management, _ config.Options) error

register the setting controller and reconsile longhorn setting when storage network changed

Types

type BridgeConfig

type BridgeConfig struct {
	cniv1.NetConf
	Bridge      string     `json:"bridge"`
	PromiscMode bool       `json:"promiscMode"`
	Vlan        uint16     `json:"vlan"`
	IPAM        IPAMConfig `json:"ipam"`
}

func NewBridgeConfig

func NewBridgeConfig() *BridgeConfig

type Config

type Config struct {
	ClusterNetwork string   `json:"clusterNetwork,omitempty"`
	Vlan           uint16   `json:"vlan,omitempty"`
	Range          string   `json:"range,omitempty"`
	Exclude        []string `json:"exclude,omitempty"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) OnStorageNetworkChange

func (h *Handler) OnStorageNetworkChange(_ string, setting *harvesterv1.Setting) (*harvesterv1.Setting, error)

webhook needs check if VMs are off

type IPAMConfig

type IPAMConfig struct {
	Type    string   `json:"type"`
	Range   string   `json:"range"`
	Exclude []string `json:"exclude,omitempty"`
}

Jump to

Keyboard shortcuts

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