common

package
v1.4.0-unstable Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 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"
)

Variables

Functions

This section is empty.

Types

type HcoConditions

func NewHcoConditions

func NewHcoConditions() HcoConditions

func (HcoConditions) HasCondition added in v1.4.0

func (hc HcoConditions) HasCondition(conditionType conditionsv1.ConditionType) bool

func (HcoConditions) IsEmpty added in v1.4.0

func (hc HcoConditions) IsEmpty() bool

func (HcoConditions) SetStatusCondition

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

func (HcoConditions) SetStatusConditionIfUnset added in v1.4.0

func (hc HcoConditions) SetStatusConditionIfUnset(newCondition conditionsv1.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
}

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