legacy

package
v0.19.1-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	REALM  = logging.DefineSubRealm("component descriptor legacy normalization defaulting", "compdesc", "normalizations", "legacy")
	Logger = logging.DynamicLogger(REALM)
)

Functions

func DefaultingOfVersionIntoExtraIdentity

func DefaultingOfVersionIntoExtraIdentity(meta []IdentityDefaultable)

func DefaultingOfVersionIntoExtraIdentityForDescriptor deprecated

func DefaultingOfVersionIntoExtraIdentityForDescriptor(cd *compdesc.ComponentDescriptor)

DefaultingOfVersionIntoExtraIdentityForDescriptor normalizes the extra identity of the resources. It sets the version of the resource, reference or source as extra identity field if the combination of name+extra identity is the same for multiple items. However, the last item in the list will not be updated as it is unique wihout this.

TODO: To be removed once v1 + v2 are removed.

Deprecated: This is a legacy normalization and should only be used as part of JsonNormalisationV1 and JsonNormalisationV2 for backwards compatibility of normalization (for example used for signatures). It was needed because the original defaulting was made part of the normalization by accident and is now no longer included by default due to https://github.com/open-component-model/ocm/pull/1026

Types

type IdentityDefaultable

type IdentityDefaultable interface {
	GetExtraIdentity() metav1.Identity
	SetExtraIdentity(metav1.Identity)
	GetName() string
	GetVersion() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL