v1beta2

package
v0.0.0-...-4210b9e Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Overview

Package v1beta2 contains API Schema definitions for the operator v1beta2 API group +kubebuilder:object:generate=true +groupName=operator.kyma-project.io

Index

Constants

View Source
const (
	// DeprecatedConditionTypeReady was introduced by a bug. Ths condition needs to be removed on all KymaCRs.
	DeprecatedConditionTypeReady KymaConditionType = "Ready"
	ConditionTypeModules         KymaConditionType = "Modules"
	ConditionTypeModuleCatalog   KymaConditionType = "ModuleCatalog"
	ConditionTypeSKRWebhook      KymaConditionType = "SKRWebhook"

	// ConditionReason will be set to `Ready` on all Conditions. If the Condition is actual ready,
	// can be determined by the state.
	ConditionReason KymaConditionReason = "Ready"

	ConditionMessageModuleInReadyState        = "all modules are in ready state"
	ConditionMessageModuleNotInReadyState     = "not all modules are in ready state"
	ConditionMessageModuleCatalogIsSynced     = "module templates are synchronized"
	ConditionMessageModuleCatalogIsOutOfSync  = "module templates are out of sync and need to be resynchronized"
	ConditionMessageSKRWebhookIsSynced        = "skrwebhook is synchronized"
	ConditionMessageSKRWebhookIsOutOfSync     = "skrwebhook is out of sync and needs to be resynchronized"
	ConditionMessageModuleStateUnknown        = "modules state is unknown"
	ConditionMessageModuleCatalogStateUnknown = "module templates synchronization state is unknown"
)

Extend this list by actual needs.

View Source
const (
	// CustomResourcePolicyCreateAndDelete causes the Manifest to contain the default data provided in ModuleTemplate.
	// While Updates from the Data are never propagated, the resource is deleted on module removal.
	CustomResourcePolicyCreateAndDelete = "CreateAndDelete"
	// CustomResourcePolicyIgnore does not pass the Data from ModuleTemplate.
	// This ensures the user of the module is able to initialize the Module without any default configuration.
	// This is useful if another controller should manage module configuration as data and not be auto-initialized.
	// It can also be used to initialize controllers without interacting with them.
	CustomResourcePolicyIgnore = "Ignore"
)
View Source
const DefaultChannel = "regular"

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{
		Group:   shared.OperatorGroup,
		Version: "v1beta2",
	}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var ErrInvalidVersion = errors.New("can't find valid semantic version")
View Source
var ErrLabelNotFound = errors.New("label is not found")

Functions

func DefaultIstioGatewaySelector

func DefaultIstioGatewaySelector() apimetav1.LabelSelector

DefaultIstioGatewaySelector defines a default label selector for a Gateway to configure a VirtualService for the Watcher.

func GenerateMessage

func GenerateMessage(conditionType KymaConditionType, status apimetav1.ConditionStatus) string

Types

type ChannelVersionAssignment

type ChannelVersionAssignment struct {
	// Channel is the module channel.
	// +kubebuilder:validation:Pattern:=^[a-z]+$
	// +kubebuilder:validation:MaxLength:=32
	// +kubebuilder:validation:MinLength:=3
	Channel string `json:"channel"`

	// Version is the module version of the corresponding module channel.
	// +kubebuilder:validation:Pattern:=`^((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-[a-zA-Z-][0-9a-zA-Z-]*)?)?$`
	// +kubebuilder:validation:MaxLength:=32
	Version string `json:"version"`
}

func (*ChannelVersionAssignment) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChannelVersionAssignment.

func (*ChannelVersionAssignment) DeepCopyInto

func (in *ChannelVersionAssignment) DeepCopyInto(out *ChannelVersionAssignment)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomResourcePolicy

type CustomResourcePolicy string

CustomResourcePolicy determines how a ModuleTemplate should be parsed. When CustomResourcePolicy is set to CustomResourcePolicyCreateAndDelete, the Manifest will receive instructions to create it on installation with the default values provided in ModuleTemplate, and to remove it when the module or Kyma is deleted. +kubebuilder:validation:Enum=CreateAndDelete;Ignore

type CustomStateCheck

type CustomStateCheck struct {
	// JSONPath specifies the JSON path to the state variable in the Module CR
	JSONPath string `json:"jsonPath" yaml:"jsonPath"`

	// Value is the value at the JSONPath for which the Module CR state should map with MappedState
	Value string `json:"value" yaml:"value"`

	// MappedState is the Kyma CR State
	MappedState shared.State `json:"mappedState" yaml:"mappedState"`
}

func (*CustomStateCheck) DeepCopy

func (in *CustomStateCheck) DeepCopy() *CustomStateCheck

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomStateCheck.

func (*CustomStateCheck) DeepCopyInto

func (in *CustomStateCheck) DeepCopyInto(out *CustomStateCheck)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FieldName

type FieldName string

+kubebuilder:validation:Enum=spec;status;

const (
	// SpecField represents FieldName spec, which indicates that resource spec will be watched.
	SpecField FieldName = "spec"
	// StatusField represents FieldName status, which indicates that only resource status will be watched.
	StatusField FieldName = "status"
)

type GatewayConfig

type GatewayConfig struct {
	// LabelSelector allows to select the Gateway using label selectors as defined in the K8s LIST API.
	LabelSelector apimetav1.LabelSelector `json:"selector"`
}

GatewayConfig is used to select an Istio Gateway object in the cluster.

func (*GatewayConfig) DeepCopy

func (in *GatewayConfig) DeepCopy() *GatewayConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayConfig.

func (*GatewayConfig) DeepCopyInto

func (in *GatewayConfig) DeepCopyInto(out *GatewayConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageSpec

type ImageSpec struct {
	// Repo defines the Image repo
	Repo string `json:"repo,omitempty"`

	// Name defines the Image name
	Name string `json:"name,omitempty"`

	// Ref is either a sha value, tag or version
	Ref string `json:"ref,omitempty"`

	// Type specifies the type of installation specification
	// that could be provided as part of a custom resource.
	// This time is used in codec to successfully decode from raw extensions.
	// +kubebuilder:validation:Enum=helm-chart;oci-ref;"kustomize";""
	Type RefTypeMetadata `json:"type,omitempty"`

	// CredSecretSelector is an optional field, for OCI image saved in private registry,
	// use it to indicate the secret which contains registry credentials,
	// must exist in the namespace same as manifest
	CredSecretSelector *apimetav1.LabelSelector `json:"credSecretSelector,omitempty"`
}

ImageSpec defines OCI Image specifications. +k8s:deepcopy-gen=true

func (*ImageSpec) DeepCopy

func (in *ImageSpec) DeepCopy() *ImageSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec.

func (*ImageSpec) DeepCopyInto

func (in *ImageSpec) DeepCopyInto(out *ImageSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InstallInfo

type InstallInfo struct {
	// Source in the ImageSpec format
	// +kubebuilder:pruning:PreserveUnknownFields
	Source machineryruntime.RawExtension `json:"source"`

	// Name specifies a unique install name for Manifest
	Name string `json:"name"`
}

InstallInfo defines installation information.

func (*InstallInfo) DeepCopy

func (in *InstallInfo) DeepCopy() *InstallInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstallInfo.

func (*InstallInfo) DeepCopyInto

func (in *InstallInfo) DeepCopyInto(out *InstallInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (InstallInfo) Raw

func (i InstallInfo) Raw() []byte

type Kyma

type Kyma struct {
	apimetav1.TypeMeta   `json:",inline"`
	apimetav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   KymaSpec   `json:"spec,omitempty"`
	Status KymaStatus `json:"status,omitempty"`
}

Kyma is the Schema for the kymas API.

func (*Kyma) AllModulesReady

func (kyma *Kyma) AllModulesReady() bool

func (*Kyma) ContainsCondition

func (kyma *Kyma) ContainsCondition(conditionType KymaConditionType, conditionStatus ...apimetav1.ConditionStatus,
) bool

func (*Kyma) DeepCopy

func (in *Kyma) DeepCopy() *Kyma

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kyma.

func (*Kyma) DeepCopyInto

func (in *Kyma) DeepCopyInto(out *Kyma)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Kyma) DeepCopyObject

func (in *Kyma) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Kyma) DetermineState

func (kyma *Kyma) DetermineState() shared.State

func (*Kyma) EnsureLabelsAndFinalizers

func (kyma *Kyma) EnsureLabelsAndFinalizers() bool

func (*Kyma) GetModuleStatusMap

func (kyma *Kyma) GetModuleStatusMap() map[string]*ModuleStatus

func (*Kyma) GetNamespacedName

func (kyma *Kyma) GetNamespacedName() types.NamespacedName

func (*Kyma) GetNoLongerExistingModuleStatus

func (kyma *Kyma) GetNoLongerExistingModuleStatus() []*ModuleStatus

func (*Kyma) HasSyncLabelEnabled

func (kyma *Kyma) HasSyncLabelEnabled() bool

func (*Kyma) IsBeta

func (kyma *Kyma) IsBeta() bool

func (*Kyma) IsInternal

func (kyma *Kyma) IsInternal() bool

func (*Kyma) SetActiveChannel

func (kyma *Kyma) SetActiveChannel() *Kyma

func (*Kyma) SkipReconciliation

func (kyma *Kyma) SkipReconciliation() bool

func (*Kyma) UpdateCondition

func (kyma *Kyma) UpdateCondition(conditionType KymaConditionType, status apimetav1.ConditionStatus)

type KymaConditionMsg

type KymaConditionMsg string

KymaConditionMsg represents the current state of a condition in a human-readable format.

type KymaConditionReason

type KymaConditionReason string

KymaConditionReason should always be set to `Ready`.

type KymaConditionType

type KymaConditionType string

KymaConditionType is a programmatic identifier indicating the type for the corresponding condition. By combining of condition type, status and reason it explains the current Kyma status. Name example: Type: Modules, Reason: Ready and Status: True means all modules are in ready state. Type: Modules, Reason: Ready and Status: False means some modules are not in ready state, and the actual state of individual module can be found in related ModuleStatus.

func GetRequiredConditionTypes

func GetRequiredConditionTypes(syncEnabled, watcherEnabled bool) []KymaConditionType

GetRequiredConditionTypes returns all required ConditionTypes for a KymaCR.

type KymaList

type KymaList struct {
	apimetav1.TypeMeta `json:",inline"`
	apimetav1.ListMeta `json:"metadata,omitempty"`
	Items              []Kyma `json:"items"`
}

KymaList contains a list of Kyma.

func (*KymaList) DeepCopy

func (in *KymaList) DeepCopy() *KymaList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KymaList.

func (*KymaList) DeepCopyInto

func (in *KymaList) DeepCopyInto(out *KymaList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KymaList) DeepCopyObject

func (in *KymaList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KymaSpec

type KymaSpec struct {
	// Channel specifies the desired Channel of the Installation, usually targeting different module versions.
	// +kubebuilder:validation:Pattern:=^[a-z]+$
	// +kubebuilder:validation:MaxLength:=32
	// +kubebuilder:validation:MinLength:=3
	Channel string `json:"channel"`

	// SkipMaintenanceWindows indicates whether module upgrades that require downtime
	// should bypass the defined Maintenance Windows and be applied immediately.
	SkipMaintenanceWindows bool `json:"skipMaintenanceWindows,omitempty"`

	// Modules specifies the list of modules to be installed
	// +listType=map
	// +listMapKey=name
	Modules []Module `json:"modules,omitempty"`
}

KymaSpec defines the desired state of Kyma.

func (*KymaSpec) DeepCopy

func (in *KymaSpec) DeepCopy() *KymaSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KymaSpec.

func (*KymaSpec) DeepCopyInto

func (in *KymaSpec) DeepCopyInto(out *KymaSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KymaStatus

type KymaStatus struct {
	// State signifies current state of Kyma.
	// Value can be one of ("Ready", "Processing", "Error", "Deleting").
	State shared.State `json:"state,omitempty"`

	// List of status conditions to indicate the status of a ServiceInstance.
	// +optional
	// +listType=map
	// +listMapKey=type
	Conditions []apimetav1.Condition `json:"conditions,omitempty"`

	// Contains essential information about the current deployed module
	Modules []ModuleStatus `json:"modules,omitempty"`

	// Active Channel
	// +optional
	ActiveChannel string `json:"activeChannel,omitempty"`

	shared.LastOperation `json:"lastOperation,omitempty"`
}

KymaStatus defines the observed state of Kyma.

func (*KymaStatus) DeepCopy

func (in *KymaStatus) DeepCopy() *KymaStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KymaStatus.

func (*KymaStatus) DeepCopyInto

func (in *KymaStatus) DeepCopyInto(out *KymaStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LayerName

type LayerName string
const (
	ConfigLayer      LayerName = "config"
	DefaultCRLayer   LayerName = "default-cr"
	RawManifestLayer LayerName = "raw-manifest"
)

type Manager

type Manager struct {
	apimetav1.GroupVersionKind `json:",inline"`

	// Namespace is the namespace of the manager. It is optional.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Name is the name of the manager.
	Name string `json:"name"`
}

Manager defines the structure for the manager field in ModuleTemplateSpec.

func (*Manager) DeepCopy

func (in *Manager) DeepCopy() *Manager

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manager.

func (*Manager) DeepCopyInto

func (in *Manager) DeepCopyInto(out *Manager)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Manifest

type Manifest struct {
	apimetav1.TypeMeta   `json:",inline"`
	apimetav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ManifestSpec  `json:"spec,omitempty"`
	Status shared.Status `json:"status,omitempty"`
}

Manifest is the Schema for the manifests API.

func (*Manifest) DeepCopy

func (in *Manifest) DeepCopy() *Manifest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.

func (*Manifest) DeepCopyInto

func (in *Manifest) DeepCopyInto(out *Manifest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Manifest) DeepCopyObject

func (in *Manifest) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Manifest) GetChannel

func (manifest *Manifest) GetChannel() (string, bool)

func (*Manifest) GetKymaName

func (manifest *Manifest) GetKymaName() (string, error)

func (*Manifest) GetModuleName

func (manifest *Manifest) GetModuleName() (string, error)

func (*Manifest) GetStatus

func (manifest *Manifest) GetStatus() shared.Status

func (*Manifest) IsMandatoryModule

func (manifest *Manifest) IsMandatoryModule() bool

func (*Manifest) IsSameChannel

func (manifest *Manifest) IsSameChannel(otherManifest *Manifest) bool

func (*Manifest) IsUnmanaged

func (manifest *Manifest) IsUnmanaged() bool

func (*Manifest) SetStatus

func (manifest *Manifest) SetStatus(status shared.Status)

func (*Manifest) SkipReconciliation

func (manifest *Manifest) SkipReconciliation() bool

type ManifestList

type ManifestList struct {
	apimetav1.TypeMeta `json:",inline"`
	apimetav1.ListMeta `json:"metadata,omitempty"`
	Items              []Manifest `json:"items"`
}

ManifestList contains a list of Manifest.

func (*ManifestList) DeepCopy

func (in *ManifestList) DeepCopy() *ManifestList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestList.

func (*ManifestList) DeepCopyInto

func (in *ManifestList) DeepCopyInto(out *ManifestList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ManifestList) DeepCopyObject

func (in *ManifestList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ManifestSpec

type ManifestSpec struct {
	// Remote indicates if Manifest should be installed on a remote cluster
	Remote bool `json:"remote"`

	// Version specifies current Resource version
	// +optional
	Version string `json:"version,omitempty"`

	// Config specifies OCI image configuration for Manifest
	Config *ImageSpec `json:"config,omitempty"`

	// Install specifies a list of installations for Manifest
	Install InstallInfo `json:"install"`

	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:XEmbeddedResource
	// +nullable
	// Resource specifies a resource to be watched for state updates
	Resource *unstructured.Unstructured `json:"resource,omitempty"`
}

ManifestSpec defines the desired state of Manifest.

func (*ManifestSpec) DeepCopy

func (in *ManifestSpec) DeepCopy() *ManifestSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestSpec.

func (*ManifestSpec) DeepCopyInto

func (in *ManifestSpec) DeepCopyInto(out *ManifestSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Module

type Module struct {
	// Name is a unique identifier of the module.
	// It is used to resolve a ModuleTemplate for creating a set of resources on the cluster.
	//
	// Name can only be the ModuleName label value of the module-template, e.g. operator.kyma-project.io/module-name=my-module
	Name string `json:"name"`

	// ControllerName is able to set the controller used for reconciliation of the module. It can be used
	// together with Cache Configuration on the Operator responsible for the templated Modules to split
	// workload.
	ControllerName string `json:"controller,omitempty"`

	// Channel is the desired channel of the Module. If this changes or is set, it will be used to resolve a new
	// ModuleTemplate based on the new resolved resources.
	// +kubebuilder:validation:Pattern:=^[a-z]+$
	// +kubebuilder:validation:MaxLength:=32
	// +kubebuilder:validation:MinLength:=3
	Channel string `json:"channel,omitempty"`

	// Version is the desired version of the Module. If this changes or is set, it will be used to resolve a new
	// ModuleTemplate based on this specific version.
	// The Version and Channel are mutually exclusive options.
	// The regular expression come from here: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
	// json:"-" to disable installation of specific versions until decided to roll this out
	// see https://github.com/kyma-project/lifecycle-manager/issues/1847
	Version string `json:"-"`

	// RemoteModuleTemplateRef is deprecated and will no longer have any functionality.
	// It will be removed in the upcoming API version.
	RemoteModuleTemplateRef string `json:"remoteModuleTemplateRef,omitempty"`

	// +kubebuilder:default:=CreateAndDelete
	CustomResourcePolicy `json:"customResourcePolicy,omitempty"`

	// Managed is determining whether the module is managed or not. If the module is unmanaged, the user is responsible
	// for the lifecycle of the module.
	// +kubebuilder:default:=true
	Managed bool `json:"managed"`
}

Module defines the components to be installed.

func (*Module) DeepCopy

func (in *Module) DeepCopy() *Module

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Module.

func (*Module) DeepCopyInto

func (in *Module) DeepCopyInto(out *Module)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModuleIcon

type ModuleIcon struct {
	// Name is the name of the icon.
	Name string `json:"name"`

	// Link is the link to the icon.
	Link string `json:"link"`
}

func (*ModuleIcon) DeepCopy

func (in *ModuleIcon) DeepCopy() *ModuleIcon

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleIcon.

func (*ModuleIcon) DeepCopyInto

func (in *ModuleIcon) DeepCopyInto(out *ModuleIcon)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModuleInfo

type ModuleInfo struct {
	// Repository is the link to the repository of the module.
	Repository string `json:"repository"`

	// Documentation is the link to the documentation of the module.
	Documentation string `json:"documentation"`

	// Icons is a list of icons of the module.
	// +optional
	// +listType=map
	// +listMapKey=name
	Icons []ModuleIcon `json:"icons,omitempty"`
}

func (*ModuleInfo) DeepCopy

func (in *ModuleInfo) DeepCopy() *ModuleInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleInfo.

func (*ModuleInfo) DeepCopyInto

func (in *ModuleInfo) DeepCopyInto(out *ModuleInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModuleReleaseMeta

type ModuleReleaseMeta struct {
	apimetav1.TypeMeta   `json:",inline"`
	apimetav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ModuleReleaseMetaSpec `json:"spec,omitempty"`
}

func (*ModuleReleaseMeta) DeepCopy

func (in *ModuleReleaseMeta) DeepCopy() *ModuleReleaseMeta

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleReleaseMeta.

func (*ModuleReleaseMeta) DeepCopyInto

func (in *ModuleReleaseMeta) DeepCopyInto(out *ModuleReleaseMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModuleReleaseMeta) DeepCopyObject

func (in *ModuleReleaseMeta) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (ModuleReleaseMeta) IsBeta

func (m ModuleReleaseMeta) IsBeta() bool

func (ModuleReleaseMeta) IsInternal

func (m ModuleReleaseMeta) IsInternal() bool

type ModuleReleaseMetaList

type ModuleReleaseMetaList struct {
	apimetav1.TypeMeta `json:",inline"`
	apimetav1.ListMeta `json:"metadata,omitempty"`
	Items              []ModuleReleaseMeta `json:"items"`
}

ModuleReleaseMetaList contains a list of ModuleReleaseMeta.

func (*ModuleReleaseMetaList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleReleaseMetaList.

func (*ModuleReleaseMetaList) DeepCopyInto

func (in *ModuleReleaseMetaList) DeepCopyInto(out *ModuleReleaseMetaList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModuleReleaseMetaList) DeepCopyObject

func (in *ModuleReleaseMetaList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ModuleReleaseMetaSpec

type ModuleReleaseMetaSpec struct {
	// ModuleName is the name of the Module.
	// +kubebuilder:validation:Pattern:=`^([a-z]{3,}(-[a-z]{3,})*)?$`
	// +kubebuilder:validation:MaxLength:=64
	ModuleName string `json:"moduleName"`

	// Channels is the list of module channels with their corresponding versions.
	// +listType=map
	// +listMapKey=channel
	Channels []ChannelVersionAssignment `json:"channels"`

	// Beta indicates if the module is in beta state. Beta modules are only available for beta Kymas.
	// +kubebuilder:default:=false
	Beta bool `json:"beta,omitempty"`

	// Internal indicates if the module is internal. Internal modules are only available for internal Kymas.
	// +kubebuilder:default:=false
	Internal bool `json:"internal,omitempty"`
}

ModuleReleaseMetaSpec defines the channel-version assignments for a module.

func (*ModuleReleaseMetaSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleReleaseMetaSpec.

func (*ModuleReleaseMetaSpec) DeepCopyInto

func (in *ModuleReleaseMetaSpec) DeepCopyInto(out *ModuleReleaseMetaSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModuleStatus

type ModuleStatus struct {
	// Name defines the name of the Module in the Spec that the status is used for.
	// It can be any kind of Reference format supported by Module.Name.
	Name string `json:"name"`

	// FQDN is the fully qualified domain name of the module.
	// In the ModuleTemplate it is located in .spec.descriptor.component.name of the ModuleTemplate
	// FQDN is used to calculate Namespace and Name of the Manifest for tracking.
	FQDN string `json:"fqdn,omitempty"`

	// Manifest contains the Information of a related Manifest
	Manifest *TrackingObject `json:"manifest,omitempty"`

	// It contains information about the last parsed ModuleTemplate in Context of the Installation.
	// This will update when Channel or the ModuleTemplate is changed.
	// +optional
	Template *TrackingObject `json:"template,omitempty"`

	// Channel tracks the active Channel of the Module. In Case it changes, the new Channel will have caused
	// a new lookup to be necessary that maybe picks a different ModuleTemplate, which is why we need to reconcile.
	Channel string `json:"channel,omitempty"`

	// Channel tracks the active Version of the Module.
	Version string `json:"version,omitempty"`

	// Message is a human-readable message indicating details about the State.
	Message string `json:"message,omitempty"`

	// State of the Module in the currently tracked Generation
	State shared.State `json:"state"`

	// Resource contains information about the created module CR.
	Resource *TrackingObject `json:"resource,omitempty"`
}

func (*ModuleStatus) DeepCopy

func (in *ModuleStatus) DeepCopy() *ModuleStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleStatus.

func (*ModuleStatus) DeepCopyInto

func (in *ModuleStatus) DeepCopyInto(out *ModuleStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModuleStatus) GetManifestCR

func (m *ModuleStatus) GetManifestCR() *unstructured.Unstructured

type ModuleTemplate

type ModuleTemplate struct {
	apimetav1.TypeMeta   `json:",inline"`
	apimetav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ModuleTemplateSpec `json:"spec,omitempty"`
}

func (*ModuleTemplate) DeepCopy

func (in *ModuleTemplate) DeepCopy() *ModuleTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleTemplate.

func (*ModuleTemplate) DeepCopyInto

func (in *ModuleTemplate) DeepCopyInto(out *ModuleTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModuleTemplate) DeepCopyObject

func (in *ModuleTemplate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ModuleTemplate) GetVersion

func (m *ModuleTemplate) GetVersion() (*semver.Version, error)

GetVersion returns the declared version of the ModuleTemplate from it's Spec.

func (*ModuleTemplate) HasSyncDisabled

func (m *ModuleTemplate) HasSyncDisabled() bool

https://github.com/kyma-project/lifecycle-manager/issues/2090 Will be deprecated.

func (*ModuleTemplate) IsBeta

func (m *ModuleTemplate) IsBeta() bool

https://github.com/kyma-project/lifecycle-manager/issues/2096 Remove this function after the migration to the new ModuleTemplate format is completed.

func (*ModuleTemplate) IsInternal

func (m *ModuleTemplate) IsInternal() bool

https://github.com/kyma-project/lifecycle-manager/issues/2096 Remove this function after the migration to the new ModuleTemplate format is completed.

func (*ModuleTemplate) IsMandatory

func (m *ModuleTemplate) IsMandatory() bool

func (*ModuleTemplate) SyncEnabled

func (m *ModuleTemplate) SyncEnabled(betaEnabled, internalEnabled bool) bool

https://github.com/kyma-project/lifecycle-manager/issues/2096 Remove this function after the migration to the new ModuleTemplate format is completed.

type ModuleTemplateList

type ModuleTemplateList struct {
	apimetav1.TypeMeta `json:",inline"`
	apimetav1.ListMeta `json:"metadata,omitempty"`
	Items              []ModuleTemplate `json:"items"`
}

ModuleTemplateList contains a list of ModuleTemplate.

func (*ModuleTemplateList) DeepCopy

func (in *ModuleTemplateList) DeepCopy() *ModuleTemplateList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleTemplateList.

func (*ModuleTemplateList) DeepCopyInto

func (in *ModuleTemplateList) DeepCopyInto(out *ModuleTemplateList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModuleTemplateList) DeepCopyObject

func (in *ModuleTemplateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ModuleTemplateSpec

type ModuleTemplateSpec struct {
	// Channel is the targeted channel of the ModuleTemplate. It will be used to directly assign a Template
	// to a target channel. It has to be provided at any given time.
	// Deprecated: This field is deprecated and will be removed in a future release.
	// +optional
	// +kubebuilder:deprecatedversion
	// +kubebuilder:validation:Pattern:=`^$|^[a-z]{3,}$`
	// +kubebuilder:validation:MaxLength:=32
	Channel string `json:"channel"`

	// Version identifies the version of the Module. Can be empty, or a semantic version.
	// +optional
	// +kubebuilder:validation:Pattern:=`^((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-[a-zA-Z-][0-9a-zA-Z-]*)?)?$`
	// +kubebuilder:validation:MaxLength:=32
	Version string `json:"version"`

	// ModuleName is the name of the Module. Can be empty.
	// +optional
	// +kubebuilder:validation:Pattern:=`^([a-z]{3,}(-[a-z]{3,})*)?$`
	// +kubebuilder:validation:MaxLength:=64
	ModuleName string `json:"moduleName"`

	// Mandatory indicates whether the module is mandatory. It is used to enforce the installation of the module with
	// its configuration in all runtime clusters.
	// +optional
	Mandatory bool `json:"mandatory"`

	// Data is the default set of attributes that are used to generate the Module. It contains a default set of values
	// for a given channel, and is thus different from default values allocated during struct parsing of the Module.
	// While Data can change after the initial creation of ModuleTemplate, it is not expected to be propagated to
	// downstream modules as it is considered a set of default values. This means that an update of the data block
	// will only propagate to new Modules created form ModuleTemplate, not any existing Module.
	//
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:XEmbeddedResource
	Data *unstructured.Unstructured `json:"data,omitempty"`

	// The Descriptor is the Open Component Model Descriptor of a Module, containing all relevant information
	// to correctly initialize a module (e.g. Manifests, References to Binaries and/or configuration)
	// Name more information on Component Descriptors, see
	// https://github.com/open-component-model/ocm
	//
	// It is translated inside the Lifecycle of the Cluster and will be used by downstream controllers
	// to bootstrap and manage the module. This part is also propagated for every change of the template.
	// This means for upgrades of the Descriptor, downstream controllers will also update the dependant modules
	// (e.g. by updating the controller binary linked in a chart referenced in the descriptor)
	//
	// NOTE: Only Raw Rendering is Supported for the layers. So previously used "config" layers for the helm
	// charts and kustomize renderers are deprecated and ignored.
	//
	// +kubebuilder:pruning:PreserveUnknownFields
	Descriptor machineryruntime.RawExtension `json:"descriptor"`

	// CustomStateCheck is deprecated.
	CustomStateCheck []*CustomStateCheck `json:"customStateCheck,omitempty"`

	// Resources is a list of additional resources of the module that can be fetched, e.g., the raw manifest.
	// +optional
	// +listType=map
	// +listMapKey=name
	Resources []Resource `json:"resources,omitempty"`

	// Info contains metadata about the module.
	// +optional
	Info *ModuleInfo `json:"info,omitempty"`

	// AssociatedResources is a list of module related resources that usually must be cleaned when uninstalling a module. Informational purpose only.
	// +optional
	AssociatedResources []apimetav1.GroupVersionKind `json:"associatedResources,omitempty"`

	// Manager contains information for identifying a module's resource that can be used as indicator for the installation readiness of the module. Typically, this is the manager Deployment of the module. In exceptional cases, it may also be another resource.
	// +optional
	Manager *Manager `json:"manager,omitempty"`

	// RequiresDowntime indicates whether the module requires downtime in support of maintenance windows during module upgrades.
	// +optional
	RequiresDowntime bool `json:"requiresDowntime,omitempty"`
}

ModuleTemplateSpec defines the desired state of ModuleTemplate.

func (*ModuleTemplateSpec) DeepCopy

func (in *ModuleTemplateSpec) DeepCopy() *ModuleTemplateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleTemplateSpec.

func (*ModuleTemplateSpec) DeepCopyInto

func (in *ModuleTemplateSpec) DeepCopyInto(out *ModuleTemplateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PartialMeta

type PartialMeta struct {
	// Name must be unique within a namespace. Is required when creating resources, although
	// some resources may allow a client to request the generation of an appropriate name
	// automatically. Name is primarily intended for creation idempotence and configuration
	// definition.
	// Cannot be updated.
	// More info: http://kubernetes.io/docs/user-guide/identifiers#names
	// +optional
	Name string `json:"name"`
	// Namespace defines the space within which each name must be unique. An empty namespace is
	// equivalent to the "default" namespace, but "default" is the canonical representation.
	// Not all objects are required to be scoped to a namespace - the value of this field for
	// those objects will be empty.
	//
	// Must be a DNS_LABEL.
	// Cannot be updated.
	// More info: http://kubernetes.io/docs/user-guide/namespaces
	// +optional
	Namespace string `json:"namespace"`
	// A sequence number representing a specific generation of the desired state.
	// Populated by the system. Read-only.
	// +optional
	Generation int64 `json:"generation,omitempty"`
}

PartialMeta is a subset of ObjectMeta that contains relevant information to track an Object. see https://github.com/kubernetes/apimachinery/blob/v0.26.1/pkg/apis/meta/v1/types.go#L111

func (*PartialMeta) DeepCopy

func (in *PartialMeta) DeepCopy() *PartialMeta

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PartialMeta.

func (*PartialMeta) DeepCopyInto

func (in *PartialMeta) DeepCopyInto(out *PartialMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PartialMeta) GetGeneration

func (m PartialMeta) GetGeneration() int64

func (PartialMeta) GetName

func (m PartialMeta) GetName() string

func (PartialMeta) GetNamespace

func (m PartialMeta) GetNamespace() string

type RefTypeMetadata

type RefTypeMetadata string
const (
	OciRefType RefTypeMetadata = "oci-ref"
	OciDirType RefTypeMetadata = "oci-dir"
)

type Resource

type Resource struct {
	// Name is the name of the resource.
	Name string `json:"name"`
	// Link is the URL to the resource.
	// +kubebuilder:validation:Format=uri
	Link string `json:"link"`
}

func (*Resource) DeepCopy

func (in *Resource) DeepCopy() *Resource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.

func (*Resource) DeepCopyInto

func (in *Resource) DeepCopyInto(out *Resource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Service

type Service struct {
	// Port describes the service port.
	Port int64 `json:"port"`

	// Name describes the service name.
	Name string `json:"name"`

	// Namespace describes the service namespace.
	Namespace string `json:"namespace"`
}

Service describes the service specification for the corresponding operator container.

func (*Service) DeepCopy

func (in *Service) DeepCopy() *Service

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.

func (*Service) DeepCopyInto

func (in *Service) DeepCopyInto(out *Service)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SyncStrategy

type SyncStrategy string

SyncStrategy determines how the Remote Cluster is synchronized with the Control Plane. This can influence secret lookup, or other behavioral patterns when interacting with the remote cluster.

type TrackingObject

type TrackingObject struct {
	apimetav1.TypeMeta `json:",inline"`
	PartialMeta        `json:"metadata,omitempty"`
}

TrackingObject contains TypeMeta and PartialMeta to allow a generation based object tracking. It purposefully does not use ObjectMeta as the generation of controller-runtime for crds would not validate the generation fields even when embedding ObjectMeta.

func (*TrackingObject) DeepCopy

func (in *TrackingObject) DeepCopy() *TrackingObject

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrackingObject.

func (*TrackingObject) DeepCopyInto

func (in *TrackingObject) DeepCopyInto(out *TrackingObject)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WatchableGVR

type WatchableGVR struct {
	Group    string `json:"group"`
	Version  string `json:"version"`
	Resource string `json:"resource"`
}

WatchableGVR unambiguously identifies the resource that should be watched.

func (*WatchableGVR) DeepCopy

func (in *WatchableGVR) DeepCopy() *WatchableGVR

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WatchableGVR.

func (*WatchableGVR) DeepCopyInto

func (in *WatchableGVR) DeepCopyInto(out *WatchableGVR)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Watcher

type Watcher struct {
	apimetav1.TypeMeta   `json:",inline"`
	apimetav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   WatcherSpec   `json:"spec,omitempty"`
	Status WatcherStatus `json:"status,omitempty"`
}

Watcher is the Schema for the watchers API.

func (*Watcher) DeepCopy

func (in *Watcher) DeepCopy() *Watcher

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Watcher.

func (*Watcher) DeepCopyInto

func (in *Watcher) DeepCopyInto(out *Watcher)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Watcher) DeepCopyObject

func (in *Watcher) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Watcher) GetModuleName

func (watcher *Watcher) GetModuleName() string

func (*Watcher) InitializeConditions

func (watcher *Watcher) InitializeConditions()

func (*Watcher) UpdateWatcherConditionStatus

func (watcher *Watcher) UpdateWatcherConditionStatus(conditionType WatcherConditionType,
	conditionStatus apimetav1.ConditionStatus,
)

type WatcherConditionMessage

type WatcherConditionMessage string
const (
	VirtualServiceConfiguredConditionMessage    WatcherConditionMessage = "VirtualService is configured"
	VirtualServiceNotConfiguredConditionMessage WatcherConditionMessage = "VirtualService is not configured"
)

type WatcherConditionReason

type WatcherConditionReason string
const (
	// ReadyConditionReason will be set to `Ready` on all Conditions. If the Condition is actual ready,
	// can be determined by the state.
	ReadyConditionReason WatcherConditionReason = "Ready"
)

type WatcherConditionType

type WatcherConditionType string
const (
	// WatcherConditionTypeVirtualService represents WatcherConditionType VirtualService.
	WatcherConditionTypeVirtualService WatcherConditionType = "VirtualService"
)

type WatcherList

type WatcherList struct {
	apimetav1.TypeMeta `json:",inline"`
	apimetav1.ListMeta `json:"metadata,omitempty"`
	Items              []Watcher `json:"items"`
}

WatcherList contains a list of Watcher.

func (*WatcherList) DeepCopy

func (in *WatcherList) DeepCopy() *WatcherList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WatcherList.

func (*WatcherList) DeepCopyInto

func (in *WatcherList) DeepCopyInto(out *WatcherList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WatcherList) DeepCopyObject

func (in *WatcherList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WatcherSpec

type WatcherSpec struct {
	// ServiceInfo describes the service information of the listener
	ServiceInfo Service `json:"serviceInfo"`

	// LabelsToWatch describes the labels that should be watched
	LabelsToWatch map[string]string `json:"labelsToWatch"`

	// ResourceToWatch is the GroupVersionResource of the resource that should be watched.
	ResourceToWatch WatchableGVR `json:"resourceToWatch"`

	// Field describes the subresource that should be watched
	// Value can be one of ("spec", "status")
	Field FieldName `json:"field"`

	// Gateway configures the Istio Gateway for the VirtualService that is created/updated during processing
	// of the Watcher CR.
	Gateway GatewayConfig `json:"gateway"`
}

WatcherSpec defines the desired state of Watcher.

func (*WatcherSpec) DeepCopy

func (in *WatcherSpec) DeepCopy() *WatcherSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WatcherSpec.

func (*WatcherSpec) DeepCopyInto

func (in *WatcherSpec) DeepCopyInto(out *WatcherSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WatcherStatus

type WatcherStatus struct {
	// State signifies current state of a Watcher.
	// Value can be one of ("Ready", "Processing", "Error", "Deleting", "Warning")
	State shared.State `json:"state"`

	// List of status conditions to indicate the status of a Watcher.
	// +kubebuilder:validation:Optional
	// +listType=map
	// +listMapKey=type
	Conditions []apimetav1.Condition `json:"conditions"`

	// ObservedGeneration
	// +kubebuilder:validation:Optional
	ObservedGeneration int64 `json:"observedGeneration"`
}

WatcherStatus defines the observed state of Watcher.

func (*WatcherStatus) DeepCopy

func (in *WatcherStatus) DeepCopy() *WatcherStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WatcherStatus.

func (*WatcherStatus) DeepCopyInto

func (in *WatcherStatus) DeepCopyInto(out *WatcherStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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