Skip to content

Commit

Permalink
Merge branch 'main' into remove_labels_unmanaged
Browse files Browse the repository at this point in the history
  • Loading branch information
nesmabadr committed Oct 11, 2024
2 parents 4a27fa9 + 01eb24e commit 1e2c3d6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
3 changes: 3 additions & 0 deletions api/v1beta1/moduletemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ type ModuleTemplate struct {
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]+$
// +kubebuilder:validation:MaxLength:=32
// +kubebuilder:validation:MinLength:=3
Expand Down
3 changes: 3 additions & 0 deletions api/v1beta2/moduletemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ func (d *Descriptor) DeepCopyObject() machineryruntime.Object {
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]+$
// +kubebuilder:validation:MaxLength:=32
// +kubebuilder:validation:MinLength:=3
Expand Down
14 changes: 7 additions & 7 deletions config/crd/bases/operator.kyma-project.io_moduletemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ spec:
description: |-
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.
maxLength: 32
minLength: 3
pattern: ^[a-z]+$
Expand Down Expand Up @@ -119,7 +120,6 @@ spec:
- remote
type: string
required:
- channel
- descriptor
- target
type: object
Expand Down Expand Up @@ -180,6 +180,7 @@ spec:
description: |-
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.
maxLength: 32
minLength: 3
pattern: ^[a-z]+$
Expand Down Expand Up @@ -259,19 +260,19 @@ spec:
description: Name is the name of the icon.
type: string
required:
- link
- name
- link
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
- name
x-kubernetes-list-type: map
repository:
description: Repository is the link to the repository of the module.
type: string
required:
- documentation
- repository
- documentation
- repository
type: object
mandatory:
description: |-
Expand Down Expand Up @@ -310,7 +311,6 @@ spec:
pattern: ^((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-[a-zA-Z-][0-9a-zA-Z-]*)?)?$
type: string
required:
- channel
- descriptor
type: object
type: object
Expand Down
8 changes: 5 additions & 3 deletions docs/contributor/resources/03-moduletemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ kubectl get crd moduletemplates.operator.kyma-project.io -o yaml

## Configuration

### **.spec.channel**
### **.spec.channel** (Deprecated)

The channel that a ModuleTemplate CR is registered in. It is used alongside the channel attributes of the Kyma CR to match up a module and a channel.
The `channel` field previously indicated the channel in which a ModuleTemplate CR was registered. It was used alongside the channel attributes of the Kyma CR to match a module with a specific channel.

**Note:** This field is now deprecated and will be removed in a future release. It has been decided that ModuleTemplates are now tied directly to versions, rather than being associated with channels.

For the following ModuleTemplate CR:

Expand All @@ -27,7 +29,7 @@ spec:
channel: regular
```
the module will be referenced by any Kyma CR asking for it in the `regular` channel.
the module was referenced by any Kyma CR asking for it in the `regular` channel.

### **.spec.data**

Expand Down
4 changes: 2 additions & 2 deletions internal/controller/manifest/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/kyma-project/lifecycle-manager/api/shared"
"github.com/kyma-project/lifecycle-manager/api/v1beta2"
v2 "github.com/kyma-project/lifecycle-manager/internal/declarative/v2"
declarativev2 "github.com/kyma-project/lifecycle-manager/internal/declarative/v2"
"github.com/kyma-project/lifecycle-manager/internal/pkg/metrics"
"github.com/kyma-project/lifecycle-manager/pkg/queue"
"github.com/kyma-project/lifecycle-manager/pkg/security"
Expand All @@ -41,7 +41,7 @@ func SetupWithManager(mgr manager.Manager,
settings SetupOptions,
manifestMetrics *metrics.ManifestMetrics,
mandatoryModulesMetrics *metrics.MandatoryModulesMetrics,
manifestClient v2.ManifestAPIClient,
manifestClient declarativev2.ManifestAPIClient,
) error {
var verifyFunc watcherevent.Verify
if settings.EnableDomainNameVerification {
Expand Down

0 comments on commit 1e2c3d6

Please sign in to comment.