helm

package
v0.0.0-...-ada06ba Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRepoNotFound = errors.New("helm repository not found!")

ErrRepoNotFound describe an error if helm repository not found

Functions

func CheckDeploymentState

func CheckDeploymentState(kubeConfig []byte, releaseName string) (string, error)

CheckDeploymentState checks the state of Helm deployment

func CreateDeployment

func CreateDeployment(chartName string, releaseName string, valueOverrides []byte, kubeConfig []byte, path string) (*rls.InstallReleaseResponse, error)

CreateDeployment creates a Helm deployment

func DeleteAllDeployment

func DeleteAllDeployment(kubeconfig []byte) error

DeleteAllDeployment deletes all Helm deployment

func DeleteDeployment

func DeleteDeployment(releaseName string, kubeConfig []byte) error

DeleteDeployment deletes a Helm deployment

func GetDeployment

func GetDeployment()

GetDeployment - N/A

func GetDeploymentStatus

func GetDeploymentStatus(releaseName string, kubeConfig []byte) (int32, error)

GetDeploymentStatus retrieves the status of the passed in release name. returns with an error if the release is not found or another error occurs in case of error the status is filled with information to classify the error cause

func GetHelmClient

func GetHelmClient(kubeConfig []byte) (*helm.Client, error)

GetHelmClient establishes Tunnel for Helm client TODO check client and config if both needed

func GetK8sClientConfig

func GetK8sClientConfig(kubeConfig []byte) (*rest.Config, error)

GetK8sClientConfig creates a Kubernetes client config

func GetK8sConnection

func GetK8sConnection(kubeConfig []byte) (*kubernetes.Clientset, error)

GetK8sConnection creates a new Kubernetes client

func GetK8sInClusterConnection

func GetK8sInClusterConnection() (*kubernetes.Clientset, error)

GetK8sInClusterConnection returns Kubernetes in-cluster configuration

func Install

func Install(helmInstall *helm.Install, kubeConfig []byte, path string) error

Install uses Kubernetes client to install Tiller.

func ListDeployments

func ListDeployments(filter *string, kubeConfig []byte) (*rls.ListReleasesResponse, error)

ListDeployments lists Helm deployments

func PreInstall

func PreInstall(helmInstall *helm.Install, kubeConfig []byte) error

PreInstall create's ServiceAccount and AccountRoleBinding

func ReposAdd

func ReposAdd(clusterName string, Hrepo *repo.Entry) error

ReposAdd adds repo(s)

func ReposDelete

func ReposDelete(clusterName, repoName string) error

ReposDelete deletes repo(s)

func ReposGet

func ReposGet(clusterName string) ([]*repo.Entry, error)

ReposGet returns repo

func ReposModify

func ReposModify(clusterName, repoName string, newRepo *repo.Entry) error

ReposModify modifies repo(s)

func ReposUpdate

func ReposUpdate(clusterName, repoName string) error

ReposUpdate updates a repo(s)

func RetryHelmInstall

func RetryHelmInstall(helmInstall *helm.Install, kubeconfig []byte, path string) error

RetryHelmInstall retries for a configurable time/interval Azure AKS sometimes failing because of TLS handshake timeout, there are several issues on GitHub about that: https://github.com/Azure/AKS/issues/112, https://github.com/Azure/AKS/issues/116, https://github.com/Azure/AKS/issues/14

func UpgradeDeployment

func UpgradeDeployment(deploymentName, chartName string, values []byte, reuseValues bool, kubeConfig []byte, path string) (*rls.UpdateReleaseResponse, error)

UpgradeDeployment upgrades a Helm deployment

Types

type ChartDetails

type ChartDetails struct {
	Name    string             `json:"name"`
	Repo    string             `json:"repo"`
	Chart   *repo.ChartVersion `json:"chart"`
	Values  string             `json:"values"`
	Readme  string             `json:"readme"`
	Options []SpotguideOptions `json:"options"`
}

ChartDetails describes a chart details

func ChartGet

func ChartGet(clusterName, chartRepo, chartName, chartVersion string) (*ChartDetails, error)

ChartGet returns chart details

type ChartList

type ChartList struct {
	Name   string               `json:"name"`
	Charts []repo.ChartVersions `json:"charts"`
}

ChartList describe a chart list

func ChartsGet

func ChartsGet(clusterName, queryName, queryRepo, queryVersion, queryKeyword string) ([]ChartList, error)

ChartsGet returns chart list

type SpotGuideFile

type SpotGuideFile struct {
	Options []SpotguideOptions `json:"options"`
}

SpotGuideFile describes a spotguide file with the options

type SpotguideOptions

type SpotguideOptions struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	Default bool   `json:"default"`
	Info    string `json:"info"`
	Key     string `json:"key"`
}

SpotguideOptions describes a spotguide options

Jump to

Keyboard shortcuts

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