version

package
Version: v2.14.13+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: Apache-2.0 Imports: 11 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager is a object to handle versions & updates from a predefined config

func New

func New(versions []*Version, updates []*Update) *Manager

New returns a instance of Manager

func NewFromFiles

func NewFromFiles(versionsFilename, updatesFilename string) (*Manager, error)

NewFromFiles returns a instance of manager with the versions & updates loaded from the given paths

func (*Manager) AutomaticControlplaneUpdate

func (m *Manager) AutomaticControlplaneUpdate(fromVersionRaw, clusterType string) (*Version, error)

AutomaticControlplaneUpdate returns a version if an automatic update can be found for the version passed in

func (*Manager) AutomaticNodeUpdate

func (m *Manager) AutomaticNodeUpdate(fromVersionRaw, clusterType, controlPlaneVersion string) (*Version, error)

AutomaticNodeUpdate returns an automatic node update or nil

func (*Manager) GetDefault

func (m *Manager) GetDefault() (*Version, error)

GetDefault returns the default version

func (*Manager) GetPossibleUpdates

func (m *Manager) GetPossibleUpdates(fromVersionRaw, clusterType string) ([]*Version, error)

GetPossibleUpdates returns possible updates for the version passed in

func (*Manager) GetVersion

func (m *Manager) GetVersion(s, t string) (*Version, error)

GetVersion returns the Versions for s

func (*Manager) GetVersions

func (m *Manager) GetVersions(clusterType string) ([]*Version, error)

GetVersions returns all Versions which don't result in automatic updates

type Update

type Update struct {
	From                string `json:"from"`
	To                  string `json:"to"`
	Automatic           bool   `json:"automatic,omitempty"`
	AutomaticNodeUpdate bool   `json:"automaticNodeUpdate,omitempty"`
	Type                string `json:"type,omitempty"`
}

Update represents an update option for a cluster

func LoadUpdates

func LoadUpdates(path string) ([]*Update, error)

LoadUpdates loads the update definition file and returns the defined MasterUpdate

type Version

type Version struct {
	Version *semver.Version `json:"version"`
	Default bool            `json:"default,omitempty"`
	Type    string          `json:"type,omitempty"`
}

Version is the object representing a Kubernetes version.

func LoadVersions

func LoadVersions(path string) ([]*Version, error)

LoadVersions loads Versions from a given path

Source Files

Jump to

Keyboard shortcuts

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