object

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 3 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiPhaseObject

type MultiPhaseObject interface {
	client.Object

	// GetStatus permit to get the Status interface
	GetStatus() MultiPhaseObjectStatus
}

MultiPhaseObject is used when your CRD is used to create multiple K8s resources

type MultiPhaseObjectStatus

type MultiPhaseObjectStatus interface {
	ObjectStatus

	// GetPhaseName permit to get the current phase name
	GetPhaseName() shared.PhaseName

	// SetPhaseName permit to set the current phase
	SetPhaseName(name shared.PhaseName)
}

MultiPhaseObjectStatus is the interface to control status of multi phase object

type ObjectStatus

type ObjectStatus interface {

	// GetConditions permit to get conditions from Status
	GetConditions() []metav1.Condition

	// SetConditions permit to set conditions from status
	SetConditions(conditions []metav1.Condition)

	// IsOnError permit to get if the current object is on error from status
	GetIsOnError() bool

	// SetIsOnError permit to set if the current object is on error from status
	SetIsOnError(isError bool)

	// LastErrorMessage display the current error
	GetLastErrorMessage() string

	// SetLastErrorMessage permit to set the current error
	SetLastErrorMessage(message string)

	// GetObservedGeneration permit to know the current generation applied
	GetObservedGeneration() int64

	// SetObservedGeneration permit to set the current generation applied
	SetObservedGeneration(version int64)
}

ObjectStatus is the interface for object status

type RemoteObject

type RemoteObject interface {
	client.Object

	// GetStatus permit to get the status object
	GetStatus() RemoteObjectStatus

	// GetExternalName permit to get the name of external resource (the remote name)
	GetExternalName() string
}

MultiPhaseObject is used when your CRD is used to create multiple K8s resources

type RemoteObjectStatus

type RemoteObjectStatus interface {
	ObjectStatus

	// GetIsSync permit to get if object is sync from status
	GetIsSync() bool

	// SetIsSync permit to set if object is sync from status
	SetIsSync(isSync bool)

	// GetLastAppliedConfiguration permit to get the original object from annotations (like kubectl do)
	// The goal is to apply 3 way patch merge
	GetLastAppliedConfiguration() string

	// SetLastAppliedConfiguration permit to set the original object from annotations (like kubectl do)
	// The goal is to apply 3 way patch merge
	SetLastAppliedConfiguration(object string)
}

RemoteObject is use when your CRD is used to call remote API (not create K8s resources)

Jump to

Keyboard shortcuts

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