Documentation
¶
Index ¶
- Constants
- func ApplyInNamespace(ctx context.Context, cli client.Client, ns string, objects ...client.Object) error
- func CheckDependecies(requirements Requirements, installs map[string]PluginVersion) error
- func CheckDependecy(requirements Requirements, exist PluginVersion) error
- func CheckHealthy(ctx context.Context, cli client.Client, plugin *PluginVersion)
- func IsPluginChart(cv *repo.ChartVersion) bool
- func ParseInstallerObjects(path string, values GlobalValues, version string) ([]client.Object, error)
- func SemVersionBiggerThan(a, b string) bool
- type Bootstrap
- type ErrorList
- type GlobalValues
- type Plugin
- type PluginManager
- func (m *PluginManager) CheckUpdate(ctx context.Context) (map[string]Plugin, error)
- func (p *PluginManager) DeleteRepo(ctx context.Context, name string) error
- func (m *PluginManager) Get(ctx context.Context, name string) (*Plugin, error)
- func (m *PluginManager) GetGlobalValues(ctx context.Context) (*GlobalValues, error)
- func (m *PluginManager) GetInstalled(ctx context.Context, name string) (*PluginVersion, error)
- func (m *PluginManager) GetPluginVersion(ctx context.Context, name, version string, withSchema bool, ...) (*PluginVersion, error)
- func (m *PluginManager) GetRemote(ctx context.Context, name string) ([]PluginVersion, error)
- func (p *PluginManager) GetRepo(ctx context.Context, name string) (*Repository, error)
- func (m *PluginManager) Install(ctx context.Context, name string, version string, values map[string]any) error
- func (m *PluginManager) ListInstalled(ctx context.Context, checkHealthy bool) (map[string]PluginVersion, error)
- func (m *PluginManager) ListPlugins(ctx context.Context) (map[string]Plugin, error)
- func (m *PluginManager) ListRemote(ctx context.Context) (map[string][]PluginVersion, error)
- func (p *PluginManager) ListRepos(ctx context.Context) (map[string]Repository, error)
- func (m *PluginManager) UnInstall(ctx context.Context, name string) error
- func (p *PluginManager) UpdateRepo(ctx context.Context, repo *Repository) error
- func (p *PluginManager) UpdateReposCache(ctx context.Context) error
- type PluginVersion
- type Repository
- type Requirement
- type Requirements
Constants ¶
View Source
const PluginRepositoriesNamePrefix = "plugin-repository-"
Variables ¶
This section is empty.
Functions ¶
func ApplyInNamespace ¶
func CheckDependecies ¶
func CheckDependecies(requirements Requirements, installs map[string]PluginVersion) error
func CheckDependecy ¶
func CheckDependecy(requirements Requirements, exist PluginVersion) error
func CheckHealthy ¶
func CheckHealthy(ctx context.Context, cli client.Client, plugin *PluginVersion)
func IsPluginChart ¶
func IsPluginChart(cv *repo.ChartVersion) bool
func ParseInstallerObjects ¶
func SemVersionBiggerThan ¶
Types ¶
type Bootstrap ¶
type Bootstrap struct { Config *rest.Config // target cluster config Namespace string // installer namespace }
type GlobalValues ¶
type Plugin ¶
type Plugin struct { Name string `json:"name"` Namespace string `json:"namespace"` MainCategory string `json:"mainCategory"` Category string `json:"category"` Upgradeable *PluginVersion `json:"upgradeable"` Required bool `json:"required"` Installed *PluginVersion `json:"installed"` Available []PluginVersion `json:"available"` Description string `json:"description"` }
type PluginManager ¶
type PluginManager struct { CacheDir string Client client.Client // contains filtered or unexported fields }
func DefaultPluginManager ¶
func DefaultPluginManager(cachedir string) (*PluginManager, error)
func PluginManagerFromClient ¶ added in v1.23.2
func PluginManagerFromClient(cli client.Client) *PluginManager
func (*PluginManager) CheckUpdate ¶
func (*PluginManager) DeleteRepo ¶
func (p *PluginManager) DeleteRepo(ctx context.Context, name string) error
func (*PluginManager) GetGlobalValues ¶
func (m *PluginManager) GetGlobalValues(ctx context.Context) (*GlobalValues, error)
func (*PluginManager) GetInstalled ¶
func (m *PluginManager) GetInstalled(ctx context.Context, name string) (*PluginVersion, error)
func (*PluginManager) GetPluginVersion ¶
func (m *PluginManager) GetPluginVersion(ctx context.Context, name, version string, withSchema bool, withDpendeciesCheck bool) (*PluginVersion, error)
nolint funlen
func (*PluginManager) GetRemote ¶
func (m *PluginManager) GetRemote(ctx context.Context, name string) ([]PluginVersion, error)
func (*PluginManager) GetRepo ¶
func (p *PluginManager) GetRepo(ctx context.Context, name string) (*Repository, error)
func (*PluginManager) ListInstalled ¶
func (m *PluginManager) ListInstalled(ctx context.Context, checkHealthy bool) (map[string]PluginVersion, error)
func (*PluginManager) ListPlugins ¶
func (*PluginManager) ListRemote ¶
func (m *PluginManager) ListRemote(ctx context.Context) (map[string][]PluginVersion, error)
func (*PluginManager) ListRepos ¶
func (p *PluginManager) ListRepos(ctx context.Context) (map[string]Repository, error)
func (*PluginManager) UnInstall ¶
func (m *PluginManager) UnInstall(ctx context.Context, name string) error
func (*PluginManager) UpdateRepo ¶
func (p *PluginManager) UpdateRepo(ctx context.Context, repo *Repository) error
func (*PluginManager) UpdateReposCache ¶
func (p *PluginManager) UpdateReposCache(ctx context.Context) error
type PluginVersion ¶
type PluginVersion struct { Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` Enabled bool `json:"enabled,omitempty"` InstallNamespace string `json:"installNamespace,omitempty"` Kind pluginsv1beta1.BundleKind `json:"kind,omitempty"` Description string `json:"description,omitempty"` HelathCheck string `json:"helathCheck,omitempty"` MainCategory string `json:"mainCategory,omitempty"` Category string `json:"category,omitempty"` Repository string `json:"repository,omitempty"` RepositoryName string `json:"repositoryName,omitempty"` Version string `json:"version,omitempty"` Healthy bool `json:"healthy,omitempty"` Required bool `json:"required,omitempty"` Requirements Requirements `json:"requirements,omitempty"` // dependecies requirements Message string `json:"message,omitempty"` Values pluginsv1beta1.Values `json:"values,omitempty"` Files map[string]string `json:"files,omitempty"` ValuesFrom []pluginsv1beta1.ValuesFrom `json:"valuesFrom,omitempty"` Priority int `json:"priority,omitempty"` }
func FindUpgradeable ¶
func FindUpgradeable(availables []PluginVersion, installed PluginVersion, allinstall map[string]PluginVersion) *PluginVersion
func PluginVersionFrom ¶
func PluginVersionFrom(plugin pluginsv1beta1.Plugin) PluginVersion
func PluginVersionFromRepoChartVersion ¶
func PluginVersionFromRepoChartVersion(repo *Repository, cv *repo.ChartVersion) PluginVersion
func (PluginVersion) ToPlugin ¶
func (pv PluginVersion) ToPlugin() *pluginsv1beta1.Plugin
type Repository ¶
type Repository struct { Name string `json:"name,omitempty"` Priority int `json:"priority,omitempty"` Address string `json:"address,omitempty"` Static bool `json:"static,omitempty"` // is static repository Plugins map[string][]PluginVersion `json:"plugins,omitempty"` LastSync time.Time `json:"lastSync,omitempty"` }
func (*Repository) ParseIndexFile ¶
func (repository *Repository) ParseIndexFile(index *repo.IndexFile)
func (*Repository) RefreshRepoIndex ¶
func (repository *Repository) RefreshRepoIndex(ctx context.Context) error
type Requirement ¶
type Requirements ¶
type Requirements []Requirement
Click to show internal directories.
Click to hide internal directories.