zapier / kubechecks

Check your Kubernetes changes before they hit the cluster
https://kubechecks.readthedocs.io/en/latest/
Mozilla Public License 2.0
136 stars 6 forks source link

AppSet diff support #227

Open KalenWessel opened 1 month ago

KalenWessel commented 1 month ago

Are there any plans to enhance the diffing capabilities for ArgoCD appsets in the future?

Currently, kubechecks partially supports appsets. If a values.yaml file referenced by an appset is modified, kubechecks can provide diffs for all affected apps. However, when changes are made to the appset.yaml values: | section, kubechecks only displays a diff of the values within the appset.yaml file. It doesn't indicate how these changes will impact the underlying apps.

To work around this we try to avoid making changes inside the appset.yaml files as much as possible but isn't always possible due to templating needs.

Greyeye commented 1 week ago

We need to modify the current approach to building the diff. When diff.Check is executed, it runs the diff only for the specific resource that triggered the request (e.g., if an application is modified, it runs a diff against that application; if an ApplicationSet is modified, it runs a diff against the ApplicationSet).

However, since ApplicationSets are responsible for generating applications, any changes to an ApplicationSet should also trigger a simulation/diff for the affected applications. Implementing this requires Kubechecks to be aware of the selectors and generators configured on the ArgoCD server. I have yet to figure this out and am not even sure it is possible to gather these.

Example Workflow:

Dev note

Currently, the localdev/Tile setup loads the test_appsets directly into the local development cluster. However, I'll need to modify this process so that Terraform loads the appsets and associated applications into the demo VCS repository. This will be followed by modifying the local development ArgoCD instance to read from this demo repository.

Greyeye commented 1 week ago

seems that there is already a discussion on ArgoCD Project on this matter.