kyma-project / cloud-manager

Apache License 2.0
3 stars 14 forks source link

fix: copy Kyma labels to Scope #693

Closed tmilos77 closed 1 week ago

tmilos77 commented 1 week ago

Description

The Kyma CR can be deleted while Scope still exists, like when SKR cluster is deleted. Then we need to deactive that scope and SKR from the skrLooper and decease the cloud_manager_skr_runtime_module_active_count metrics. That metrics has labels "kymaName", "globalAccountId", "subAccountId", "shootName", "region", "brokerPlanName", where all but the first are not accessible anymore since Kyma was deleted. Hence, we need to copy those Kyma labels to Scope so that data is available at the time Scope is deleted and SKR deactivated so the proper metric can be decreased.

Changes proposed in this pull request:

Related issue(s)