Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Revert "feat: Introduce managed flag to KymaCR .spec.modules (#1652)" #1658

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions api/v1beta2/kyma_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ type Module struct {

// +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"`
}

// CustomResourcePolicy determines how a ModuleTemplate should be parsed. When CustomResourcePolicy is set to
Expand Down
14 changes: 0 additions & 14 deletions config/crd/bases/operator.kyma-project.io_kymas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@ spec:
- CreateAndDelete
- Ignore
type: string
managed:
default: true
description: |-
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.
type: boolean
name:
description: |-
Name is a unique identifier of the module.
Expand All @@ -107,7 +101,6 @@ spec:
It will be removed in the upcoming API version.
type: string
required:
- managed
- name
type: object
type: array
Expand Down Expand Up @@ -527,12 +520,6 @@ spec:
- CreateAndDelete
- Ignore
type: string
managed:
default: true
description: |-
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.
type: boolean
name:
description: |-
Name is a unique identifier of the module.
Expand All @@ -550,7 +537,6 @@ spec:
It will be removed in the upcoming API version.
type: string
required:
- managed
- name
type: object
type: array
Expand Down
29 changes: 1 addition & 28 deletions docs/technical-reference/api/kyma-cr.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,38 +100,11 @@ The module mentioned above can be referenced in one of the following ways:
- name: kyma-project.io/module/sample
```

### **.spec.modules[].managed**

For each module, it must be defined whether it is `managed` or `unmanaged`.
If it is `managed`, Lifecycle Manager takes care of the module's lifecycle (creating, updating, deleting).
If it is `unmanaged`, Lifecycle Manager ignores the module and the users must take care of the lifecycle themselves.
To define this, the **managed** flag must be either `true` or `false`.
By default, the **managed** flag is set to `true` and the module is therefore `managed` by Lifecycle Manager.

```yaml
spec:
channel: regular
modules:
- name: module-name-from-label
managed: true
```

### **.spec.modules[].customResourcePolicy**

A module may be initialized with preconfigured default data.
To control the configuration, use the **customResourcePolicy** flag.
The value can either be `CreateAndDelete` or `Ignore`.
In addition to this very flexible way of referencing modules, there is also another flag that can be important for users requiring more flexibility during module initialization. The `customResourcePolicy` flag is used to define one of `CreateAndDelete` and `Ignore`.
While `CreateAndDelete` causes the ModuleTemplate CR's **.spec.data** to be created and deleted to initialize a module with preconfigured defaults, `Ignore` can be used to only initialize the operator without initializing any default data.
This allows users to be fully flexible in regard to when and how to initialize their module.
By default, the **customResourcePolicy** flag is `CreateAndDelete` which makes the module preconfigured.

```yaml
spec:
channel: regular
modules:
- name: module-name-from-label
customResourcePolicy: CreateAndDelete
```

### **.status.state**

Expand Down
Loading