Documentation ¶
Index ¶
- Variables
- func GetChannelVersionForModule(moduleReleaseMeta *v1beta2.ModuleReleaseMeta, desiredChannel string) (string, error)
- func GetModuleName(moduleTemplate *v1beta2.ModuleTemplate) string
- func GetModuleReleaseMeta(ctx context.Context, clnt client.Reader, moduleName string, namespace string) (*v1beta2.ModuleReleaseMeta, error)
- func GetModuleSemverVersion(moduleTemplate *v1beta2.ModuleTemplate) (*semver.Version, error)
- func GetModuleTemplateWithHigherVersion(firstModuleTemplate, secondModuleTemplate *v1beta2.ModuleTemplate) (*v1beta2.ModuleTemplate, error)
- func NewMoreThanOneTemplateCandidateErr(moduleName string, candidateTemplates []v1beta2.ModuleTemplate) error
- func TemplateNameMatch(template *v1beta2.ModuleTemplate, name string) bool
- type ModuleInfo
- type ModuleTemplateInfo
- type ModuleTemplatesByModuleName
- type TemplateLookup
- func (t *TemplateLookup) GetAndValidateByChannel(ctx context.Context, name, channel, defaultChannel string) ModuleTemplateInfo
- func (t *TemplateLookup) GetAndValidateByVersion(ctx context.Context, name, version string) ModuleTemplateInfo
- func (t *TemplateLookup) GetRegularTemplates(ctx context.Context, kyma *v1beta2.Kyma) ModuleTemplatesByModuleName
- func (t *TemplateLookup) PopulateModuleTemplateInfo(ctx context.Context, module ModuleInfo, namespace, kymaChannel string, ...) ModuleTemplateInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidModuleInSpec = errors.New("invalid configuration in Kyma spec.modules") ErrInvalidModuleInStatus = errors.New("invalid module entry in Kyma status") )
View Source
var ( ErrChannelNotFound = errors.New("no versions found for channel") ErrNoChannelsFound = errors.New("no channels found for module") )
View Source
var ( ErrTemplateNotIdentified = errors.New("no unique template could be identified") ErrNotDefaultChannelAllowed = errors.New("specifying no default channel is not allowed") ErrNoTemplatesInListResult = errors.New("no templates were found") ErrTemplateMarkedAsMandatory = errors.New("template marked as mandatory") ErrTemplateNotAllowed = errors.New("module template not allowed") ErrTemplateUpdateNotAllowed = errors.New("module template update not allowed") )
Functions ¶
func GetChannelVersionForModule ¶
func GetChannelVersionForModule(moduleReleaseMeta *v1beta2.ModuleReleaseMeta, desiredChannel string) (string, error)
func GetModuleName ¶
func GetModuleName(moduleTemplate *v1beta2.ModuleTemplate) string
func GetModuleReleaseMeta ¶
func GetModuleSemverVersion ¶
func GetModuleSemverVersion(moduleTemplate *v1beta2.ModuleTemplate) (*semver.Version, error)
func GetModuleTemplateWithHigherVersion ¶
func GetModuleTemplateWithHigherVersion(firstModuleTemplate, secondModuleTemplate *v1beta2.ModuleTemplate) (*v1beta2.ModuleTemplate, error, )
func NewMoreThanOneTemplateCandidateErr ¶
func NewMoreThanOneTemplateCandidateErr(moduleName string, candidateTemplates []v1beta2.ModuleTemplate, ) error
func TemplateNameMatch ¶
func TemplateNameMatch(template *v1beta2.ModuleTemplate, name string) bool
Types ¶
type ModuleInfo ¶
func FetchModuleInfo ¶
func FetchModuleInfo(kyma *v1beta2.Kyma) []ModuleInfo
FetchModuleInfo returns a list of ModuleInfo objects containing information about modules referenced by the Kyma CR. This includes modules that are enabled in `.spec.modules[]` and modules that are not enabled in `.spec.modules[]` but still contain an entry in `.status.modules[]`.
func (ModuleInfo) IsInstalledByVersion ¶
func (a ModuleInfo) IsInstalledByVersion() bool
type ModuleTemplateInfo ¶
type ModuleTemplateInfo struct { *v1beta2.ModuleTemplate Err error DesiredChannel string }
func ValidateTemplateMode ¶
func ValidateTemplateMode(template ModuleTemplateInfo, kyma *v1beta2.Kyma, moduleReleaseMeta *v1beta2.ModuleReleaseMeta, ) ModuleTemplateInfo
type ModuleTemplatesByModuleName ¶
type ModuleTemplatesByModuleName map[string]*ModuleTemplateInfo
func GetMandatory ¶
func GetMandatory(ctx context.Context, kymaClient client.Reader) (ModuleTemplatesByModuleName, error, )
GetMandatory returns ModuleTemplates TOs (Transfer Objects) which are marked are mandatory modules.
type TemplateLookup ¶
func NewTemplateLookup ¶
func NewTemplateLookup(reader client.Reader, descriptorProvider *provider.CachedDescriptorProvider) *TemplateLookup
func (*TemplateLookup) GetAndValidateByChannel ¶
func (t *TemplateLookup) GetAndValidateByChannel(ctx context.Context, name, channel, defaultChannel string, ) ModuleTemplateInfo
func (*TemplateLookup) GetAndValidateByVersion ¶
func (t *TemplateLookup) GetAndValidateByVersion(ctx context.Context, name, version string) ModuleTemplateInfo
func (*TemplateLookup) GetRegularTemplates ¶
func (t *TemplateLookup) GetRegularTemplates(ctx context.Context, kyma *v1beta2.Kyma) ModuleTemplatesByModuleName
func (*TemplateLookup) PopulateModuleTemplateInfo ¶
func (t *TemplateLookup) PopulateModuleTemplateInfo(ctx context.Context, module ModuleInfo, namespace, kymaChannel string, moduleReleaseMeta *v1beta2.ModuleReleaseMeta, ) ModuleTemplateInfo
Click to show internal directories.
Click to hide internal directories.