Kuadrant / limitador-operator

Apache License 2.0
6 stars 14 forks source link

Gh 668 #143

Closed R-Lawton closed 4 months ago

R-Lawton commented 5 months ago

WHAT: Adding labels to resources as limitador often runs in the same namespace as other operators so we are seeing certain issues with metrics repeating mainly around the service resource. Since its adding a label it shouldn't break things

codecov-commenter commented 5 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.40%. Comparing base (da27315) to head (afbcffe).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #143 +/- ## ========================================== - Coverage 85.01% 84.40% -0.61% ========================================== Files 19 19 Lines 994 994 ========================================== - Hits 845 839 -6 - Misses 97 100 +3 - Partials 52 55 +3 ``` | [Flag](https://app.codecov.io/gh/Kuadrant/limitador-operator/pull/143/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | Coverage Δ | | |---|---|---| | [integration](https://app.codecov.io/gh/Kuadrant/limitador-operator/pull/143/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | `78.37% <ø> (-1.01%)` | :arrow_down: | | [unit](https://app.codecov.io/gh/Kuadrant/limitador-operator/pull/143/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | `66.51% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/Kuadrant/limitador-operator/pull/143/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | Coverage Δ | | |---|---|---| | [api/v1alpha1 (u)](https://app.codecov.io/gh/Kuadrant/limitador-operator/pull/143/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | `100.00% <ø> (ø)` | | | [pkg/helpers (u)](https://app.codecov.io/gh/Kuadrant/limitador-operator/pull/143/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | `83.87% <ø> (ø)` | | | [pkg/log (u)](https://app.codecov.io/gh/Kuadrant/limitador-operator/pull/143/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | `94.73% <ø> (ø)` | | | [pkg/reconcilers (u)](https://app.codecov.io/gh/Kuadrant/limitador-operator/pull/143/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | `74.67% <ø> (ø)` | | | [pkg/limitador (u)](https://app.codecov.io/gh/Kuadrant/limitador-operator/pull/143/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | `98.11% <ø> (ø)` | | | [controllers (i)](https://app.codecov.io/gh/Kuadrant/limitador-operator/pull/143/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | `73.33% <ø> (-2.00%)` | :arrow_down: | | [pkg/upgrades](https://app.codecov.io/gh/Kuadrant/limitador-operator/pull/143/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | `88.88% <ø> (ø)` | | [see 2 files with indirect coverage changes](https://app.codecov.io/gh/Kuadrant/limitador-operator/pull/143/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant)
david-martin commented 5 months ago

This change is needed as the limitador operator typically runs in the same namespace as other operators when deployed as part of kuadrant. The change should be backwards compatible as it's adding a new label app: limitador to various resources. The most important one is the metrics Service, as it can result in odd behaviour where it routes traffic to more than just the limitador operator.

david-martin commented 4 months ago

@eguzki thoughts on this change? Is it sufficient to make the changes here so that kuadrant-operator deploys the resources with the new label?

R-Lawton commented 4 months ago

Hey @eguzki, What do you think of these changes am I missing anything?