Skip to content

Conversation

milkshake308
Copy link
Contributor

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 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
Contributor 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
Contributor 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
@koba1t
Copy link
Member

koba1t commented Feb 26, 2025

Hi @milkshake308

Currently, kustomize exec helm binary on the local PC when helmChart used.
I think that depends on local helm version whether that function usable or not.

Could you please find out how long ago that argument was added to the release?

@milkshake308
Copy link
Contributor Author

milkshake308 commented Feb 26, 2025

Hi @milkshake308

Currently, kustomize exec helm binary on the local PC when helmChart used. I think that depends on local helm version whether that function usable or not.

Could you please find out how long ago that argument was added to the release?
Hi,

TL;DR

The --devel flag has been available for helm install, helm templateand helm pull since at least helm v3.0.0, with some early implementations since helm v2.5.0

@koba1t

I manually checked out the repo at the v3.0.0 release and tested the pull and template command to make sure it does not break anything
image
image

The --devel flag seems to have been introduced at release v2.5.0 with commit helm/helm@28ec923 where --devel was introduced as a fix from a previously changed default behavior that was done at release v2.4.0 where development releases where not included by default anymore.

These are all the relevant commits I found that looks to be related to major implementations of the flag :

Hope this helps!

@koba1t
Copy link
Member

koba1t commented Apr 14, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 14, 2025
@koba1t
Copy link
Member

koba1t commented May 17, 2025

So sorry to delay check.

I feel this PR looks like good to me!

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: koba1t, milkshake308

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

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 17, 2025
@koba1t
Copy link
Member

koba1t commented May 17, 2025

/retest

@k8s-ci-robot k8s-ci-robot merged commit 616c084 into kubernetes-sigs:master May 17, 2025
11 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jun 29, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [kubernetes-sigs/kustomize](https://github.com/kubernetes-sigs/kustomize) | minor | `v5.6.0` -> `v5.7.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>kubernetes-sigs/kustomize (kubernetes-sigs/kustomize)</summary>

### [`v5.7.0`](https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize/v5.7.0)

[Compare Source](kubernetes-sigs/kustomize@kustomize/v5.6.0...kustomize/v5.7.0)

#### Feature

kubernetes-sigs/kustomize#5630: Add static value source for replacement
kubernetes-sigs/kustomize#5921: feat: Add images suport for Image Volumes
kubernetes-sigs/kustomize#5771: fix: Allow patches with empty files with multiple newlines or comments
kubernetes-sigs/kustomize#5865: feat(helm): allow the use of devel alias for helmcharts

#### fix

kubernetes-sigs/kustomize#5846: fix: Get version from the BuildInfo.Main.Version if not found in deps and build flag
kubernetes-sigs/kustomize#5859: fix: Don't panic on multiple $patch: delete strategic merge patches in a single patch file
kubernetes-sigs/kustomize#5877: fix: make private one field in replacements transformer struct that had a missing JSON tag

#### Dependencies

[#&#8203;5847](kubernetes-sigs/kustomize#5847): replace deplecated package github.com/google/shlex with github.com/carapace-sh/carapace-shlex
[#&#8203;5873](kubernetes-sigs/kustomize#5873): Bump to github.com/spf13/viper v1.20.0
[#&#8203;5931](kubernetes-sigs/kustomize#5931): Drop usage of forked copies of goyaml.v2 and goyaml.v3

#### chore

kubernetes-sigs/kustomize#5882: Set Git messages to English for TestRemoteLoad\_LocalProtocol
[#&#8203;5934](kubernetes-sigs/kustomize#5934): Update kyaml to v0.20.0
[#&#8203;5935](kubernetes-sigs/kustomize#5935): Update cmd/config to v0.20.0
[#&#8203;5936](kubernetes-sigs/kustomize#5936): Update api to v0.20.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC42Mi4xIiwidXBkYXRlZEluVmVyIjoiNDAuNjIuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. 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. ok-to-test Indicates a non-member PR verified by an org member that 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