Pin the k8s version in the generated resources for node#121
Merged
Pin the k8s version in the generated resources for node#121
Conversation
rquitales
reviewed
Dec 15, 2023
rquitales
reviewed
Dec 15, 2023
rquitales
reviewed
Dec 18, 2023
| _, err = f.WriteString(content) | ||
| } | ||
|
|
||
| func runRequireNoError(t *testing.T, cmd *exec.Cmd) { |
Contributor
There was a problem hiding this comment.
nit: you could also use https://pkg.go.dev/os/exec#Cmd.CombinedOutput to do this.
Contributor
Author
There was a problem hiding this comment.
Ah thanks, I was looking for that, but didn't see it!
rquitales
approved these changes
Dec 18, 2023
Contributor
rquitales
left a comment
There was a problem hiding this comment.
Minor nit, but otherwise LGTM.
rquitales
approved these changes
Dec 18, 2023
|
This PR has been shipped in release v1.4.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #28
crd2pulumi uses codegen in a kind of funny way to generate resources that act as resources of the kubernetes resource plugin. This means the resource version needs to match a kubernetes plugin version. Generated resources however, default to the version from the package.json, so if the user attempts to give the generated package a version, the engine starts complaining that it can't find a kubernetes plugin with that version.
This change overrides the generated
getVersion()helper to point to a recent kubernetes release so that the engine can find the plugin even if the user adds a version to the package.json