Documentation ¶
Index ¶
- func CheckUnconstrained(baseVersion *semver.Version, version string) (bool, error)
- func IsSupported(version *semver.Version, provider kubermaticv1.ProviderType, ...) (bool, error)
- type ConditionType
- type Manager
- func (m *Manager) AutomaticControlplaneUpdate(fromVersionRaw, clusterType string) (*Version, error)
- func (m *Manager) AutomaticNodeUpdate(fromVersionRaw, clusterType, controlPlaneVersion string) (*Version, error)
- func (m *Manager) GetDefault() (*Version, error)
- func (m *Manager) GetIncompatibilities() []*ProviderIncompatibility
- func (m *Manager) GetPossibleUpdates(fromVersionRaw, clusterType string, provider kubermaticv1.ProviderType, ...) ([]*Version, error)
- func (m *Manager) GetVersion(s, t string) (*Version, error)
- func (m *Manager) GetVersions(clusterType string) ([]*Version, error)
- func (m *Manager) GetVersionsV2(clusterType string, provider kubermaticv1.ProviderType, ...) ([]*Version, error)
- type OperationType
- type ProviderIncompatibility
- type Update
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckUnconstrained ¶ added in v2.18.0
func IsSupported ¶ added in v2.18.0
func IsSupported(version *semver.Version, provider kubermaticv1.ProviderType, incompatibilities []*ProviderIncompatibility, conditions ...ConditionType) (bool, error)
Types ¶
type ConditionType ¶ added in v2.18.0
type ConditionType string
ConditionType is the type defining the cluster or datacenter condition that must be met to block a specific version
const ( // AlwaysCondition represent an always true matching condition used while checking provider incompatibilities AlwaysCondition ConditionType = "always" // ExternalCloudProviderCondition is an incompatibility condition that represents the usage of the external Cloud Provider ExternalCloudProviderCondition ConditionType = kubermaticv1.ClusterFeatureExternalCloudProvider )
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, providerIncompatibilities []*ProviderIncompatibility) *Manager
New returns a instance of Manager
func NewFromFiles ¶
func NewFromFiles(versionsFilename, updatesFilename, providerIncompatibilitiesFilename string) (*Manager, error)
NewFromFiles returns a instance of manager with the versions & updates loaded from the given paths
func (*Manager) AutomaticControlplaneUpdate ¶
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 ¶
GetDefault returns the default version
func (*Manager) GetIncompatibilities ¶ added in v2.18.0
func (m *Manager) GetIncompatibilities() []*ProviderIncompatibility
func (*Manager) GetPossibleUpdates ¶
func (m *Manager) GetPossibleUpdates(fromVersionRaw, clusterType string, provider kubermaticv1.ProviderType, conditions ...ConditionType) ([]*Version, error)
GetPossibleUpdates returns possible updates for the version passed in
func (*Manager) GetVersion ¶
GetVersion returns the Versions for s
func (*Manager) GetVersions ¶
GetVersions returns all Versions which don't result in automatic updates
func (*Manager) GetVersionsV2 ¶ added in v2.18.0
func (m *Manager) GetVersionsV2(clusterType string, provider kubermaticv1.ProviderType, conditions ...ConditionType) ([]*Version, error)
GetVersionsV2 returns all Versions which don't result in automatic updates
type OperationType ¶ added in v2.18.0
type OperationType string
OperationType is the type defining the operations triggering the compatibility check (CREATE or UPDATE)
const ( // CreateOperation represents the creation of a new cluster CreateOperation OperationType = "CREATE" // UpdateOperation represents the update of an existing cluster UpdateOperation OperationType = "UPGRADE" // SupportOperation represents the possibility to enable a new feature on an existing cluster SupportOperation OperationType = "SUPPORT" )
type ProviderIncompatibility ¶ added in v2.18.0
type ProviderIncompatibility struct { Provider kubermaticv1.ProviderType `json:"provider"` Version string `json:"version"` Condition ConditionType `json:"condition"` Operation OperationType `json:"operation"` Type string `json:"type,omitempty"` }
func LoadProviderIncompatibilities ¶ added in v2.18.0
func LoadProviderIncompatibilities(path string) ([]*ProviderIncompatibility, error)
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 ¶
LoadUpdates loads the update definition file and returns the defined MasterUpdate