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

Add support for setting kube version on data.helm_template. #985

Merged
merged 4 commits into from
Dec 6, 2022
Merged

Add support for setting kube version on data.helm_template. #985

merged 4 commits into from
Dec 6, 2022

Conversation

nuttmeister
Copy link
Contributor

@nuttmeister nuttmeister commented Nov 4, 2022

Description

When using the helm_template data source on a template that has kube version constraints it will fail with an error (unless v1.20.0) is within that range.

Error: chart requires kubeVersion: >=1.22.0-0 which is incompatible with Kubernetes v1.20.0

So this PR adds the ability to set the kube-version, much like you can with helm template --kube-version.

Usage

data "helm_template" "example" {
  name         = "example"
  namespace    = "default"
  repository   = "https://example.com/repo"
  chart        = "example"
  kube_version = "1.22"
}

Acceptance tests

Be able to template where templates require k8s versions > 1.20.0.

Release Note

Release note for CHANGELOG:

Ability to specify kube-version when using data source template.

References

Fix: #994

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

@github-actions github-actions bot added the size/L label Nov 4, 2022
@nuttmeister nuttmeister changed the title Add support for setting kube version on data.template. Add support for setting kube version on data.helm_template. Nov 4, 2022
@nuttmeister
Copy link
Contributor Author

Can see that there already is an open PR for this. Apparently my searching skills today was so-so. #917 .

@BBBmau
Copy link
Contributor

BBBmau commented Nov 30, 2022

@nuttmeister Hello! Thank you for opening this PR. It all looks great, only thing missing is the documentation for the kube_version attribute that's new to the data_template resource.

Once the documentation is added we should be able to merge it.

@nuttmeister
Copy link
Contributor Author

nuttmeister commented Dec 1, 2022

@BBBmau thanks. I will add it later today.

@nuttmeister nuttmeister requested a review from a team as a code owner December 1, 2022 08:52
@nuttmeister
Copy link
Contributor Author

@BBBmau hope this is enough docs wise, let me know if more is needed.

@laupow
Copy link

laupow commented Dec 1, 2022

@nuttmeister appreciate this PR, looking for that functionality too

@BBBmau
Copy link
Contributor

BBBmau commented Dec 2, 2022

@BBBmau hope this is enough docs wise, let me know if more is needed.

Thanks for adding the docs! Could you use the description from the helm godoc? Gives a bit of a better description of the kubeversion type

https://github.com/helm/helm/blob/v3.10.2/pkg/action/install.go#L92-L94

@nuttmeister
Copy link
Contributor Author

@BBBmau does it look better now? The reason why I phrased it the way I did was for it to be in line with the docs/comments on APIVersions specifically. Perhaps it would be good to update the docs for APIVersions as well?

@BBBmau BBBmau merged commit 74b48cb into hashicorp:main Dec 6, 2022
@BBBmau
Copy link
Contributor

BBBmau commented Dec 6, 2022

@nuttmeister Thanks again for your contribution!

@nuttmeister nuttmeister deleted the data-template-add-kube-version branch December 7, 2022 03:19
@github-actions
Copy link

github-actions bot commented Jan 7, 2023

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

helm_template data source does not provide option to set kube version
4 participants