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

AppSet diff support #227

Closed
KalenWessel opened this issue May 30, 2024 · 3 comments
Closed

AppSet diff support #227

KalenWessel opened this issue May 30, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@KalenWessel
Copy link
Collaborator

KalenWessel commented May 30, 2024

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 Greyeye added the enhancement New feature or request label Jul 3, 2024
@Greyeye
Copy link
Collaborator

Greyeye commented Jul 4, 2024

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:

  • ApplicationSet Modification: A change is detected in an ApplicationSet.
    Fetch Dependencies: Kubechecks queries ArgoCD to retrieve all applications generated by this ApplicationSet.
  • Run Diff: Simulate and run a diff for both the ApplicationSet and its generated applications.
  • Report: Aggregate the results and report back to the PR/MR, indicating the impact of the changes.

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
Copy link
Collaborator

Greyeye commented Jul 8, 2024

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

@Greyeye
Copy link
Collaborator

Greyeye commented Jul 31, 2024

feature added with v1.7.0

@Greyeye Greyeye closed this as completed Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants