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

feat(argocd): implement manager #9771

Merged
merged 8 commits into from Apr 29, 2021
Merged

Conversation

secustor
Copy link
Collaborator

Changes:

This PR implements basic capabilities to renovate ArgoCD application definitions.
File matches are empty by default as Argo uses yaml files, therefore I'm mimicking the Kubernetes manager here.

Supported references are:

  • helm charts
  • Git repositories

Context:

Closes #7416

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

lib/manager/argocd/__fixtures__/validApplication.yml Outdated Show resolved Hide resolved
lib/manager/argocd/extract.ts Outdated Show resolved Hide resolved
lib/manager/argocd/extract.ts Show resolved Hide resolved
@secustor secustor requested a review from viceice April 28, 2021 22:30
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

some smaller changes

lib/manager/argocd/extract.ts Outdated Show resolved Hide resolved
lib/manager/argocd/extract.ts Outdated Show resolved Hide resolved
lib/manager/argocd/extract.ts Outdated Show resolved Hide resolved
config?: ExtractConfig
): PackageFile | null {
// check for argo reference. API version for the kind attribute is used
if (fileTestRegex.test(content) === false) {
Copy link
Member

Choose a reason for hiding this comment

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

Nice, so we can save parsing phase if we know this is no argocd document. 👍

@rarkins I think we can enable it by default for all yaml files as this regex will ignore files which do not have argocd content.

Copy link
Collaborator

Choose a reason for hiding this comment

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

My main concern is that repos may have hundreds of YAML files while only a very small fraction would be argo or even use argo.

Is there any naming convention which would cover maybe 80%+ of the files e.g. /argo.*\.yaml$/i ?

If so then I'd prefer that as the default. But if not, it could be ok to default to all .yaml

Copy link
Collaborator Author

@secustor secustor Apr 29, 2021

Choose a reason for hiding this comment

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

No, there aren't such conventions.
Basically this is updating Kubernetes manifests which contain ArgoCD CR manifests. Because of that fact every .yaml could contain an ArgoCD manifest.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, let's see how it goes then. I think we may read detected files into memory in parallel, so it could increase memory use by a lot if there are large YAML files.

lib/manager/argocd/extract.ts Outdated Show resolved Hide resolved
@secustor secustor requested a review from viceice April 29, 2021 09:08
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

LGTM, wating for @rarkins response.

@rarkins rarkins enabled auto-merge (squash) April 29, 2021 13:23
@rarkins rarkins merged commit a9c9d56 into renovatebot:main Apr 29, 2021
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 25.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@secustor secustor deleted the implement-argocd branch April 29, 2021 17:46
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Argo-CD Application support
4 participants