operatorclient

package
v0.0.0-...-56c20cb Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

README

Operator Client

This package provides the RunOnceDurationOverrideOperatorClient interface for interacting with the RunOnceDurationOverride custom resource.

GetOperatorState vs GetOperatorStateWithQuorum

  • GetOperatorState() uses the informer to read cached data (fast, may be stale)
  • GetOperatorStateWithQuorum() uses the client to read from the API server (live, guaranteed fresh)

Documentation

Index

Constants

View Source
const (
	OperatorName            = "runoncedurationoverride"
	OperatorNamespace       = "openshift-run-once-duration-override-operator"
	OperatorConfigName      = "cluster"
	OperatorOwnerAnnotation = "runoncedurationoverride.operator.openshift.io/owner"
)

Variables

This section is empty.

Functions

func UpdateStatus

UpdateStatus applies the update functions to the full RunOnceDurationOverrideStatus and persists it. This is similar to v1helpers.UpdateStatus but works with the complete custom status structure including Hash, Resources, Image, and CertsRotateAt fields that handlers modify.

Types

type OperatorClientWrapper

type OperatorClientWrapper struct {
	// contains filtered or unexported fields
}

OperatorClientWrapper wraps RunOnceDurationOverrideClient to implement v1helpers.OperatorClient by translating between custom RunOnceDurationOverride types and generic operatorv1 types.

func NewOperatorClientWrapper

func NewOperatorClientWrapper(client *RunOnceDurationOverrideClient) *OperatorClientWrapper

NewOperatorClientWrapper creates a wrapper around RunOnceDurationOverrideClient that implements v1helpers.OperatorClient interface.

func (*OperatorClientWrapper) ApplyOperatorSpec

func (w *OperatorClientWrapper) ApplyOperatorSpec(ctx context.Context, fieldManager string, applyConfiguration *applyconfiguration.OperatorSpecApplyConfiguration) error

func (*OperatorClientWrapper) ApplyOperatorStatus

func (w *OperatorClientWrapper) ApplyOperatorStatus(ctx context.Context, fieldManager string, applyConfiguration *applyconfiguration.OperatorStatusApplyConfiguration) error

func (*OperatorClientWrapper) GetObjectMeta

func (w *OperatorClientWrapper) GetObjectMeta() (*metav1.ObjectMeta, error)

func (*OperatorClientWrapper) GetOperatorState

func (*OperatorClientWrapper) GetOperatorStateWithQuorum

func (*OperatorClientWrapper) Informer

func (*OperatorClientWrapper) PatchOperatorStatus

func (w *OperatorClientWrapper) PatchOperatorStatus(ctx context.Context, jsonPatch *jsonpatch.PatchSet) error

func (*OperatorClientWrapper) UpdateOperatorSpec

func (w *OperatorClientWrapper) UpdateOperatorSpec(ctx context.Context, oldResourceVersion string, in *operatorv1.OperatorSpec) (*operatorv1.OperatorSpec, string, error)

func (*OperatorClientWrapper) UpdateOperatorStatus

func (w *OperatorClientWrapper) UpdateOperatorStatus(ctx context.Context, oldResourceVersion string, in *operatorv1.OperatorStatus) (*operatorv1.OperatorStatus, error)

type RunOnceDurationOverrideClient

type RunOnceDurationOverrideClient struct {
	Ctx                             context.Context
	RunOnceDurationOverrideInformer runoncedurationoverrideinformerv1.RunOnceDurationOverrideInformer
	OperatorClient                  operatorconfigclientv1.RunOnceDurationOverrideV1Interface
}

func (*RunOnceDurationOverrideClient) ApplyOperatorSpec

func (c *RunOnceDurationOverrideClient) ApplyOperatorSpec(ctx context.Context, fieldManager string, desiredConfiguration *applyconfiguration.OperatorSpecApplyConfiguration) error

func (*RunOnceDurationOverrideClient) ApplyOperatorStatus

func (c *RunOnceDurationOverrideClient) ApplyOperatorStatus(ctx context.Context, fieldManager string, desiredConfiguration *applyconfiguration.OperatorStatusApplyConfiguration) error

func (*RunOnceDurationOverrideClient) GetObjectMeta

func (c *RunOnceDurationOverrideClient) GetObjectMeta() (meta *metav1.ObjectMeta, err error)

func (RunOnceDurationOverrideClient) GetOperatorState

func (RunOnceDurationOverrideClient) Informer

func (*RunOnceDurationOverrideClient) PatchOperatorStatus

func (c *RunOnceDurationOverrideClient) PatchOperatorStatus(ctx context.Context, jsonPatch *jsonpatch.PatchSet) (err error)

func (*RunOnceDurationOverrideClient) UpdateOperatorSpec

func (*RunOnceDurationOverrideClient) UpdateOperatorStatus

type RunOnceDurationOverrideOperatorClient

type RunOnceDurationOverrideOperatorClient interface {
	Informer() cache.SharedIndexInformer
	GetObjectMeta() (meta *metav1.ObjectMeta, err error)
	GetOperatorState() (spec *runoncedurationoverridev1.RunOnceDurationOverrideSpec, status *runoncedurationoverridev1.RunOnceDurationOverrideStatus, resourceVersion string, err error)
	GetOperatorStateWithQuorum(ctx context.Context) (*runoncedurationoverridev1.RunOnceDurationOverrideSpec, *runoncedurationoverridev1.RunOnceDurationOverrideStatus, string, error)
	UpdateOperatorSpec(ctx context.Context, oldResourceVersion string, in *runoncedurationoverridev1.RunOnceDurationOverrideSpec) (out *runoncedurationoverridev1.RunOnceDurationOverrideSpec, newResourceVersion string, err error)
	UpdateOperatorStatus(ctx context.Context, oldResourceVersion string, in *runoncedurationoverridev1.RunOnceDurationOverrideStatus) (out *runoncedurationoverridev1.RunOnceDurationOverrideStatus, err error)
	ApplyOperatorSpec(ctx context.Context, fieldManager string, applyConfiguration *applyconfiguration.OperatorSpecApplyConfiguration) (err error)
	ApplyOperatorStatus(ctx context.Context, fieldManager string, applyConfiguration *applyconfiguration.OperatorStatusApplyConfiguration) (err error)
	PatchOperatorStatus(ctx context.Context, jsonPatch *jsonpatch.PatchSet) (err error)
}

type UpdateRunOnceDurationOverrideStatusFunc

type UpdateRunOnceDurationOverrideStatusFunc func(status *runoncedurationoverridev1.RunOnceDurationOverrideStatus) error

UpdateRunOnceDurationOverrideStatusFunc is a function that modifies the RunOnceDurationOverrideStatus.

Jump to

Keyboard shortcuts

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