status

package
v0.0.0-...-b80888c Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AdmissionControllerStatusName is the name of
	// the Admission Controller status object.
	AdmissionControllerStatusName = "vpa-admission-controller"
	// AdmissionControllerStatusNamespace is the namespace of
	// the Admission Controller status object.
	AdmissionControllerStatusNamespace = "kube-system"
	// AdmissionControllerStatusTimeout is a time after which
	// if not updated the Admission Controller status is no longer valid.
	AdmissionControllerStatusTimeout = 1 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for the status object.

func NewClient

func NewClient(c clientset.Interface, leaseName, leaseNamespace string, leaseDuration time.Duration, holderIdentity string) *Client

NewClient returns a client for the status object.

func (*Client) IsStatusValid

func (c *Client) IsStatusValid(statusTimeout time.Duration) (bool, error)

IsStatusValid verifies if the current status object was updated before lease timing out.

func (*Client) UpdateStatus

func (c *Client) UpdateStatus() error

UpdateStatus renews status object lease. Status object will be created if it doesn't exist.

type Updater

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

Updater periodically updates status object.

func NewUpdater

func NewUpdater(c clientset.Interface, statusName, statusNamespace string,
	updateInterval time.Duration, holderIdentity string) *Updater

NewUpdater returns a new status updater.

func (*Updater) Run

func (su *Updater) Run(stopCh <-chan struct{})

Run starts status updates.

type Validator

type Validator interface {
	IsStatusValid(statusTimeout time.Duration) (bool, error)
}

Validator for the status object.

func NewValidator

func NewValidator(c clientset.Interface, leaseName, leaseNamespace string) Validator

NewValidator returns a validator for the status object.

Jump to

Keyboard shortcuts

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