util

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CidrEquals

func CidrEquals(n1, n2 *net.IPNet) bool

func CidrOverlap

func CidrOverlap(n1, n2 *net.IPNet) bool

func CidrParseIPnPrefix

func CidrParseIPnPrefix(cidr string) (string, int, error)

func GcpZapEncoderConfigOption added in v0.1.4

func GcpZapEncoderConfigOption() zap.EncoderConfigOption

func GetObjGvk

func GetObjGvk(scheme *runtime.Scheme, out runtime.Object) (gvk schema.GroupVersionKind, e error)

func GetObjGvkFromListGkv

func GetObjGvkFromListGkv(scheme *runtime.Scheme, listGvk schema.GroupVersionKind) (gvk schema.GroupVersionKind, e error)

func IsKymaModuleListedInSpec

func IsKymaModuleListedInSpec(k *unstructured.Unstructured, moduleName string) bool

func NewCrdListUnstructured added in v0.1.4

func NewCrdListUnstructured() *unstructured.UnstructuredList

func NewCrdUnstructured added in v0.1.4

func NewCrdUnstructured() *unstructured.Unstructured

func NewKymaListUnstructured

func NewKymaListUnstructured() *unstructured.UnstructuredList

func NewKymaUnstructured

func NewKymaUnstructured() *unstructured.Unstructured

func RemoveKymaModuleFromSpec

func RemoveKymaModuleFromSpec(k *unstructured.Unstructured, moduleName string) error

func RemoveKymaModuleStateFromStatus

func RemoveKymaModuleStateFromStatus(k *unstructured.Unstructured, moduleName string) error

func SetKymaModuleInSpec

func SetKymaModuleInSpec(k *unstructured.Unstructured, moduleName string) error

func SetKymaModuleStateToStatus added in v0.1.4

func SetKymaModuleStateToStatus(k *unstructured.Unstructured, moduleName string, state KymaModuleState) error

Types

type DelayActIgnore added in v0.1.4

type DelayActIgnore[T cmp.Ordered] interface {
	Case(v T) DelayActIgnoreOutcome
}

func NewDelayActIgnoreMap added in v0.1.4

func NewDelayActIgnoreMap[T cmp.Ordered](m map[T]DelayActIgnoreOutcome, notDefined DelayActIgnoreOutcome) DelayActIgnore[T]

type DelayActIgnoreBuilder added in v0.1.4

type DelayActIgnoreBuilder[T cmp.Ordered] struct {
	// contains filtered or unexported fields
}

func NewDelayActIgnoreBuilder added in v0.1.4

func NewDelayActIgnoreBuilder[T cmp.Ordered](notDefined DelayActIgnoreOutcome) *DelayActIgnoreBuilder[T]

func (*DelayActIgnoreBuilder[T]) Act added in v0.1.4

func (b *DelayActIgnoreBuilder[T]) Act(states ...T) *DelayActIgnoreBuilder[T]

func (*DelayActIgnoreBuilder[T]) Build added in v0.1.4

func (b *DelayActIgnoreBuilder[T]) Build() DelayActIgnore[T]

func (*DelayActIgnoreBuilder[T]) Delay added in v0.1.4

func (b *DelayActIgnoreBuilder[T]) Delay(states ...T) *DelayActIgnoreBuilder[T]

func (*DelayActIgnoreBuilder[T]) Error added in v0.1.4

func (b *DelayActIgnoreBuilder[T]) Error(states ...T) *DelayActIgnoreBuilder[T]

func (*DelayActIgnoreBuilder[T]) Ignore added in v0.1.4

func (b *DelayActIgnoreBuilder[T]) Ignore(states ...T) *DelayActIgnoreBuilder[T]

type DelayActIgnoreOutcome added in v0.1.4

type DelayActIgnoreOutcome string
const (
	Unknown DelayActIgnoreOutcome = ""
	Delay   DelayActIgnoreOutcome = "delay"
	Act     DelayActIgnoreOutcome = "act"
	Ignore  DelayActIgnoreOutcome = "ignore"
	Error   DelayActIgnoreOutcome = "error"
)

type KymaModuleState

type KymaModuleState string

KymaModuleState the state of the modul in the Kyma CR

const (
	KymaModuleStateNotPresent KymaModuleState = ""

	// KymaModuleStateReady signifies CustomObject is ready and has been installed successfully.
	KymaModuleStateReady KymaModuleState = "Ready"

	// KymaModuleStateProcessing signifies CustomObject is reconciling and is in the process of installation.
	// Processing can also signal that the Installation previously encountered an error and is now recovering.
	KymaModuleStateProcessing KymaModuleState = "Processing"

	// KymaModuleStateError signifies an error for CustomObject. This signifies that the Installation
	// process encountered an error.
	// Contrary to Processing, it can be expected that this state should change on the next retry.
	KymaModuleStateError KymaModuleState = "Error"

	// KymaModuleStateDeleting signifies CustomObject is being deleted. This is the state that is used
	// when a deletionTimestamp was detected and Finalizers are picked up.
	KymaModuleStateDeleting KymaModuleState = "Deleting"

	// KymaModuleStateWarning signifies specified resource has been deployed, but cannot be used due to misconfiguration,
	// usually it means that user interaction is required.
	KymaModuleStateWarning KymaModuleState = "Warning"
)

Valid States.

func GetKymaModuleStateFromStatus

func GetKymaModuleStateFromStatus(k *unstructured.Unstructured, moduleName string) KymaModuleState

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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