There should be an option to unmanage a module. When unmanaged, the KLM deletes the module's ManifestCR and stops reconciling the module. However, the workload (module resources deployed to the SKR) is not affected.
Reasons
In some cases, users would like to have full control over their Modules' lifecycle.
Acceptance Criteria
[x] When the user sets .spec.modules[].managed: false
[x] KLM deletes module's ManifestCR without affecting deployed resources
[x] module's workload (resources deployed to the SKR) remain to exist
[x] KLM does NOT reconcile the module's workload any longer
[x] KLM sets KymaCR .status.state and .status.modules[] to
And the user removes the module completely from spec.modules[]
[x] KLM deletes module from KymaCR .status.modules[]
[x] module's workload (resources deployed to the SKR) remain to exist
[x] KLM does NOT reconcile the module's workload
[x] KLM sets KymaCR .status.state to Ready
[x] Documentation clearly states that
[x] Before removing an entry from .spec.modules[] that has managed: false set, the related .status.modules[].state MUST be Unmanaged
[x] If the entry is removed before .status.modules[].state transitioned to Unmanaged, the behavior of the deletion is unpredictable (i.e., either behaves like deletion of a managed or unmanaged module) and may lead to erroneous states
Feature Testing
End-to-End tests
Testing approach
E2E Test:
Given a Kyma Module with managed set to true
And a SKR Kyma CR is created on the SKR Cluster
And a Manifest CR is created on the KCP Cluster
And - Module Operator, Module CR, and [Module Managed Resources] are created on the SKR Cluster
And Kyma Status is in a Ready State
When the Managed field is set to false for the Kyma Module
Then the Kyma Module is no longer reconciled
Module Status for that Kyma Module becomes Unmanaged
Manifest CR is removed from the KCP Cluster
Module Operator, Module CR, and [Module Managed Resources] are kept intact in the SKR Cluster
And Kyma Status is in a Ready State
When Kyma Module is removed from kyma.spec.modules list
Then Module Operator, Module CR, and [Module Managed Resources] are kept intact in the SKR
Cluster
Description
There should be an option to unmanage a module. When unmanaged, the KLM deletes the module's ManifestCR and stops reconciling the module. However, the workload (module resources deployed to the SKR) is not affected.
Reasons
In some cases, users would like to have full control over their Modules' lifecycle.
Acceptance Criteria
.spec.modules[].managed: false
.status.state
and.status.modules[]
toAnd the user removes the module completely from
spec.modules[]
.status.modules[]
.status.state
toReady
.spec.modules[]
that hasmanaged: false
set, the related.status.modules[].state
MUST beUnmanaged
.status.modules[].state
transitioned toUnmanaged
, the behavior of the deletion is unpredictable (i.e., either behaves like deletion of a managed or unmanaged module) and may lead to erroneous statesFeature Testing
End-to-End tests
Testing approach
E2E Test:
Ready
StateReady
Statekyma.spec.modules
listReady
StateAttachments
No response