-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(api): compute labels on resource update (#11861)
## Motivation While writing a POC for `MeshExternalService` through a specific zone, I noticed that the resource I used did not have a zone label. During debugging, I found that the resource was initially created correctly in one test, and in a subsequent test, we updated it without actually modifying any fields. However, after this second call, the updated resource was missing labels, while the original resource retained them. After fixing one thing I've noticed that MeshService is missing `kuma.io/zone` label and that caused that policy wasn't matched and had to add it. Create <img width="572" alt="Pasted Graphic" src="https://github.com/user-attachments/assets/5ff25fdb-b937-4e9e-a867-ed578c948f48"> Update <img width="551" alt="protocol http" src="https://github.com/user-attachments/assets/181da552-d63f-4b1f-b5ea-c23fbdf04c6c"> ## Implementation information I added a ComputeLabels call during the update, as previously we were simply overriding all labels with those from the resource, without recalculating them. I added a `kuma.io/zone` label on MeshService generated on universal. ## Supporting documentation <!-- Is there a MADR? An Issue? A related PR? --> Fix #XX This issue needs to be addressed at a broader level, as it requires a design. This should be covered by [issue #11061](#11061). --------- Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
- Loading branch information
Showing
6 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters