Documentation
¶
Overview ¶
Package capabilities provides an service to find out which capabilities/functions a workload cluster on the given installation will provide.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Autoscaling is the capability to scale workload clusters automatically. Autoscaling = CapabilityDefinition{ Name: "Autoscaling", RequiredReleasePerProvider: []ReleaseProviderPair{ ReleaseProviderPair{ Provider: "aws", ReleaseVersion: semver.MustParse("6.3"), }, }, } // AvailabilityZones is the capability to spread the worker nodes of a workload // cluster over multiple availability zones. AvailabilityZones = CapabilityDefinition{ Name: "AvailabilityZones", RequiredReleasePerProvider: []ReleaseProviderPair{ ReleaseProviderPair{ Provider: "aws", ReleaseVersion: semver.MustParse("6.1"), }, }, } // NodePools is the capabilitiy to group workload cluster workers logically. // Details get completed with API data, if the feature is available. NodePools = CapabilityDefinition{ Name: "NodePools", } // HAMasters provides details about the high availability masters feature. HAMasters = CapabilityDefinition{ Name: "HAMasters", } )
Functions ¶
func IsCouldNotFetchFeatures ¶
IsCouldNotFetchFeatures asserts couldNotFetchFeatures.
func IsCouldNotInitializeCapabilities ¶
IsCouldNotInitializeCapabilities asserts couldNotInitializeCapabilities.
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsInvalidSemVer ¶
IsInvalidSemVer asserts semver.ErrInvalidSemVer, as semver unfortunately does not provide a matcher.
Types ¶
type CapabilityDefinition ¶
type CapabilityDefinition struct {
// Name is a user friendly name we use here in gsctl.
Name string
// RequiredReleasePerProvider holds the combination(s) of provider and
// release version which have to be fulfilled so we assume a capability.
RequiredReleasePerProvider []ReleaseProviderPair
}
CapabilityDefinition is the type we use to describe the conditions that have to be met so that we can assume a certain capability on the installation or API side.
type ReleaseProviderPair ¶
ReleaseProviderPair is a combination of a providr ('aws', 'azure', 'kvm) and a release version number.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides methods to get more details on the installation's and workload cluster's capabilities.
func (*Service) GetCapabilities ¶
func (s *Service) GetCapabilities(releaseVersion string) ([]CapabilityDefinition, error)
GetCapabilities returns the list of capabilities that applies to a given release version, considering the installation's provider.
func (*Service) HasCapability ¶
func (s *Service) HasCapability(releaseVersion string, capability CapabilityDefinition) (bool, error)
HasCapability returns true if the current context (provider, release) provides the given capabililty.