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

Use a regex manager to look at zarf.yamls and PR for their helm charts #963

Merged
merged 9 commits into from
Nov 4, 2022

Conversation

Racer159
Copy link
Contributor

@Racer159 Racer159 commented Nov 1, 2022

Description

This adds a regex manager for looking inside of zarf.yaml files and pulling out helm charts. This will be useful to know when gitea (or any other charts we add) are out of date and in need of updating.

Related Issue

Fixes # N/A

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist before merging

  • (Optional) Changes have been linted locally with golangci-lint. (NOTE: We haven't turned on lint checks in the pipeline yet so linting may be hard if it shows a lot of lint errors in places that weren't touched by changes. Thus, linting is optional right now.)

@Racer159
Copy link
Contributor Author

Racer159 commented Nov 2, 2022

You can see this working against this repo:

https://github.com/Racer159/zarf

renovate --token=<your_token> --include-forks true Racer159/zarf --dry-run

image

Also, some notes from this:

This is implemented using the recursive regex strategy so it will match the charts section first, then all of the charts in that section. Also, renovate will ignore certain directories by default (which is why the regex here only detects 3 files with charts and 4 charts in those files) (see: https://docs.renovatebot.com/presets-default/#ignoremodulesandtests)

renovate.json Outdated Show resolved Hide resolved
@Racer159 Racer159 requested a review from YrrepNoj November 2, 2022 18:22
@jeff-mccoy
Copy link
Contributor

What do we think about how this will affect things like the images in a chart? I know it's a problem when rennovate makes an update that has other downstream effects, this seems like one of those uses cases. Basically if someone lets rennovate update, it could make the package broken until someone runs zarf prepare find-images, which of course isn't fullproof either. Thoughts?

@Racer159
Copy link
Contributor Author

Racer159 commented Nov 3, 2022

What do we think about how this will affect things like the images in a chart? I know it's a problem when rennovate makes an update that has other downstream effects, this seems like one of those uses cases. Basically if someone lets rennovate update, it could make the package broken until someone runs zarf prepare find-images, which of course isn't fullproof either. Thoughts?

I can definitely see that being a potential issue (especially if we unleashed this on something like the minio example package that has no tests), but right now this is limited to the packages/ directory and the three packages with charts that it sees all have tests that would fail with ErrImagePullBackoff as soon as Renovate makes its PR if the image(s) changed (which would prevent the merge).

Also currently only @jeff-mccoy @YrrepNoj @Racer159 @JasonvanBrackel have access to make updates to approve changes to packages/ which should cut down on the risk of someone else erroneously approving a renovate PR.

The only gotcha I see is that we would need to ensure that any new packages added to packages/ have tests which IMO should be standard practice since packages/ is our signal that these are actually supported vice just being examples/

Would be interested in @YrrepNoj's thoughts as well.

Copy link
Contributor

@jeff-mccoy jeff-mccoy left a comment

Choose a reason for hiding this comment

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

Thanks for the additional PR comments, this will be a really helpful addition for us, lgtm

@jeff-mccoy jeff-mccoy merged commit 1298a60 into master Nov 4, 2022
@jeff-mccoy jeff-mccoy deleted the renovate-zarf-helm-charts branch November 4, 2022 01:57
Noxsios pushed a commit that referenced this pull request Mar 8, 2023
#963)

## Description

This adds a regex manager for looking inside of zarf.yaml files and
pulling out helm charts. This will be useful to know when gitea (or any
other charts we add) are out of date and in need of updating.

## Related Issue

Fixes # N/A

## Type of change

- [X] New feature (non-breaking change which adds functionality)

## Checklist before merging

- [X] (Optional) Changes have been linted locally with
[golangci-lint](https://github.com/golangci/golangci-lint). (NOTE: We
haven't turned on lint checks in the pipeline yet so linting may be hard
if it shows a lot of lint errors in places that weren't touched by
changes. Thus, linting is optional right now.)

Co-authored-by: Megamind <[email protected]>
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.

3 participants