Documentation ¶
Overview ¶
Package helm introduces the integration with helm, for example: install / upgrade Chaos Mesh on remote cluster
Index ¶
- Constants
- func DownloadChaosMeshChartTgz(ctx context.Context, version string) (string, error)
- func FetchChaosMeshChart(ctx context.Context, version string) (*chart.Chart, error)
- func NewRESTClientGetter(clientConfig clientcmd.ClientConfig) genericclioptions.RESTClientGetter
- type HelmClient
- func (h *HelmClient) GetRelease(namespace string, releaseName string) (*release.Release, error)
- func (h *HelmClient) UninstallRelease(namespace string, releaseName string) (*release.UninstallReleaseResponse, error)
- func (h *HelmClient) UpgradeOrInstall(namespace string, releaseName string, chart *chart.Chart, ...) (*release.Release, error)
- type ReleaseService
Examples ¶
Constants ¶
View Source
const ChaosMeshHelmRepo = "https://charts.chaos-mesh.org"
Variables ¶
This section is empty.
Functions ¶
func DownloadChaosMeshChartTgz ¶
Example ¶
path, err := DownloadChaosMeshChartTgz(context.Background(), "2.2.0") if err != nil { panic(err) } fmt.Fprintln(os.Stderr, path)
Output:
func FetchChaosMeshChart ¶
Example ¶
chart, err := FetchChaosMeshChart(context.Background(), "2.2.0") if err != nil { panic(err) } fmt.Fprintln(os.Stderr, chart.Name()) fmt.Fprintln(os.Stderr, chart.Metadata.Version) fmt.Fprintln(os.Stderr, chart.AppVersion())
Output:
func NewRESTClientGetter ¶
func NewRESTClientGetter(clientConfig clientcmd.ClientConfig) genericclioptions.RESTClientGetter
Types ¶
type HelmClient ¶
type HelmClient struct {
// contains filtered or unexported fields
}
func NewHelmClient ¶
func NewHelmClient(restClientGetter genericclioptions.RESTClientGetter, logger logr.Logger) (*HelmClient, error)
func (*HelmClient) GetRelease ¶
func (*HelmClient) UninstallRelease ¶
func (h *HelmClient) UninstallRelease(namespace string, releaseName string) (*release.UninstallReleaseResponse, error)
type ReleaseService ¶
type ReleaseService interface { /*GetRelease would fetch the installed release. */ GetRelease(namespace string, releaseName string) (*release.Release, error) /*UpgradeOrInstall would upgrade the existed release or install a new one. namespace is the namespace of the release, it should be an existed namespace. releaseName introduces the name of the release. chart is the chart with certain version to be installed. values is the values to be used in the chart, it is also so-called Config in helm's codes. It will return the installed/upgraded release and error if any. */ UpgradeOrInstall(namespace string, releaseName string, chart *chart.Chart, values map[string]interface{}) (*release.Release, error) UninstallRelease(namespace string, releaseName string) (*release.UninstallReleaseResponse, error) }
ReleaseService introduces all the operations about Helm Release
Click to show internal directories.
Click to hide internal directories.