Documentation ¶
Index ¶
- func ConsistencyCheck(logger logr.Logger, deployInfo types.InstallInfo, ...) (bool, error)
- func InstallChart(logger logr.Logger, deployInfo types.InstallInfo, ...) (bool, error)
- func NewHelmProcessor(clients *manifestTypes.SingletonClients, settings *cli.EnvSettings, ...) (types.ManifestClient, error)
- func NewKustomizeProcessor(clients *manifestClient.SingletonClients, logger logr.Logger, render *Rendered) (types.ManifestClient, error)
- func UninstallChart(logger logr.Logger, deployInfo types.InstallInfo, ...) (bool, error)
- type Operations
- type Rendered
- type RendererCacheImpl
- func (r *RendererCacheImpl) DeleteConfig(key client.ObjectKey)
- func (r *RendererCacheImpl) DeleteProcessor(key client.ObjectKey)
- func (r *RendererCacheImpl) GetConfig(key client.ObjectKey) uint32
- func (r *RendererCacheImpl) GetProcessor(key client.ObjectKey) types.ManifestClient
- func (r *RendererCacheImpl) SetConfig(key client.ObjectKey, config uint32)
- func (r *RendererCacheImpl) SetProcessor(key client.ObjectKey, helmClient types.ManifestClient)
- type RepoHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsistencyCheck ¶
func ConsistencyCheck(logger logr.Logger, deployInfo types.InstallInfo, resourceTransforms []types.ObjectTransform, cache types.RendererCache, ) (bool, error)
ConsistencyCheck verifies consistency of resources based on types.InstallInfo and an appropriate rendering mechanism.
func InstallChart ¶
func InstallChart(logger logr.Logger, deployInfo types.InstallInfo, resourceTransforms []types.ObjectTransform, cache types.RendererCache, ) (bool, error)
InstallChart installs the resources based on types.InstallInfo and an appropriate rendering mechanism.
func NewHelmProcessor ¶
func NewHelmProcessor(clients *manifestTypes.SingletonClients, settings *cli.EnvSettings, logger logr.Logger, render *Rendered, deployInfo types.InstallInfo, forceCRDRemoval bool, ) (types.ManifestClient, error)
NewHelmProcessor returns a new instance of the helm processor. The returned helm instance contains necessary clients based on rest config and rest mapper, combined with helm configuration, like helm native flags and --set flags. Additionally, it also transforms the manifest resources based on user defined input. On the returned helm instance, installation, uninstallation and verification checks can be executed on the resource manifest.
func NewKustomizeProcessor ¶
func NewKustomizeProcessor( clients *manifestClient.SingletonClients, logger logr.Logger, render *Rendered, ) (types.ManifestClient, error)
NewKustomizeProcessor returns a new instance of the kustomize processor. The returned kustomize instance contains necessary clients based on rest config and rest mapper. Additionally, it also transforms the manifest resources based on user defined input. On the returned helm instance, installation, uninstallation and verification checks can then be executed on the resource manifest.
func UninstallChart ¶
func UninstallChart(logger logr.Logger, deployInfo types.InstallInfo, resourceTransforms []types.ObjectTransform, cache types.RendererCache, ) (bool, error)
UninstallChart uninstalls the resources based on types.InstallInfo and an appropriate rendering mechanism.
Types ¶
type Operations ¶
type Operations struct {
// contains filtered or unexported fields
}
func NewOperations ¶
func NewOperations(logger logr.Logger, deployInfo types.InstallInfo, resourceTransforms []types.ObjectTransform, cache types.RendererCache, ) (*Operations, error)
type Rendered ¶
type Rendered struct {
// contains filtered or unexported fields
}
func NewRendered ¶
NewRendered returns a new instance on Rendered. Using Rendered instance, pre-Rendered and cached manifest can be identified and retrieved.
func (*Rendered) DeleteCachedResources ¶
func (r *Rendered) DeleteCachedResources(chartPath string) *types.ParsedFile
DeleteCachedResources deletes cached manifest of resources.
func (*Rendered) GetCachedResources ¶
func (r *Rendered) GetCachedResources(chartName, chartPath string) *types.ParsedFile
GetCachedResources returns a resource manifest which was already cached during previous operations by the module-manager library.
func (*Rendered) GetManifestResources ¶
func (r *Rendered) GetManifestResources(chartPath string) *types.ParsedFile
GetManifestResources returns a pre-rendered resource manifest located at the passed chartPath.
type RendererCacheImpl ¶
type RendererCacheImpl struct {
// contains filtered or unexported fields
}
RendererCacheImpl provides an in-memory processor to store types.ManifestClient instances applicable to remote clusters. By using sync.Map for caching, concurrent operations to the processor from diverse reconciliations are considered safe.
Inside the processor cluster specific unique name (in Client.ObjectKey format) is used as key and the types.ManifestClient instance is stored as the value. Inside the config resource level configuration is stored by its key.
func NewRendererCache ¶
func NewRendererCache() *RendererCacheImpl
NewRendererCache returns a new instance of RemoteClusterCache.
func (*RendererCacheImpl) DeleteConfig ¶
func (r *RendererCacheImpl) DeleteConfig(key client.ObjectKey)
DeleteConfig deletes the configuration from RendererCacheImpl for the passed client.ObjectKey.
func (*RendererCacheImpl) DeleteProcessor ¶
func (r *RendererCacheImpl) DeleteProcessor(key client.ObjectKey)
DeleteProcessor deletes the types.ManifestClient from RendererCacheImpl for the passed client.ObjectKey.
func (*RendererCacheImpl) GetConfig ¶
func (r *RendererCacheImpl) GetConfig(key client.ObjectKey) uint32
GetConfig loads the configuration from RendererCacheImpl for the passed client.ObjectKey.
func (*RendererCacheImpl) GetProcessor ¶
func (r *RendererCacheImpl) GetProcessor(key client.ObjectKey) types.ManifestClient
GetProcessor loads the types.ManifestClient from RendererCacheImpl for the passed client.ObjectKey.
func (*RendererCacheImpl) SetConfig ¶
func (r *RendererCacheImpl) SetConfig(key client.ObjectKey, config uint32)
SetConfig saves the passed configuration into RendererCacheImpl for the client.ObjectKey.
func (*RendererCacheImpl) SetProcessor ¶
func (r *RendererCacheImpl) SetProcessor(key client.ObjectKey, helmClient types.ManifestClient)
SetProcessor saves the passed types.ManifestClient into RendererCacheImpl for the client.ObjectKey.
type RepoHandler ¶
type RepoHandler struct {
// contains filtered or unexported fields
}
func NewRepoHandler ¶
func NewRepoHandler(logger logr.Logger, settings *cli.EnvSettings) *RepoHandler