Documentation ¶
Overview ¶
Package release contains important structs and methods for a cluster stack release.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrEmptyReleaseName indicates release name is not provided. ErrEmptyReleaseName = fmt.Errorf("name is empty") // ErrEmptyReleaseCSR indicates cluster stack is not provided. ErrEmptyReleaseCSR = fmt.Errorf("cluster stack is empty") // ErrEmptyReleaseDownloadPath indicates download path is not provided. ErrEmptyReleaseDownloadPath = fmt.Errorf("local download path is empty") )
var ErrEmptyVersion = fmt.Errorf("empty version")
ErrEmptyVersion indicates that the version is empty.
Functions ¶
func ConvertFromClusterClassToClusterStackFormat ¶
ConvertFromClusterClassToClusterStackFormat converts `docker-ferrol-1-27-v0-sha.3960147` way to `docker-ferrol-1-27-v0-sha-3960147`.
Types ¶
type Components ¶
type Components struct { ClusterAddon string `yaml:"clusterAddon"` NodeImage string `yaml:"nodeImage"` }
Components is the cluster stack components.
type Metadata ¶
type Metadata struct {
Versions Versions `yaml:"versions"`
}
Metadata is the metadata for cluster stacks.
type Release ¶
type Release struct { Tag string `yaml:"name"` Meta Metadata `yaml:"metadata"` ClusterStack clusterstack.ClusterStack `yaml:"clusterStack"` LocalDownloadPath string `yaml:"downloadPath"` }
Release contains information for ClusterStack release.
func New ¶
New returns a new release. Error is returned if there is an error while processing. But not all errors indicate a need to download the release from github so, a bool is returned to indicate if the release needs to be downloaded.
func (*Release) CheckHelmCharts ¶
CheckHelmCharts checks all expected helm charts in the release directory. This is a separate method, since few controllers need to check for the presence of helm charts and few don't.
func (*Release) ClusterAddonChartPath ¶
ClusterAddonChartPath returns the helm chart name from the given path.
func (*Release) ClusterAddonValuesPath ¶
ClusterAddonValuesPath returns the path to the cluster addon values file.
func (*Release) ClusterClassChartPath ¶
ClusterClassChartPath returns the absolute helm chart path for cluster class.
type Versions ¶
type Versions struct { ClusterStack string `yaml:"clusterStack"` Kubernetes string `yaml:"kubernetes"` Components Components `yaml:"components"` }
Versions is the cluster stack versions.