Documentation
¶
Overview ¶
Package clusterstack has necessary function to work on cluster stack.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BumpVersion ¶
BumpVersion bumps the version of the cluster stacks component.
func GetClusterStackReleaseDirectoryName ¶
func GetClusterStackReleaseDirectoryName(metadata *MetaData, config *CsctlConfig) (string, error)
GetClusterStackReleaseDirectoryName returns cluster stack release directory. e.g. - docker-ferrol-1-27-v1/ .
func GetClusterStackReleaseName ¶ added in v0.0.4
func GetClusterStackReleaseName(metada *MetaData, config *CsctlConfig) (string, error)
GetClusterStackReleaseName return the cluster stack release name. e.g. - docker-ferrol-1-27-v0-sha.uxumi7s .
Types ¶
type Component ¶
type Component struct {
ClusterAddon string `yaml:"clusterAddon"`
NodeImage string `yaml:"nodeImage,omitempty"`
}
Component contains component.
type CsctlConfig ¶
type CsctlConfig struct {
APIVersion string `yaml:"apiVersion"`
Config struct {
KubernetesVersion string `yaml:"kubernetesVersion"`
ClusterStackName string `yaml:"clusterStackName"`
Provider struct {
Type string `yaml:"type"`
APIVersion string `yaml:"apiVersion"`
Config map[string]interface{} `yaml:"config"`
} `yaml:"provider"`
} `yaml:"config"`
}
CsctlConfig contains information of CsctlConfig yaml.
func GetCsctlConfig ¶
func GetCsctlConfig(path string) (*CsctlConfig, error)
GetCsctlConfig returns CsctlConfig.
func (*CsctlConfig) ParseKubernetesVersion ¶
func (c *CsctlConfig) ParseKubernetesVersion() (kubernetesversion.KubernetesVersion, error)
ParseKubernetesVersion parse the kubernetes version present in the Csctl Config.
type MetaData ¶
MetaData contains metadata.
func HandleCustomMode ¶
func HandleCustomMode(kubernetesVersion, clusterStackVersion, clusterAddonVersion, nodeImageVersion string) (*MetaData, error)
HandleCustomMode handles custom mode with version for all components.
func HandleHashMode ¶
func HandleHashMode(currentRelease hash.ReleaseHash, kubernetesVersion string) *MetaData
HandleHashMode handles the hash mode with the cluster stack hash.
func HandleStableMode ¶
func HandleStableMode(gitHubReleasePath string, currentReleaseHash, latestReleaseHash hash.ReleaseHash) (*MetaData, error)
HandleStableMode returns metadata for the stable mode.
func ParseMetaData ¶
ParseMetaData parse the metadata file.