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(manager/flux): support chartRef in HelmRelease resources #31962

Open
wants to merge 189 commits into
base: main
Choose a base branch
from

Conversation

ssams
Copy link

@ssams ssams commented Oct 15, 2024

Changes

Adds support for chartRef fields within HelmRelease resources in the flux manager, as described in #31945.

Context

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 select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

lib/modules/manager/flux/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/flux/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/flux/extract.ts Outdated Show resolved Hide resolved
@ssams ssams requested a review from viceice October 16, 2024 07:39
lib/modules/manager/flux/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/flux/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/flux/common.ts Outdated Show resolved Hide resolved
lib/modules/manager/flux/extract.spec.ts Outdated Show resolved Hide resolved
@viceice
Copy link
Member

viceice commented Nov 5, 2024

conflicted

@ssams ssams requested a review from viceice November 14, 2024 07:54
lib/modules/manager/flux/common.ts Outdated Show resolved Hide resolved
renovate bot and others added 12 commits December 2, 2024 12:13
…renovatebot#32532)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <[email protected]>
…#32538)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ot#32541)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…renovatebot#32548)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…enovatebot#32554)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#32553)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…renovatebot#32557)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot and others added 23 commits December 2, 2024 12:13
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…enovatebot#32816)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…2820)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…v13.0.23 (renovatebot#32824)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovatebot#32826)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovatebot#32827)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…32831)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…novatebot#32837)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@ssams
Copy link
Author

ssams commented Dec 2, 2024

unfortunately a lot of commits were introduced accidentally on this branch when merging with main somehow, but as far as I understand that shouldn't be a problem as you'll squash this anyway when merging? at least wanted to avoid force committing to remove them for now as described in the contrib guide, let me know if you need any changes to clean that up. the diff itself is clean though.

@ssams ssams requested a review from viceice December 2, 2024 11:21
lib/modules/manager/flux/common.ts Outdated Show resolved Hide resolved
@@ -102,6 +106,39 @@ function resolveGitRepositoryPerSourceTag(
}
}

function resolveHelmRepository(
Copy link
Member

Choose a reason for hiding this comment

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

same, extract to refactor pr. can combined with comment above

Copy link
Author

Choose a reason for hiding this comment

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

sorry, but I cannot really follow this. the extracted code in this function is literally identical to what was previously within the switch statement, and I need the exact same logic in the new case (as it's just about resolving the details of the referenced repository, properly supporting OCI repos etc). If I don't extract this into a function, I'd have to duplicate the whole block, copy+paste it down into the new case. which causes test coverage to decrease, and forcing the addition (and duplication) of test cases just to test the same code again in the other context - and to remove all of these additional tests again right afterwards in yet another PR too? that doesn't make sense.

I've removed the other refactoring as requested though, as that was in a part that is now mostly unchanged again after working on the various topics. but I really don't see how the second one here could be avoided without creating more questionable quality issues.

@ssams ssams requested a review from viceice December 20, 2024 08:04
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.