upgradecheck

package
v0.0.0-...-30d1bac Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 18 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) error

ManagedScheduler creates a CheckForUpgradesScheduler and adds it to m.

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
	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