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

feat: Add AssociatedResources to ModuleTemplate spec #1923

Merged
merged 4 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions api-version-compatibility-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ operator.kyma-project.io_moduletemplates.yaml:
- .spec.properties.version
- .spec.properties.moduleName
- .spec.properties.customStateCheck.description
- .spec.properties.associatedResources
4 changes: 4 additions & 0 deletions api/v1beta2/moduletemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ type ModuleTemplateSpec struct {

// CustomStateCheck is deprecated.
CustomStateCheck []*CustomStateCheck `json:"customStateCheck,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"`
}

type CustomStateCheck struct {
Expand Down
5 changes: 5 additions & 0 deletions api/v1beta2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions config/crd/bases/operator.kyma-project.io_moduletemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,27 @@ spec:
spec:
description: ModuleTemplateSpec defines the desired state of ModuleTemplate.
properties:
associatedResources:
description: AssociatedResources is a list of module related resources
that usually must be cleaned when uninstalling a module. Informational
purpose only.
items:
description: |-
GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion
to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling
properties:
group:
type: string
kind:
type: string
version:
type: string
required:
- group
- kind
- version
type: object
type: array
channel:
description: |-
Channel is the targeted channel of the ModuleTemplate. It will be used to directly assign a Template
Expand Down
6 changes: 6 additions & 0 deletions docs/contributor/resources/03-moduletemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ By default, it will most likely be easiest to use [Kyma CLI](https://github.com/
The `mandatory` field indicates whether the module is installed in all runtime clusters without any interaction from the user.
Mandatory modules do not appear in the Kyma CR `.status` and `.spec.modules`, furthermore they have the same configuration across all runtime clusters.


### **.spec.associatedResources**

The `associatedResources` field is a list of module related resource definitions that usually should be cleaned up when uninstalling a module.
lindnerby marked this conversation as resolved.
Show resolved Hide resolved
The purpose of listing GVKs here is purely informational and does not introduce functional changes to the module.
lindnerby marked this conversation as resolved.
Show resolved Hide resolved

## `operator.kyma-project.io` Labels

These are the synchronization labels available on the ModuleTemplate CR:
Expand Down
Loading