Documentation ¶
Index ¶
- Variables
- func ChartsGet(helmEnv *cli.EnvSettings, repos, chart, Keyword, version string) (map[string][]repo.ChartVersions, error)
- func DownloadChartFromRepo(name, version string, env *cli.EnvSettings) (string, error)
- func GetRepoFilePath(env *cli.EnvSettings) string
- func InstallHelmClient(env *cli.EnvSettings) error
- func InstallLocalHelm(env *cli.EnvSettings, repoMap map[string]string) error
- func NewChartRepositoryWarp(cfg *repo.Entry, settings *cli.EnvSettings) (*repo.ChartRepository, error)
- func NewCustomGetter(namespace string, kubeconfig []byte, cacheDir string, logger logr.Logger) (genericclioptions.RESTClientGetter, error)
- func ReposAdd(env *cli.EnvSettings, c *repo.Entry) (bool, error)
- func ReposDelete(env *cli.EnvSettings, repoName string) error
- func ReposGet(env *cli.EnvSettings) ([]*repo.Entry, error)
- func ReposModify(env *cli.EnvSettings, repoName string, newRepo *repo.Entry) error
- func ReposUpdate(env *cli.EnvSettings, repoName string) error
- func UninstallReleases(helmEnv *HelmEnv, releaseName string, opt *Options) error
- type HelmEnv
- type HelmIndexSyncer
- type Options
- type Release
- func ApplyRelease(helmEnv *HelmEnv, rlsName, chartUrlName, specChartVersion string, ...) (*Release, error)
- func InstallRelease(ctx context.Context, helmEnv *HelmEnv, releaseInput *Release, options *Options) (*Release, error)
- func ListReleases(_ context.Context, helmEnv *HelmEnv, opt *Options) ([]*Release, error)
- func UpgradeRelease(ctx context.Context, helmEnv *HelmEnv, releaseInput *Release, options *Options) (*Release, error)
- type ReleaseInfo
Constants ¶
This section is empty.
Variables ¶
var ErrRepoNotFound = errors.New("helm repository not found!")
ErrRepoNotFound describe an error if helm repository not found
Functions ¶
func ChartsGet ¶
func ChartsGet(helmEnv *cli.EnvSettings, repos, chart, Keyword, version string) (map[string][]repo.ChartVersions, error)
func DownloadChartFromRepo ¶
func DownloadChartFromRepo(name, version string, env *cli.EnvSettings) (string, error)
DownloadChartFromRepo download a given chart
func GetRepoFilePath ¶
func GetRepoFilePath(env *cli.EnvSettings) string
func InstallHelmClient ¶
func InstallHelmClient(env *cli.EnvSettings) error
InstallHelmClient Installs helm client on a given path
func InstallLocalHelm ¶
func InstallLocalHelm(env *cli.EnvSettings, repoMap map[string]string) error
InstallLocalHelm install helm into the given path
func NewChartRepositoryWarp ¶
func NewChartRepositoryWarp(cfg *repo.Entry, settings *cli.EnvSettings) (*repo.ChartRepository, error)
func NewCustomGetter ¶
func NewCustomGetter(namespace string, kubeconfig []byte, cacheDir string, logger logr.Logger) (genericclioptions.RESTClientGetter, error)
func ReposDelete ¶
func ReposDelete(env *cli.EnvSettings, repoName string) error
ReposDelete deletes repo(s)
func ReposModify ¶
ReposModify modifies repo(s)
func ReposUpdate ¶
func ReposUpdate(env *cli.EnvSettings, repoName string) error
ReposUpdate updates a repo(s)
Types ¶
type HelmEnv ¶
type HelmEnv struct { KubeCache string Cli *cli.EnvSettings KubeCli kubernetes.Interface genericclioptions.RESTClientGetter }
func InitHelmRepoEnv ¶
InitHelmRepoEnv Generate helm path based on orgName
func NewHelmEnv ¶
type HelmIndexSyncer ¶
type HelmIndexSyncer struct { HelmEnv *HelmEnv // interval is the interval of the sync process Interval int }
HelmIndexSyncer sync helm repo index repeatedly
func NewDefaultHelmIndexSyncer ¶
func NewDefaultHelmIndexSyncer(helmEnv *HelmEnv) *HelmIndexSyncer
func (*HelmIndexSyncer) Start ¶
func (h *HelmIndexSyncer) Start(stop <-chan struct{}) error
type Options ¶
type Options struct { Namespace string `json:"namespace,omitempty"` DryRun bool `json:"dryRun,omitempty"` GenerateName bool `json:"generateName,omitempty"` Wait bool `json:"wait,omitempty"` Timeout int64 `json:"timeout,omitempty"` ReuseValues bool `json:"reuseValues,omitempty"` Install bool `json:"install,omitempty"` Filter *string `json:"filter,omitempty"` SkipCRDs bool `json:"skipCRDs,omitempty"` }
Options struct holding directives for driving helm operations (similar to command line flags) extend this as required eventually build a more sophisticated solution for it
type Release ¶
type Release struct { // ReleaseInput struct encapsulating information about the release to be created ReleaseName string ChartName string Namespace string Values map[string]interface{} //json representation Version string ReleaseInfo *ReleaseInfo ReleaseVersion int32 ReleaseResources []*object.K8sObject ChartPackage []byte }
Release represents information related to a helm chart release
func ApplyRelease ¶
func ApplyRelease(helmEnv *HelmEnv, rlsName, chartUrlName, specChartVersion string, chartPackage []byte, namespace string, va []byte, runningRls *Release) (*Release, error)
Create or update a release, creating it if release parameter is nil, otherwise, updating it.
func InstallRelease ¶
func ListReleases ¶
func UpgradeRelease ¶
func (*Release) NameAndChartSlice ¶
type ReleaseInfo ¶
type ReleaseInfo struct { // FirstDeployed is when the release was first deployed. FirstDeployed time.Time `json:"first_deployed,omitempty"` // LastDeployed is when the release was last deployed. LastDeployed time.Time `json:"last_deployed,omitempty"` // Deleted tracks when this object was deleted. Deleted time.Time `json:"deleted"` // Description is human-friendly "log entry" about this release. Description string `json:"description,omitempty"` // Status is the current state of the release Status string // Contains the rendered templates/NOTES.txt if available Notes string // Contains override values provided to the release Values map[string]interface{} }
ReleaseInfo copy of the struct form the helm library