gitops-engine icon indicating copy to clipboard operation
gitops-engine copied to clipboard

feat: Add ability to hide certain annotations on secret resources

Open svghadi opened this issue 1 year ago • 7 comments
trafficstars

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

svghadi avatar May 14 '24 17:05 svghadi

@CodiumAI-Agent /review

pasha-codefresh avatar Jun 30 '24 14:06 pasha-codefresh

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.

CodiumAI-Agent avatar Jun 30 '24 14:06 CodiumAI-Agent

Hi @pasha-codefresh, sorry for the nudge :point_right: :sweat_smile:. Did you get a chance to review it again?

svghadi avatar Jul 23 '24 13:07 svghadi

@svghadi sorry, had urgent work to do, i will review it tomorrow

pasha-codefresh avatar Jul 31 '24 17:07 pasha-codefresh

Hey @pasha-codefresh, were you able to review it again by any chance? thanks in advance.

isaccavalcante avatar Aug 20 '24 16:08 isaccavalcante

Taking one more day for manual testing, but overall LGTM to me

pasha-codefresh avatar Oct 28 '24 17:10 pasha-codefresh