release

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

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

This section is empty.

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) ClusterAddonChartPath

func (r *Release) ClusterAddonChartPath() (string, error)

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, error)

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