diff --git a/api/v1beta2/manifest_types.go b/api/v1beta2/manifest_types.go index 1acf8bc1fc..a8f0485c51 100644 --- a/api/v1beta2/manifest_types.go +++ b/api/v1beta2/manifest_types.go @@ -63,10 +63,10 @@ type ManifestSpec struct { // Resource specifies a resource to be watched for state updates Resource *unstructured.Unstructured `json:"resource,omitempty"` - // ManagedResources specifies a list of resources which are managed - // manually by the user. The resources have the following format: //. + // AssociatedResources specifies a list of resources which are not managed + // by the lifecycle manager. The resources have the following format: //. // +optional - ManagedResources []string `json:"managedResources,omitempty"` + AssociatedResources []string `json:"associatedResources,omitempty"` } // ImageSpec defines OCI Image specifications. diff --git a/api/v1beta2/zz_generated.deepcopy.go b/api/v1beta2/zz_generated.deepcopy.go index 35fb8c8f4b..74f9f5ade7 100644 --- a/api/v1beta2/zz_generated.deepcopy.go +++ b/api/v1beta2/zz_generated.deepcopy.go @@ -289,8 +289,8 @@ func (in *ManifestSpec) DeepCopyInto(out *ManifestSpec) { in, out := &in.Resource, &out.Resource *out = (*in).DeepCopy() } - if in.ManagedResources != nil { - in, out := &in.ManagedResources, &out.ManagedResources + if in.AssociatedResources != nil { + in, out := &in.AssociatedResources, &out.AssociatedResources *out = make([]string, len(*in)) copy(*out, *in) } diff --git a/config/crd/bases/operator.kyma-project.io_manifests.yaml b/config/crd/bases/operator.kyma-project.io_manifests.yaml index c06c08e5e6..d866be8855 100644 --- a/config/crd/bases/operator.kyma-project.io_manifests.yaml +++ b/config/crd/bases/operator.kyma-project.io_manifests.yaml @@ -49,6 +49,13 @@ spec: spec: description: ManifestSpec defines the desired state of Manifest. properties: + associatedResources: + description: |- + AssociatedResources specifies a list of resources which are not managed + by the lifecycle manager. The resources have the following format: //. + items: + type: string + type: array config: description: Config specifies OCI image configuration for Manifest properties: @@ -136,13 +143,6 @@ spec: - name - source type: object - managedResources: - description: |- - ManagedResources specifies a list of resources which are managed - manually by the user. The resources have the following format: //. - items: - type: string - type: array remote: description: Remote indicates if Manifest should be installed on a remote cluster @@ -326,6 +326,13 @@ spec: spec: description: ManifestSpec defines the desired state of Manifest. properties: + associatedResources: + description: |- + AssociatedResources specifies a list of resources which are not managed + by the lifecycle manager. The resources have the following format: //. + items: + type: string + type: array config: description: Config specifies OCI image configuration for Manifest properties: @@ -413,13 +420,6 @@ spec: - name - source type: object - managedResources: - description: |- - ManagedResources specifies a list of resources which are managed - manually by the user. The resources have the following format: //. - items: - type: string - type: array remote: description: Remote indicates if Manifest should be installed on a remote cluster diff --git a/docs/technical-reference/api/manifest-cr.md b/docs/technical-reference/api/manifest-cr.md index 93564b8440..b4c384d7e6 100644 --- a/docs/technical-reference/api/manifest-cr.md +++ b/docs/technical-reference/api/manifest-cr.md @@ -85,13 +85,13 @@ The [internal spec resolver](../../../internal/manifest/spec_resolver.go) uses t The resource is the default data that should be initialized for the module and is directly copied from **.spec.data** of the ModuleTemplate CR after normalizing it with the **namespace** for the synchronized module. -### **.spec.managedResources** +### **.spec.associatedResources** -The managed resources are the resources that are handled manually by the user. They are represented by the `group/version/kind` format. +The associated resources are the resources that are not managed by the lifecycle manager. They are represented by the `group/version/kind` format. Suppose the module is managed and gets deleted from the Kyma CR. In that case, the module deletion is suspended until all custom resources with GVK listed in the **spec.managedResources** are removed manually by the user. ```yaml spec: - managedResources: + associatedResources: - serverless.kyma-project.io/v1alpha2/functions - operator.kyma-project.io/v1alpha1/serverlesses ```