helmwrapper

package
v0.0.0-...-18e089f Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 28 Imported by: 2

Documentation

Overview

Copyright 2022 The KubeSphere Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorTimedOutToWaitResource = errors.New("timed out waiting for resources to be ready")

	UninstallNotFoundFormat = "uninstall: Release not loaded: %s: release: not found"
	StatusNotFoundFormat    = "release: not found"
)

Functions

func NewClusterRESTClientGetter

func NewClusterRESTClientGetter(kubeconfig, namespace string) genericclioptions.RESTClientGetter

func NewHelmWrapper

func NewHelmWrapper(kubeconfig, ns, rls string, options ...Option) *helmWrapper

func NewMemoryRESTClientGetter

func NewMemoryRESTClientGetter(kubeConfig []byte, namespace string) genericclioptions.RESTClientGetter

Types

type HelmRes

type HelmRes struct {
	Message string
}

type HelmWrapper

type HelmWrapper interface {
	Install(chartName, chartData, values string) error
	// upgrade a release
	Upgrade(chartName, chartData, values string) error
	Uninstall() error
	// Get manifests
	Manifest() (string, error)

	// IsReleaseReady check helm release is ready or not
	IsReleaseReady(timeout time.Duration) (bool, error)
}

type MemoryRESTClientGetter

type MemoryRESTClientGetter struct {
	// contains filtered or unexported fields
}

MemoryRESTClientGetter is an implementation of the genericclioptions.RESTClientGetter,

func (*MemoryRESTClientGetter) ToDiscoveryClient

func (*MemoryRESTClientGetter) ToRESTConfig

func (c *MemoryRESTClientGetter) ToRESTConfig() (*rest.Config, error)

func (*MemoryRESTClientGetter) ToRESTMapper

func (c *MemoryRESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)

func (*MemoryRESTClientGetter) ToRawKubeConfigLoader

func (c *MemoryRESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig

type Option

type Option func(*helmWrapper)

func SetAnnotations

func SetAnnotations(annotations map[string]string) Option

extra annotations added to all resources in chart

func SetDryRun

func SetDryRun(dryRun bool) Option

func SetLabels

func SetLabels(labels map[string]string) Option

extra labels added to all resources in chart

func SetMock

func SetMock(mock bool) Option

Jump to

Keyboard shortcuts

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