Documentation ¶
Index ¶
- Constants
- func GetCRDFromChart(chart *chart.Chart) []*crdv1.CustomResourceDefinition
- func GetDeploymentsFromManifest(helmManifest string) []*appsv1.Deployment
- func GetHelmRelease(ns string) ([]*release.Release, error)
- func LoadRepoIndex(ctx context.Context, u string, cred *RepoCredential) (*helmrepo.IndexFile, error)
- func SetHTTPOption(ctx context.Context, k8sClient client.Client, secretRef types2.NamespacedName) (*common.HTTPOption, error)
- type ChartValues
- type Helper
- func (h *Helper) GetIndexInfo(repoURL string, skipCache bool, opts *common.HTTPOption) (*repo.IndexFile, error)
- func (h *Helper) GetValuesFromChart(repoURL string, chartName string, version string, skipCache bool, ...) (*ChartValues, error)
- func (h *Helper) ListChartsFromRepo(repoURL string, skipCache bool, opts *common.HTTPOption) ([]string, error)
- func (h *Helper) ListVersions(repoURL string, chartName string, skipCache bool, opts *common.HTTPOption) (repo.ChartVersions, error)
- func (h *Helper) LoadCharts(chartRepoURL string, opts *common.HTTPOption) (*chart.Chart, error)
- func (h *Helper) UninstallRelease(releaseName, namespace string, config *rest.Config, showDetail bool, ...) error
- func (h *Helper) UpgradeChart(ch *chart.Chart, releaseName, namespace string, values map[string]interface{}, ...) (*release.Release, error)
- func (h *Helper) ValidateRepo(ctx context.Context, repo *Repository) (bool, error)
- type RepoCredential
- type Repository
- type UpgradeChartOptions
Constants ¶
const IndexYaml = "index.yaml"
IndexYaml is the index.yaml of helm repo
Variables ¶
This section is empty.
Functions ¶
func GetCRDFromChart ¶ added in v1.2.3
func GetCRDFromChart(chart *chart.Chart) []*crdv1.CustomResourceDefinition
GetCRDFromChart get crd from helm chart
func GetDeploymentsFromManifest ¶ added in v1.2.3
func GetDeploymentsFromManifest(helmManifest string) []*appsv1.Deployment
GetDeploymentsFromManifest get deployment from helm manifest
func GetHelmRelease ¶
GetHelmRelease will get helm release
func LoadRepoIndex ¶ added in v1.9.0
func LoadRepoIndex(ctx context.Context, u string, cred *RepoCredential) (*helmrepo.IndexFile, error)
LoadRepoIndex load helm repo index
func SetHTTPOption ¶ added in v1.5.0
func SetHTTPOption(ctx context.Context, k8sClient client.Client, secretRef types2.NamespacedName) (*common.HTTPOption, error)
SetHTTPOption will read username and password from secret return a httpOption that contain these info.
Types ¶
type ChartValues ¶ added in v1.7.4
ChartValues contain all values files in chart and default chart values
type Helper ¶ added in v1.2.3
type Helper struct {
// contains filtered or unexported fields
}
Helper provides helper functions for common Helm operations
func NewHelperWithCache ¶ added in v1.3.0
func NewHelperWithCache() *Helper
NewHelperWithCache creates a Helper with cache usually used by apiserver
func (*Helper) GetIndexInfo ¶ added in v1.3.0
func (h *Helper) GetIndexInfo(repoURL string, skipCache bool, opts *common.HTTPOption) (*repo.IndexFile, error)
GetIndexInfo get index.yaml form given repo url
func (*Helper) GetValuesFromChart ¶ added in v1.3.0
func (h *Helper) GetValuesFromChart(repoURL string, chartName string, version string, skipCache bool, repoType string, opts *common.HTTPOption) (*ChartValues, error)
GetValuesFromChart will extract the parameter from a helm chart
func (*Helper) ListChartsFromRepo ¶ added in v1.3.0
func (h *Helper) ListChartsFromRepo(repoURL string, skipCache bool, opts *common.HTTPOption) ([]string, error)
ListChartsFromRepo list available helm charts in a repo
func (*Helper) ListVersions ¶ added in v1.2.3
func (h *Helper) ListVersions(repoURL string, chartName string, skipCache bool, opts *common.HTTPOption) (repo.ChartVersions, error)
ListVersions list available versions from repo
func (*Helper) LoadCharts ¶ added in v1.2.3
LoadCharts load helm chart from local or remote
func (*Helper) UninstallRelease ¶ added in v1.2.3
func (h *Helper) UninstallRelease(releaseName, namespace string, config *rest.Config, showDetail bool, logging cmdutil.IOStreams) error
UninstallRelease uninstalls the provided release
func (*Helper) UpgradeChart ¶ added in v1.2.3
func (h *Helper) UpgradeChart(ch *chart.Chart, releaseName, namespace string, values map[string]interface{}, config UpgradeChartOptions) (*release.Release, error)
UpgradeChart install or upgrade helm chart
func (*Helper) ValidateRepo ¶ added in v1.9.0
ValidateRepo will validate the helm repository
type RepoCredential ¶ added in v1.9.0
type RepoCredential struct { // chart repository username Username string `json:"username,omitempty"` // chart repository password Password string `json:"password,omitempty"` // identify HTTPS client using this SSL certificate file CertFile string `json:"certFile,omitempty"` // identify HTTPS client using this SSL key file KeyFile string `json:"keyFile,omitempty"` // verify certificates of HTTPS-enabled servers using this CA bundle CAFile string `json:"caFile,omitempty"` // skip tls certificate checks for the repository, default is ture InsecureSkipTLSVerify *bool `json:"insecureSkipTLSVerify,omitempty"` }
RepoCredential is the helm repo credential