-
Notifications
You must be signed in to change notification settings - Fork 15
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
Pin the k8s version in the generated resources for node #121
Conversation
@@ -157,3 +158,14 @@ func appendFile(t *testing.T, filename, content string) { | |||
|
|||
_, err = f.WriteString(content) | |||
} | |||
|
|||
func runRequireNoError(t *testing.T, cmd *exec.Cmd) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you could also use https://pkg.go.dev/os/exec#Cmd.CombinedOutput to do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks, I was looking for that, but didn't see it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit, but otherwise LGTM.
This PR has been shipped in release v1.4.0. |
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