release

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package release contains important structs and methods for a cluster stack release.

Index

Constants

This section is empty.

Variables

View Source
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")
)
View Source
var ErrEmptyVersion = fmt.Errorf("empty version")

ErrEmptyVersion indicates that the version is empty.

Functions

func ConvertFromClusterClassToClusterStackFormat

func ConvertFromClusterClassToClusterStackFormat(input string) string

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.

func (Metadata) Validate

func (m Metadata) Validate() error

Validate validates metadata.

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

func New(tag, downloadPath string) (Release, bool, error)

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

func (r *Release) CheckHelmCharts() error

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

func (r *Release) ClusterAddonChartPath() string

ClusterAddonChartPath returns the helm chart name from the given path.

func (*Release) ClusterAddonValuesPath

func (r *Release) ClusterAddonValuesPath() string

ClusterAddonValuesPath returns the path to the cluster addon values file.

func (*Release) ClusterClassChartPath

func (r *Release) ClusterClassChartPath() string

ClusterClassChartPath returns the absolute helm chart path for cluster class.

func (*Release) Validate

func (r *Release) Validate() error

Validate validates the release.

type Versions

type Versions struct {
	ClusterStack string     `yaml:"clusterStack"`
	Kubernetes   string     `yaml:"kubernetes"`
	Components   Components `yaml:"components"`
}

Versions is the cluster stack versions.

Jump to

Keyboard shortcuts

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