interfaces

package
v0.0.0-...-04db488 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Helm

type Helm interface {
	Initialize(execConfig *HelmExecConfig, chartsSource *HelmChartsSource) error
	Exec(subCommand string) (string, error)
	GetAvailableChartVersions(chartName string) ([]*HelmAvailableChartVersion, error)
	GetReleaseStatus(chartName string, chartNamespace string) (*HelmReleaseStatus, error)
	GetExecConfig() *HelmExecConfig
}

Helm is an interface for a helm command object instance

type HelmAvailableChartVersion

type HelmAvailableChartVersion struct {
	Path    string
	Version string
}

HelmAvailableChartVersion is a single version available for a chart

type HelmChartsSource

type HelmChartsSource struct {
	RepoName     string
	Repo         string
	RepoUsername string
	RepoPassword string
	Path         string
}

HelmChartsSource is an object storing config for where our Helm charts exist

type HelmExecConfig

type HelmExecConfig struct {
	Shell          shell.Interface
	Binary         string
	KubeconfigPath string
	KubeContext    string
}

HelmExecConfig are settings/config related to running shell helm commands

type HelmReleaseStatus

type HelmReleaseStatus struct {
	Info     *HelmReleaseStatusInfo `yaml:"info"`
	Revision int                    `yaml:"version"`
}

HelmReleaseStatus represents a minimal representation of helm release status YAML output

type HelmReleaseStatusInfo

type HelmReleaseStatusInfo struct {
	Status string `yaml:"status"`
}

HelmReleaseStatusInfo represents a minimal representation of helm release status YAML info status

type Kubernetes

type Kubernetes interface {
	Initialize(kubeconfigPath string, kubeContext string) error
	IsRetryError(err error) bool
	EnsureNamespace(name string) error
	FindConfigMap(name string, namespace string, withKey string, withValue string) (*v1.ConfigMap, error)
	InitializeShipConfigMap(name string, namespace string, data map[string]string) (*v1.ConfigMap, error)
	InitializeLogConfigMap(name string, namespace string, data map[string]string) (*v1.ConfigMap, error)
	PatchConfigMap(name string, namespace string, data map[string]string) (*v1.ConfigMap, error)
	GetSecretKeyValue(secretName string, namespace string, dataKey string) (string, error)
}

Kubernetes is the interface for a k8s api object instance

type Manifest

type Manifest interface {
	GetName() string
	Create(initializeCharts []string) (string, error)
	Load(manifestContent string) error
	SetLogger(log *logger.Logger)
	SetTempDirectory(tempDirectory string)
	Release(kubernetes Kubernetes, helm Helm) []*ManifestReleaseError
}

Manifest is the interface for all manifest schema versions

type ManifestReleaseError

type ManifestReleaseError struct {
	Chart     string
	Version   string
	Namespace string
	Error     error
}

ManifestReleaseError is a general-use object for recording manifest release errors

Jump to

Keyboard shortcuts

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