common

package
v1.12.0-unstable Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ReconcileCompleted        = "ReconcileCompleted"
	ReconcileCompletedMessage = "Reconcile completed successfully"

	// JSONPatch annotation names
	JSONPatchKVAnnotationName   = "kubevirt.kubevirt.io/jsonpatch"
	JSONPatchCDIAnnotationName  = "containerizeddataimporter.kubevirt.io/jsonpatch"
	JSONPatchCNAOAnnotationName = "networkaddonsconfigs.kubevirt.io/jsonpatch"
	JSONPatchSSPAnnotationName  = "ssp.kubevirt.io/jsonpatch"
	// Tuning Policy annotation name
	TuningPolicyAnnotationName = "hco.kubevirt.io/tuningPolicy"
)

Variables

Functions

This section is empty.

Types

type HcoConditions

type HcoConditions map[string]metav1.Condition

func NewHcoConditions

func NewHcoConditions() HcoConditions

func (HcoConditions) GetCondition

func (hc HcoConditions) GetCondition(conditionType string) (metav1.Condition, bool)

func (HcoConditions) HasCondition

func (hc HcoConditions) HasCondition(conditionType string) bool

func (HcoConditions) IsEmpty

func (hc HcoConditions) IsEmpty() bool

func (HcoConditions) IsStatusConditionTrue added in v1.9.0

func (hc HcoConditions) IsStatusConditionTrue(conditionType string) bool

func (HcoConditions) SetStatusCondition

func (hc HcoConditions) SetStatusCondition(newCondition metav1.Condition)

func (HcoConditions) SetStatusConditionIfUnset

func (hc HcoConditions) SetStatusConditionIfUnset(newCondition metav1.Condition)

type HcoRequest

type HcoRequest struct {
	reconcile.Request                                     // inheritance of operator request
	Logger                     logr.Logger                // request logger
	Conditions                 HcoConditions              // in-memory conditions
	Ctx                        context.Context            // context of this request, to be use for any other call
	Instance                   *hcov1beta1.HyperConverged // the current state of the CR, as read from K8s
	UpgradeMode                bool                       // copy of the reconciler upgrade mode
	ComponentUpgradeInProgress bool                       // if in upgrade mode, accumulate the component upgrade status
	Dirty                      bool                       // is something was changed in the CR
	StatusDirty                bool                       // is something was changed in the CR's Status
	HCOTriggered               bool                       // if the request got triggered by a direct modification on HCO CR
	Upgradeable                bool                       // if all the operands are upgradeable
}

hcoRequest - gather data for a specific request

func NewHcoRequest

func NewHcoRequest(ctx context.Context, request reconcile.Request, log logr.Logger, upgradeMode, hcoTriggered bool) *HcoRequest

func (*HcoRequest) SetUpgradeMode

func (req *HcoRequest) SetUpgradeMode(upgradeMode bool)

Jump to

Keyboard shortcuts

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