upgradecheck

package
v0.0.0-...-e26eaeb Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManagedScheduler

func ManagedScheduler(m manager.Manager, openshift bool,
	url, version string, registrationToken *jwt.Token) error

ManagedScheduler creates a CheckForUpgradesScheduler and adds it to m. NOTE(registration): This takes a token/nil parameter when the operator is started. Currently the operator restarts when the token is updated, so this token is always current; but if that restart behavior is changed, we will want the upgrade mechanism to instantiate its own registration runner or otherwise get the most recent token.

Types

type CacheWithWait

type CacheWithWait interface {
	WaitForCacheSync(ctx context.Context) bool
}

Creating an interface for cache with WaitForCacheSync to allow easier mocking

type CheckForUpgradesScheduler

type CheckForUpgradesScheduler struct {
	Client crclient.Client
	Config *rest.Config

	OpenShift         bool
	Refresh           time.Duration
	RegistrationToken string
	URL, Version      string
}

func (*CheckForUpgradesScheduler) NeedLeaderElection

func (s *CheckForUpgradesScheduler) NeedLeaderElection() bool

NeedLeaderElection returns true so that s runs only on the single manager.Manager that is elected leader in the Kubernetes cluster.

func (*CheckForUpgradesScheduler) Start

Start checks for upgrades periodically. It blocks until ctx is cancelled.

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

Jump to

Keyboard shortcuts

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