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

[Go SDK] Fix bug with v1/List in YAML parsing #1457

Merged
merged 2 commits into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## HEAD (Unreleased)

- [Go SDK] Fix bug with v1/List in YAML parsing (https://github.com/pulumi/pulumi-kubernetes/pull/1457)
- Fix bug rendering Helm v3 resources that include hooks (https://github.com/pulumi/pulumi-kubernetes/pull/1459)

## 2.7.8 (January 27, 2021)
Expand Down
3 changes: 2 additions & 1 deletion provider/pkg/gen/go-templates/yaml/yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ func parseYamlObject(ctx *pulumi.Context, obj map[string]interface{}, transforma
// for resource definitions that can be managed by Kubernetes, and registers those with the
// engine instead.
switch fullKind {
case {{range $idx, $v := .ListKinds -}} {{if $idx}},
case "v1/List",
{{range $idx, $v := .ListKinds -}} {{if $idx}},
{{end}}"{{$v.GVK}}" {{- end}}:
var resources []resourceTuple
if rawItems, hasItems := obj["items"]; hasItems {
Expand Down
3 changes: 2 additions & 1 deletion sdk/go/kubernetes/yaml/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ func parseYamlObject(ctx *pulumi.Context, obj map[string]interface{}, transforma
// for resource definitions that can be managed by Kubernetes, and registers those with the
// engine instead.
switch fullKind {
case "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList",
case "v1/List",
"admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList",
"admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList",
"admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList",
"admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList",
Expand Down