common

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SelectNamespace

func SelectNamespace(namespaces ...string) string

SelectNamespace returns first non-empty namespace from the list "", "", "first", "second" => "first"

Types

type LabelSpec

type LabelSpec struct {
	// +kubebuilder:validation:MaxLength:=255
	Key   string `json:"key"`
	Value string `json:"value"`
}

LabelSpec contains key-value pairs that tag and categorize the Cluster/DBUser

type ResourceRef

type ResourceRef struct {
	// Name is the name of the Kubernetes Resource
	Name string `json:"name"`
}

ResourceRef is a reference to a Kubernetes Resource

type ResourceRefNamespaced

type ResourceRefNamespaced struct {
	// Name is the name of the Kubernetes Resource
	Name string `json:"name"`

	// Namespace is the namespace of the Kubernetes Resource
	// +optional
	Namespace string `json:"namespace"`
}

ResourceRefNamespaced is a reference to a Kubernetes Resource that allows to configure the namespace

func (*ResourceRefNamespaced) GetObject

func (rn *ResourceRefNamespaced) GetObject(parentNamespace string) *client.ObjectKey

func (ResourceRefNamespaced) IsEmpty added in v2.3.1

func (rn ResourceRefNamespaced) IsEmpty() bool

func (ResourceRefNamespaced) Key added in v2.3.0

func (rn ResourceRefNamespaced) Key() string

func (*ResourceRefNamespaced) ReadPassword

func (rn *ResourceRefNamespaced) ReadPassword(ctx context.Context, kubeClient client.Client, parentNamespace string) (string, error)

Jump to

Keyboard shortcuts

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