Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argo diff #44

Merged
merged 23 commits into from
Nov 14, 2024
Merged

Argo diff #44

merged 23 commits into from
Nov 14, 2024

Conversation

sachinchauhan23
Copy link
Contributor

No description provided.

targets.go Outdated Show resolved Hide resolved
@AtzeDeVries
Copy link
Contributor

I think you should approach this differently. I think you should mimic the behaviour of for example the KubeScore() function. Calls a function which renders templates from information fetched from ArgoCD, then passes the rendered templates on to kubeScore(paths) to do the actual work.

You are now inputting argocdapps into the validateKyvernoPolicies. For kyverno to run, we only require the rendered templates from the app, which is already handeled by the renderTemplates() fuction.

I think it is best to create a validateKyvernoPolicies function that just expects a list of rendered templates (paths).

This will simplify testing a lot and also improve reusability.

Currently the test fails because it is unable to download the repository where the policyfiles are stored. I would omit this for now and store the policy files in this repo (and also in the repo where the engineering image is build). Create an issue here that adds the task to fix auto downloading the policies.

targets_test.go Outdated Show resolved Hide resolved
@sachinchauhan23 sachinchauhan23 merged commit 6359f9d into main Nov 14, 2024
16 checks passed
@sachinchauhan23 sachinchauhan23 deleted the argo-diff branch November 14, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants