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(helm): allow the use of devel alias for helmcharts #5865

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

milkshake308
Copy link

Hello,
This pull request adds support for an explicit devel option in helmCharts definitions within kustomization.yaml. This allows users to enable Helm's --devel flag directly, facilitating the use of development releases without relying on implicit version constraints.

Previously, one had to work around this limitation by specifying a version constraint like ">0.0.0-0", which was functionally equivalent to --devel. For example:

helmCharts:
- name: sm-operator
  releaseName: sm-operator
  namespace: bitwarden
  repo: https://charts.bitwarden.com/
  valuesFile: bitwarden-sm-op-values.yaml
  version: ">0.0.0-0" # equivalent for "--devel"

With this PR, users can explicitly enable development releases using the devel field:

helmCharts:
- name: sm-operator
  releaseName: sm-operator
  namespace: bitwarden
  repo: https://charts.bitwarden.com/
  valuesFile: bitwarden-sm-op-values.yaml
  version: "0.1.0-Beta"
  devel: true

Copy link

linux-foundation-easycla bot commented Feb 17, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Feb 17, 2025
@k8s-ci-robot
Copy link
Contributor

Welcome @milkshake308!

It looks like this is your first PR to kubernetes-sigs/kustomize 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kustomize has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @milkshake308. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 17, 2025
Copy link
Member

@stormqueen1990 stormqueen1990 left a comment

Choose a reason for hiding this comment

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

Hello there, @milkshake308! Thank you very much for your PR!

Could you please add a few test cases to this implementation, demonstrating that the new flag will be added only when your new option devel is specified? I'm thinking something similar to how tests were implemented in #5751 for plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go and api/types/helmchartargs.go.

Please let me know if you have any questions!

@stormqueen1990
Copy link
Member

/test all

@k8s-ci-robot
Copy link
Contributor

This PR has multiple commits, and the default merge method is: merge.
You can request commits to be squashed using the label: tide/merge-method-squash

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: milkshake308

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 21, 2025
@milkshake308
Copy link
Author

milkshake308 commented Feb 21, 2025

Hi @stormqueen1990
I had some unfortunate issues trying to make a test case that assert argument presence with HelmChartInflationGenerator_test.go (due to the fact that I was not able to make delve work with it);
However since the conditionnal that add the arg for helm pullCommand was identical to the AsHelmArgs I figured that the assertion could be added instead to helmchartargs_test.go to assert with AsHelmArgs
Does this approach align with what you were expecting?

@stormqueen1990
Copy link
Member

Hi @stormqueen1990 I had some unfortunate issues trying to make a test case that assert argument presence with HelmChartInflationGenerator_test.go (due to the fact that I was not able to make delve work with it); However since the conditionnal that add the arg for helm pullCommand was identical to the AsHelmArgs I figured that the assertion could be added instead to helmchartargs_test.go to assert with AsHelmArgs Does this approach align with what you were expecting?

Hi there, @milkshake308! The test cases you added make sense to me. Thanks for working on that!

/test all

Copy link
Member

@stormqueen1990 stormqueen1990 left a comment

Choose a reason for hiding this comment

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

/lgtm

/assign @koba1t
for maintainer review

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 23, 2025
@stormqueen1990
Copy link
Member

stormqueen1990 commented Feb 23, 2025

@milkshake308: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

@milkshake308 it looks like one of the tests didn't pass in Prow (Helm couldn't find the development version 0.1.0-Beta for chart test-chart). I think you intended to use chart sm-operator, so maybe the fields are mixed up?

You can check the logs from Prow through the kustomize-presubmit-master job link in the checks section below.

/remove-lgtm

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 23, 2025
@milkshake308
Copy link
Author

milkshake308 commented Feb 23, 2025

Indeed I did not named the chart correctly, I assumed these were placeholder values.
I pushed a fix that use a real chart requiring the "developpement release" and fix the value assertion
/retest

@k8s-ci-robot
Copy link
Contributor

@milkshake308: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

I did not named the chart correctly, I assumed these were placeholder values.
I pushed a fix that use a real chart requiring that is in "developpement release" and fix the value assertion
/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@stormqueen1990
Copy link
Member

/retest

Copy link
Member

@stormqueen1990 stormqueen1990 left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants