server

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateIronCoreMachine

type AggregateIronCoreMachine struct {
	IgnitionSecret *corev1.Secret
	Machine        *computev1alpha1.Machine
	// NetworkInterfaces is a mapping of machine network interface name to actual network interface.
	NetworkInterfaces map[string]*AggregateIronCoreNetworkInterface
	// Volumes is a mapping of machine volume name to actual volume.
	Volumes map[string]*AggregateIronCoreVolume
}

type AggregateIronCoreNetworkInterface

type AggregateIronCoreNetworkInterface struct {
	Network          *networkingv1alpha1.Network
	NetworkInterface *networkingv1alpha1.NetworkInterface
}

type AggregateIronCoreVolume

type AggregateIronCoreVolume struct {
	Volume       *storagev1alpha1.Volume
	AccessSecret *corev1.Secret
}

type BrokerLabel

type BrokerLabel struct {
	DefaultLabel     string
	DownwardAPILabel string
}

type IronCoreMachineConfig

type IronCoreMachineConfig struct {
	Labels                  map[string]string
	Annotations             map[string]string
	Power                   computev1alpha1.Power
	MachineClassName        string
	Image                   string
	IgnitionData            []byte
	NetworkInterfaceConfigs []*IronCoreNetworkInterfaceConfig
	VolumeConfigs           []*IronCoreVolumeConfig
}

type IronCoreNetworkInterfaceConfig

type IronCoreNetworkInterfaceConfig struct {
	Name       string
	NetworkID  string
	IPs        []commonv1alpha1.IP
	Attributes map[string]string
}

type IronCoreVolumeConfig

type IronCoreVolumeConfig struct {
	Name      string
	Device    string
	EmptyDisk *IronCoreVolumeEmptyDiskConfig
	Remote    *IronCoreVolumeRemoteConfig
}

type IronCoreVolumeEmptyDiskConfig

type IronCoreVolumeEmptyDiskConfig struct {
	SizeLimit *resource.Quantity
}

type IronCoreVolumeRemoteConfig

type IronCoreVolumeRemoteConfig struct {
	Driver         string
	Handle         string
	Attributes     map[string]string
	SecretData     map[string][]byte
	EncryptionData map[string][]byte
}

type Options

type Options struct {
	// BaseURL is the base URL in form http(s)://host:port/path?query to produce request URLs relative to.
	BaseURL string
	// BrokerDownwardAPILabels specifies which labels to broker via downward API and what the default
	// label name is to obtain the value in case there is no value for the downward API.
	// Example usage is e.g. to broker the root UID (map "root-machine-uid" to machinepoollet's
	// "machinepoollet.ironcore.dev/machine-uid")
	BrokerDownwardAPILabels map[string]string
	MachinePoolName         string
	MachinePoolSelector     map[string]string
}

type Server

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

func New

func New(cfg *rest.Config, namespace string, opts Options) (*Server, error)

func (*Server) AttachNetworkInterface

func (s *Server) AttachNetworkInterface(ctx context.Context, req *iri.AttachNetworkInterfaceRequest) (res *iri.AttachNetworkInterfaceResponse, retErr error)

func (*Server) AttachVolume

func (s *Server) AttachVolume(ctx context.Context, req *iri.AttachVolumeRequest) (res *iri.AttachVolumeResponse, retErr error)

func (*Server) CreateMachine

func (s *Server) CreateMachine(ctx context.Context, req *iri.CreateMachineRequest) (res *iri.CreateMachineResponse, retErr error)

func (*Server) DeleteMachine

func (s *Server) DeleteMachine(ctx context.Context, req *iri.DeleteMachineRequest) (*iri.DeleteMachineResponse, error)

func (*Server) DetachNetworkInterface

func (s *Server) DetachNetworkInterface(
	ctx context.Context,
	req *iri.DetachNetworkInterfaceRequest,
) (*iri.DetachNetworkInterfaceResponse, error)

func (*Server) DetachVolume

func (s *Server) DetachVolume(ctx context.Context, req *iri.DetachVolumeRequest) (*iri.DetachVolumeResponse, error)

func (*Server) Exec

func (s *Server) Exec(ctx context.Context, req *iri.ExecRequest) (*iri.ExecResponse, error)

func (*Server) ListMachines

func (s *Server) ListMachines(ctx context.Context, req *iri.ListMachinesRequest) (*iri.ListMachinesResponse, error)

func (*Server) ServeExec

func (s *Server) ServeExec(w http.ResponseWriter, req *http.Request, token string)

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

func (*Server) Status

func (s *Server) Status(ctx context.Context, req *iri.StatusRequest) (*iri.StatusResponse, error)

func (*Server) UpdateMachinePower

func (*Server) Version

func (s *Server) Version(ctx context.Context, req *iri.VersionRequest) (*iri.VersionResponse, error)

Jump to

Keyboard shortcuts

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