helmapi

package
v0.0.0-...-45cbd8e Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// LocalRepository is the standard name of the local repository
	LocalRepository = "local"

	// LocalRepositoryIndexFile is the standard name of the local repository index file
	LocalRepositoryIndexFile = "index.yaml"
)

Variables

This section is empty.

Functions

func GetSettings

func GetSettings() helm_env.EnvSettings

GetSettings GetSettings

Types

type HelmCommand

type HelmCommand interface {
	SetNewClient(helmConnection HelmConnection, tillerHost string)
	// contains filtered or unexported methods
}

HelmCommand HelmCommand

type HelmConnection

type HelmConnection interface {
	SetupConnection(kubeConfig string) (string, *kube.Tunnel, error)
	Teardown(tillerTunnel *kube.Tunnel)
	ConfigForContext(context string, kubeconfig string) (*rest.Config, error)
	NewClient(tillerHost string) helm.Interface
	GetKubeClient(context string, kubeconfig string) (*rest.Config, kubernetes.Interface, error)
}

HelmConnection HelmConnection

type HelmConnectionImpl

type HelmConnectionImpl struct {
}

HelmConnectionImpl HelmConnectionImpl

func (HelmConnectionImpl) ConfigForContext

func (h HelmConnectionImpl) ConfigForContext(context string, kubeconfig string) (*rest.Config, error)

ConfigForContext creates a Kubernetes REST client configuration for a given kubeconfig context.

func (HelmConnectionImpl) GetKubeClient

func (h HelmConnectionImpl) GetKubeClient(context string, kubeconfig string) (*rest.Config, kubernetes.Interface, error)

GetKubeClient creates a Kubernetes config and client for a given kubeconfig context.

func (HelmConnectionImpl) NewClient

func (h HelmConnectionImpl) NewClient(tillerHost string) helm.Interface

NewClient NewClient

func (HelmConnectionImpl) SetupConnection

func (h HelmConnectionImpl) SetupConnection(kubeConfig string) (string, *kube.Tunnel, error)

SetupConnection SetupConnection

func (HelmConnectionImpl) Teardown

func (h HelmConnectionImpl) Teardown(tillerTunnel *kube.Tunnel)

Teardown Teardown

type HelmExecutorFunc

type HelmExecutorFunc func(kubeconfig string, cmd HelmCommand) error

HelmExecutorFunc HelmExecutorFunc

type HelmListResult

type HelmListResult struct {
	Next     string
	Releases []ListRelease
}

HelmListResult Structure

type HelmServiceImpl

type HelmServiceImpl struct {
	HelmConnection HelmConnection
}

HelmServiceImpl - Concrete type

func HelmServiceBuilder

func HelmServiceBuilder() *HelmServiceImpl

HelmServiceBuilder HelmServiceBuilder

func (HelmServiceImpl) AddRepository

func (svc HelmServiceImpl) AddRepository(repo model.Repository) error

AddRepository - Add new repository

func (HelmServiceImpl) DeleteHelmRelease

func (svc HelmServiceImpl) DeleteHelmRelease(kubeconfig string, releaseName string, purge bool) error

DeleteHelmRelease - Delete a Release

func (HelmServiceImpl) DeletePod

func (svc HelmServiceImpl) DeletePod(kubeconfig string, podName string, namespace string) error

DeletePod - Delete a Pod

func (HelmServiceImpl) Get

func (svc HelmServiceImpl) Get(kubeconfig string, releaseName string, revision int) (string, error)

Get - All

func (HelmServiceImpl) GetDeployment

func (svc HelmServiceImpl) GetDeployment(chartName string, version string) ([]byte, error)

GetDeployment - Retrieve a deployment chart template

func (HelmServiceImpl) GetHelmConnection

func (svc HelmServiceImpl) GetHelmConnection() HelmConnection

GetHelmConnection GetHelmConnection

func (HelmServiceImpl) GetHelmReleaseHistory

func (svc HelmServiceImpl) GetHelmReleaseHistory(kubeconfig string, releaseName string) (ReleaseHistory, error)

GetHelmReleaseHistory - Get helm release history

func (HelmServiceImpl) GetPods

func (svc HelmServiceImpl) GetPods(kubeconfig string, namespace string) ([]model.Pod, error)

GetPods Method

func (HelmServiceImpl) GetReleaseHistory

func (svc HelmServiceImpl) GetReleaseHistory(kubeconfig string, releaseName string) (bool, error)

GetReleaseHistory - Retrieve Release History

func (HelmServiceImpl) GetRepositories

func (svc HelmServiceImpl) GetRepositories() ([]model.Repository, error)

GetRepositories - Returns a repository list

func (HelmServiceImpl) GetServices

func (svc HelmServiceImpl) GetServices(kubeconfig string, namespace string) ([]model.Service, error)

GetServices - Get Service information

func (HelmServiceImpl) GetTemplate

func (svc HelmServiceImpl) GetTemplate(mutex *sync.Mutex, chartName string, version string, kind string) ([]byte, error)

GetTemplate - Retrieve a chart template called deployment.yaml

func (HelmServiceImpl) GetValues

func (svc HelmServiceImpl) GetValues(chartName string, version string) ([]byte, error)

GetValues Method

func (HelmServiceImpl) GetVirtualServices

func (svc HelmServiceImpl) GetVirtualServices(kubeconfig string, namespace string) ([]string, error)

GetVirtualServices Get virtual services dns names

func (HelmServiceImpl) HelmCommandExecutor

func (svc HelmServiceImpl) HelmCommandExecutor(fn HelmExecutorFunc) HelmExecutorFunc

HelmCommandExecutor HelmCommandExecutor

func (HelmServiceImpl) HelmExecutorFunc

func (svc HelmServiceImpl) HelmExecutorFunc(kubeconfig string, cmd HelmCommand) error

HelmExecutorFunc HelmExecutorFunc

func (HelmServiceImpl) InitializeHelm

func (svc HelmServiceImpl) InitializeHelm()

InitializeHelm - Initialize a Helm repository

func (HelmServiceImpl) IsThereAnyPodWithThisVersion

func (svc HelmServiceImpl) IsThereAnyPodWithThisVersion(kubeconfig string, namespace string, releaseName string, tag string) (bool, error)

IsThereAnyPodWithThisVersion - Verify if is there a pod with a specific version deployed

func (HelmServiceImpl) ListHelmDeployments

func (svc HelmServiceImpl) ListHelmDeployments(kubeconfig string, namespace string) (*HelmListResult, error)

ListHelmDeployments method

func (HelmServiceImpl) RemoveRepository

func (svc HelmServiceImpl) RemoveRepository(name string) error

RemoveRepository - Remove a repository

func (HelmServiceImpl) RepoUpdate

func (svc HelmServiceImpl) RepoUpdate() error

RepoUpdate - Update a repository

func (HelmServiceImpl) RollbackRelease

func (svc HelmServiceImpl) RollbackRelease(kubeconfig string, releaseName string, revision int) error

RollbackRelease - Rollback a release

func (HelmServiceImpl) SearchCharts

func (svc HelmServiceImpl) SearchCharts(searchTerms []string, allVersions bool) *[]model.SearchResult

SearchCharts Methotd

func (HelmServiceImpl) Upgrade

func (svc HelmServiceImpl) Upgrade(upgradeRequest UpgradeRequest, out *bytes.Buffer) error

Upgrade Method

type HelmServiceInterface

type HelmServiceInterface interface {
	InitializeHelm()
	GetServices(kubeconfig string, namespace string) ([]model.Service, error)
	DeletePod(kubeconfig string, podName string, namespace string) error
	GetPods(kubeconfig string, namespace string) ([]model.Pod, error)
	AddRepository(repo model.Repository) error
	GetRepositories() ([]model.Repository, error)
	RemoveRepository(name string) error
	SearchCharts(searchTerms []string, allVersions bool) *[]model.SearchResult
	DeleteHelmRelease(kubeconfig string, releaseName string, purge bool) error
	Get(kubeconfig string, releaseName string, revision int) (string, error)
	IsThereAnyPodWithThisVersion(kubeconfig string, namespace string, releaseName string, tag string) (bool, error)
	GetReleaseHistory(kubeconfig string, releaseName string) (bool, error)
	GetHelmReleaseHistory(kubeconfig string, releaseName string) (ReleaseHistory, error)
	GetTemplate(mutex *sync.Mutex, chartName string, version string, kind string) ([]byte, error)
	GetDeployment(chartName string, version string) ([]byte, error)
	GetValues(chartName string, version string) ([]byte, error)
	ListHelmDeployments(kubeconfig string, namespace string) (*HelmListResult, error)
	RepoUpdate() error
	RollbackRelease(kubeconfig string, releaseName string, revision int) error
	Upgrade(upgradeRequest UpgradeRequest, out *bytes.Buffer) error
	HelmExecutorFunc(kubeconfig string, cmd HelmCommand) error
	GetHelmConnection() HelmConnection
	HelmCommandExecutor(fn HelmExecutorFunc) HelmExecutorFunc
	GetVirtualServices(kubeconfig string, namespace string) ([]string, error)
}

HelmServiceInterface - Interface

type ListRelease

type ListRelease struct {
	Name       string
	Revision   int32
	Updated    string
	Status     string
	Chart      string
	AppVersion string
	Namespace  string
}

ListRelease ListRelease

type ReleaseHistory

type ReleaseHistory []ReleaseInfo

ReleaseHistory Structure

type ReleaseInfo

type ReleaseInfo struct {
	Revision    int32  `json:"revision"`
	Updated     string `json:"updated"`
	Status      string `json:"status"`
	Chart       string `json:"chart"`
	Description string `json:"description"`
}

ReleaseInfo ReleaseInfo

type UpgradeRequest

type UpgradeRequest struct {
	Kubeconfig   string
	Release      string
	Chart        string
	ChartVersion string
	Namespace    string
	Variables    []string
	Dryrun       bool
}

UpgradeRequest UpgradeRequest

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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