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: Flux package manager that can renovate HelmRelease manifests #13566

Merged
merged 14 commits into from
Jan 19, 2022

Conversation

danports
Copy link
Contributor

@danports danports commented Jan 14, 2022

Adds a new flux package manager that parses HelmRelease and HelmRepository manifests. Mostly code adapted from the helmfile, gitlabci, and kubernetes managers. Closes #5984.

  • Update docs
  • Add unit tests
  • Test on a real repository
  • Add more tests to achieve 100% code coverage
  • Review SkipReason returned when failing to match a HelmRelease to a HelmRepository

This was my first time writing TypeScript, and it was really quite pleasant! 🙂

@danports danports changed the title Flux package manager that can renovate HelmRelease manifests feat: Flux package manager that can renovate HelmRelease manifests Jan 14, 2022
@viceice viceice self-requested a review January 15, 2022 06:19
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

Needs some defensive non-null checks added in quite a few places, unless the response is first fully validated to conform to the TS type(s)

lib/manager/flux/extract.ts Show resolved Hide resolved
lib/manager/flux/extract.ts Outdated Show resolved Hide resolved
lib/manager/flux/extract.ts Outdated Show resolved Hide resolved
lib/manager/flux/extract.ts Outdated Show resolved Hide resolved
lib/manager/flux/extract.ts Show resolved Hide resolved
lib/manager/flux/readme.md Outdated Show resolved Hide resolved
lib/manager/flux/readme.md Outdated Show resolved Hide resolved
lib/manager/flux/readme.md Outdated Show resolved Hide resolved
lib/manager/flux/extract.spec.ts Outdated Show resolved Hide resolved
lib/manager/flux/extract.spec.ts Outdated Show resolved Hide resolved
lib/manager/flux/extract.spec.ts Outdated Show resolved Hide resolved
lib/manager/flux/extract.ts Outdated Show resolved Hide resolved
lib/manager/flux/extract.ts Show resolved Hide resolved
lib/manager/flux/index.ts Outdated Show resolved Hide resolved
lib/manager/flux/index.ts Outdated Show resolved Hide resolved
lib/manager/flux/extract.spec.ts Outdated Show resolved Hide resolved
@anthr76
Copy link

anthr76 commented Jan 16, 2022

Any chance we can cover a flux kustomization in this PR? It would resolve #12139

@danports
Copy link
Contributor Author

@anthr76 I read through #12139 but it's not clear to me what needs to be renovated in Kustomization resources. Can you clarify in that issue? I've only used Kustomization manifests at a very basic level in Flux, so perhaps I just haven't run into that use case yet. My preference would be to land this PR and then consider extending the Flux manager in future PRs.

@danports danports requested a review from viceice January 16, 2022 23:40
@danports
Copy link
Contributor Author

Got it. I don't currently use GitRepository resources in my Flux repositories so that wouldn't be a priority for me but is certainly something that could be added in a future PR.

@rarkins
Copy link
Collaborator

rarkins commented Jan 17, 2022

@anthr76 can you create a feature request for the additional features? Either create once this is merged or assume this PR will be merged soon!

lib/manager/flux/extract.ts Outdated Show resolved Hide resolved
lib/manager/flux/extract.ts Outdated Show resolved Hide resolved
lib/manager/flux/extract.ts Show resolved Hide resolved
@danports danports requested a review from viceice January 17, 2022 17:11
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

Confusion over extractAllPackageFiles

lib/manager/flux/extract.ts Show resolved Hide resolved
@danports danports requested a review from rarkins January 18, 2022 22:06
lib/manager/flux/readme.md Show resolved Hide resolved
lib/manager/flux/readme.md Outdated Show resolved Hide resolved
lib/manager/flux/readme.md Outdated Show resolved Hide resolved
rarkins
rarkins previously approved these changes Jan 19, 2022
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, waiting for doc fixes 🤗

Co-authored-by: HonkingGoose <[email protected]>
Copy link
Collaborator

@HonkingGoose HonkingGoose left a comment

Choose a reason for hiding this comment

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

I'm happy with the docs now. 😄

@rarkins rarkins enabled auto-merge (squash) January 19, 2022 14:34
@rarkins rarkins merged commit 3c2a386 into renovatebot:main Jan 19, 2022
@ChipWolf
Copy link

🚀

@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 31.35.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@danports danports deleted the flux-manager branch January 19, 2022 16:39
@danports
Copy link
Contributor Author

How long does it take new builds to make it to Docker Hub? Was hoping to update my GitLab Renovate runner to use this release, but I don't see it on Docker Hub yet.

@rarkins
Copy link
Collaborator

rarkins commented Jan 19, 2022

Usually a few hours. Keep an eye on the renovatebot/docker-renovate-full repo

@danports
Copy link
Contributor Author

Awesome, I see the 31.35-slim tag on Docker Hub now. Thanks all for helping to get this PR over the finish line in under a week! 🙂

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2022
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.

Support Renovating HelmRelease CRD
7 participants