gitops-engine
gitops-engine copied to clipboard
feat: Add ability to hide certain annotations on secret resources
Related to https://github.com/argoproj/argo-cd/issues/15693.
This PR implements core logic from argoproj/argo-cd#hide-annotations.md proposal to hide annotations on secret resources.
This change will be integrated with Argo CD via https://github.com/argoproj/argo-cd/pull/18216.
Integration results:
https://github.com/user-attachments/assets/f47d7b18-cfbc-4fef-8a63-cd7e670abcc7
Quality Gate passed
Issues
5 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
3.4% Duplication on New Code
@CodiumAI-Agent /review
PR Reviewer Guide 🔍
| ⏱️ Estimated effort to review [1-5] | 3 |
| 🧪 Relevant tests | Yes |
| 🔒 Security concerns | No |
| ⚡ Key issues to review |
Possible Bug: The function HideSecretData now accepts an optional hideAnnots parameter which is used to specify which annotations should be hidden. However, there is no check to ensure that the annotations specified actually exist in the object, which could lead to unnecessary processing or errors if non-existent annotations are specified. |
|
Performance Concern: The method of hiding annotations involves iterating over each annotation for each object (target, live, orig) which could be inefficient, especially with a large number of annotations or secrets. Consider optimizing this process. |
Hi @pasha-codefresh, sorry for the nudge :point_right: :sweat_smile:. Did you get a chance to review it again?
@svghadi sorry, had urgent work to do, i will review it tomorrow
Hey @pasha-codefresh, were you able to review it again by any chance? thanks in advance.
Quality Gate passed
Issues
7 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Taking one more day for manual testing, but overall LGTM to me