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

docs: add note on repo cache for git generator #17980

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rolandkool
Copy link

@rolandkool rolandkool commented Apr 26, 2024

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@rolandkool rolandkool requested review from a team as code owners April 26, 2024 09:27
Signed-off-by: Roland Kool <roland@erca.nl)

## Repository caching

Files or directories that are added to or removed from the Git repository are only picked up by the ApplicationSet controller
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Files or directories that are added to or removed from the Git repository are only picked up by the ApplicationSet controller
Files or directories that are added to or removed from the git repository are only picked up by the ApplicationSet controller

Copy link
Contributor

@todaywasawesome todaywasawesome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rolandkool I don't think this is correct. By default Argo CD checks for changes to the repo every 3 minutes, if there are no changes to the repo the cache is still invalidated after 24 hours. So for example, if you have a helm chart that generates a random value, that will be picked up every 24 hours but because no files change, not before.

The scenario you've laid out the files are changing and are not being picked up.

@todaywasawesome
Copy link
Contributor

@rolandkool
Copy link
Author

@todaywasawesome I'm using a pattern similar to what is described here: https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Git/#git-generator-files

When I add a new directory with a file similar to the config,json described in the example, the ApplicationSet is not picking it up after 3 minutes. Even restarting the applicationset controller and repo server does not trigger the creation of a new Application. Same with removal. When I reduce the caching for the repo server as described in this PR, the ApplicationSet picks up the new files. If this is considered a bug, I can file a Github issue for it.

@todaywasawesome
Copy link
Contributor

@rolandkool would you mind sharing what version Argo CD you're using and what git provider?

@rolandkool
Copy link
Author

I tested this with 2.10.7 iirc and the git provider is our internal gitlab instance.

Comment on lines +445 to +447
## Repository caching

Files or directories that are added to or removed from the Git repository are only picked up by the ApplicationSet controller
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem like the desired behavior. The AppSet controller should be monitoring for new SHAs on the target revision and pulling new info from repo-server when a new SHA appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants