Documentation ¶
Index ¶
- Constants
- Variables
- func AddRepo(r *repo.Entry) error
- func AddonGVR() schema.GroupVersionResource
- func ConfigmapGVR() schema.GroupVersionResource
- func GetHelmChartRepoURL() string
- func GetIPLocation() (string, error)
- func GetQuiteLog() action.DebugLog
- func GetResourceObjectFromGVR(gvr schema.GroupVersionResource, key client.ObjectKey, ...) error
- func GetVerboseLog() action.DebugLog
- func NewActionConfig(cfg *Config) (*action.Configuration, error)
- func NewConfigFlagNoWarnings() *genericclioptions.ConfigFlags
- func NewFactory() cmdutil.Factory
- func ReleaseNotFound(err error) bool
- type Config
- type InstallOpts
Constants ¶
View Source
const ( K8sCoreAPIVersion = "v1" ResourceConfigmaps = "configmaps" )
View Source
const ( ExtensionsAPIGroup = "extensions.kubeblocks.io" ExtensionsAPIVersion = "v1alpha1" ResourceAddons = "addons" )
Extensions API group
Variables ¶
View Source
var ( // KubeBlocksRepoName helm repo name for kubeblocks KubeBlocksRepoName = "kubeblocks" // KubeBlocksChartName helm chart name for kubeblocks KubeBlocksChartName = "kubeblocks" // KubeBlocksReleaseName helm release name for kubeblocks KubeBlocksReleaseName = "kubeblocks" // KubeBlocksChartURL the helm chart repo for installing kubeblocks KubeBlocksChartURL = "https://apecloud.github.io/helm-charts" // GitLabHelmChartRepo the helm chart repo in GitLab GitLabHelmChartRepo = "https://jihulab.com/api/v4/projects/85949/packages/helm/stable" // CfgKeyHelmRepoURL the helm repo url key CfgKeyHelmRepoURL = "HELM_REPO_URL" )
The purpose of this package is to remove the dependency of the KubeBlocks project on 'pkg/cli'.
Functions ¶
func AddonGVR ¶
func AddonGVR() schema.GroupVersionResource
func ConfigmapGVR ¶
func ConfigmapGVR() schema.GroupVersionResource
func GetHelmChartRepoURL ¶
func GetHelmChartRepoURL() string
GetHelmChartRepoURL gets helm chart repo, chooses one from GitHub and GitLab based on the IP location
func GetIPLocation ¶
func GetQuiteLog ¶
func GetResourceObjectFromGVR ¶
func GetResourceObjectFromGVR(gvr schema.GroupVersionResource, key client.ObjectKey, client dynamic.Interface, k8sObj interface{}) error
GetResourceObjectFromGVR queries the resource object using GVR.
func GetVerboseLog ¶
func NewActionConfig ¶
func NewActionConfig(cfg *Config) (*action.Configuration, error)
func NewConfigFlagNoWarnings ¶
func NewConfigFlagNoWarnings() *genericclioptions.ConfigFlags
NewConfigFlagNoWarnings returns a ConfigFlags that disables warnings.
func NewFactory ¶
func ReleaseNotFound ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) SetNamespace ¶
type InstallOpts ¶
type InstallOpts struct { Name string Chart string Namespace string Wait bool Version string TryTimes int Login bool CreateNamespace bool ValueOpts *values.Options Timeout time.Duration Atomic bool DisableHooks bool ForceUninstall bool // for helm template DryRun *bool OutputDir string IncludeCRD bool }
func (*InstallOpts) GetInstalled ¶
func (i *InstallOpts) GetInstalled(cfg *action.Configuration) (*release.Release, error)
GetInstalled gets helm package release info if installed.
func (*InstallOpts) Install ¶
func (i *InstallOpts) Install(cfg *Config) (*release.Release, error)
Install installs a Chart
func (*InstallOpts) RemoveRemainSecrets ¶
func (i *InstallOpts) RemoveRemainSecrets(cfg *action.Configuration) (int, error)
func (*InstallOpts) Uninstall ¶
func (i *InstallOpts) Uninstall(cfg *Config) error
Uninstall uninstalls a Chart
Click to show internal directories.
Click to hide internal directories.