helm

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RuntimeAnnotationKey = "openpitrix_runtime"

	DeploymentFlag  = "-Deployment"
	StatefulSetFlag = "-StatefulSet"
	DaemonSetFlag   = "-DaemonSet"
)

Variables

View Source
var (
	ClusterNameReg    = `^[a-z]([-a-z0-9]*[a-z0-9])?$`
	ClusterNameRegExp = regexp.MustCompile(ClusterNameReg)
)
View Source
var (
	NamespaceReg    = `^[a-z]([-a-z0-9]*[a-z0-9])?$`
	NamespaceRegExp = regexp.MustCompile(NamespaceReg)
)

Functions

func ConvertJsonToYaml added in v0.1.8

func ConvertJsonToYaml(data []byte) ([]byte, error)

func GetLabelString added in v0.1.8

func GetLabelString(m map[string]string) string

func GetStringFromValues added in v0.1.8

func GetStringFromValues(vals map[string]interface{}, key string) (string, bool)

Types

type HelmHandler added in v0.1.8

type HelmHandler struct {
	RuntimeId string
	// contains filtered or unexported fields
}

func GetHelmHandler added in v0.1.8

func GetHelmHandler(ctx context.Context, runtimeId string) *HelmHandler

func (*HelmHandler) CheckClusterNameIsUnique added in v0.1.8

func (p *HelmHandler) CheckClusterNameIsUnique(clusterName string) error

func (*HelmHandler) DeleteRelease added in v0.1.8

func (p *HelmHandler) DeleteRelease(releaseName string, purge bool) error

func (*HelmHandler) InstallReleaseFromChart added in v0.1.8

func (p *HelmHandler) InstallReleaseFromChart(c *chart.Chart, ns string, rawVals []byte, releaseName string) error

func (*HelmHandler) ReleaseStatus added in v0.1.8

func (p *HelmHandler) ReleaseStatus(releaseName string) (*rls.GetReleaseStatusResponse, error)

func (*HelmHandler) RollbackRelease added in v0.1.8

func (p *HelmHandler) RollbackRelease(releaseName string) error

func (*HelmHandler) UpdateReleaseFromChart added in v0.1.8

func (p *HelmHandler) UpdateReleaseFromChart(releaseName string, c *chart.Chart, rawVals []byte) error

type JobDirective

type JobDirective struct {
	Namespace   string
	RuntimeId   string
	Values      string
	ClusterName string
}

type KubeHandler added in v0.1.8

type KubeHandler struct {
	RuntimeId string
	// contains filtered or unexported fields
}

func GetKubeHandler added in v0.1.8

func GetKubeHandler(ctx context.Context, runtimeId string) *KubeHandler

func (*KubeHandler) CheckApiVersionsSupported added in v0.1.8

func (p *KubeHandler) CheckApiVersionsSupported(apiVersions []string) error

func (*KubeHandler) DescribeClusterDetails added in v0.2.1

func (p *KubeHandler) DescribeClusterDetails(clusterWrapper *models.ClusterWrapper) error

func (*KubeHandler) DescribeRuntimeProviderZones added in v0.1.8

func (p *KubeHandler) DescribeRuntimeProviderZones(credential string) ([]string, error)

func (*KubeHandler) ValidateCredential added in v0.1.8

func (p *KubeHandler) ValidateCredential(credential, zone string) error

func (*KubeHandler) WaitWorkloadReady added in v0.2.1

func (p *KubeHandler) WaitWorkloadReady(runtimeId, namespace string, clusterRoles map[string]*models.ClusterRole, timeout time.Duration, waitInterval time.Duration) error

type Parser

type Parser struct {
	Chart     *chart.Chart
	Conf      string
	VersionId string
	RuntimeId string
	Namespace string
	// contains filtered or unexported fields
}

func (*Parser) Parse

func (p *Parser) Parse(clusterWrapper *models.ClusterWrapper) error

type Provider

type Provider struct{}

func NewProvider

func NewProvider() *Provider

func (*Provider) CheckResource added in v0.1.7

func (p *Provider) CheckResource(ctx context.Context, clusterWrapper *models.ClusterWrapper) error

func (*Provider) DescribeClusterDetails added in v0.2.1

func (p *Provider) DescribeClusterDetails(ctx context.Context, clusterWrapper *models.ClusterWrapper) error

func (*Provider) DescribeRuntimeProviderZones

func (p *Provider) DescribeRuntimeProviderZones(ctx context.Context, url, credential string) ([]string, error)

func (*Provider) DescribeSubnets

func (*Provider) DescribeVpc

func (p *Provider) DescribeVpc(ctx context.Context, runtimeId, vpcId string) (*models.Vpc, error)

func (*Provider) HandleSubtask

func (p *Provider) HandleSubtask(ctx context.Context, task *models.Task) error

func (*Provider) ParseClusterConf

func (p *Provider) ParseClusterConf(ctx context.Context, versionId, runtimeId, conf string, clusterWrapper *models.ClusterWrapper) error

func (*Provider) SplitJobIntoTasks

func (p *Provider) SplitJobIntoTasks(ctx context.Context, job *models.Job) (*models.TaskLayer, error)

func (*Provider) UpdateClusterStatus

func (p *Provider) UpdateClusterStatus(ctx context.Context, job *models.Job) error

func (*Provider) ValidateCredential

func (p *Provider) ValidateCredential(ctx context.Context, runtimeId, url, credential, zone string) error

func (*Provider) WaitSubtask

func (p *Provider) WaitSubtask(ctx context.Context, task *models.Task) error

type TaskDirective

type TaskDirective struct {
	VersionId         string
	Namespace         string
	RuntimeId         string
	Values            string
	ClusterName       string
	RawClusterWrapper string
}

Jump to

Keyboard shortcuts

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