linstorhelper

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LastApplyProperty = linstor.NamespcAuxiliary + "/" + vars.ApplyAnnotation
	ManagedByProperty = linstor.NamespcAuxiliary + "/" + vars.ManagedByLabel
)

Variables

This section is empty.

Functions

func Logr

func Logr(l logr.Logger) lapi.Option

func MakePropertiesModification

func MakePropertiesModification(current, expected map[string]string) *lclient.GenericPropsModify

MakePropertiesModification returns the modification that need to be applied to update the current properties.

func UpdateLastApplyProperty

func UpdateLastApplyProperty(props map[string]string) map[string]string

UpdateLastApplyProperty ensures the LastApplyProperty is up-to-date.

Types

type Client

type Client struct {
	lapi.Client
}

Client is a LINSTOR client with convenience functions.

func NewClientForCluster

func NewClientForCluster(ctx context.Context, cl client.Client, namespace, clusterName, clientSecretName string, externalCluster *piraeusv1.LinstorExternalControllerRef, options ...lapi.Option) (*Client, error)

NewClientForCluster returns a LINSTOR client for a LINSTOR Controller managed by the operator.

func (*Client) CreateOrUpdateNode

func (c *Client) CreateOrUpdateNode(ctx context.Context, node lapi.Node) (*lapi.Node, error)

CreateOrUpdateNode ensures a node in LINSTOR matches the given node object.

Jump to

Keyboard shortcuts

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