Skip to content

Commit

Permalink
Fix regression in TypeScript YAML SDK (#1157)
Browse files Browse the repository at this point in the history
Added back support for v1/List in YAML SDK. This
was inadvertantly removed when converting over to
schema-based code generation.
  • Loading branch information
lblackstone authored Jun 11, 2020
1 parent f85bc7e commit 71a610a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## HEAD (Unreleased)

### Bug Fixes

- Fix regression in TypeScript YAML SDK (https://github.com/pulumi/pulumi-kubernetes/pull/1157)

## 2.3.0 (June 9, 2020)

### Improvements
Expand Down
5 changes: 3 additions & 2 deletions provider/pkg/gen/nodejs-templates/yaml/yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,9 @@ export class ConfigFile extends CollectionComponentResource {
// for resource definitions that can be managed by Kubernetes, and registers those with the
// engine instead.
if (
{{range $idx, $v := .ListKinds -}} {{if $idx}}
|| {{else}} {{end}}(gvk === "{{$v.GVK}}")
(gvk === "v1/List")
{{- range .ListKinds}}
|| (gvk === "{{.GVK}}")
{{- end}}
) {
const objs = [];
Expand Down
3 changes: 2 additions & 1 deletion sdk/nodejs/yaml/yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2548,7 +2548,8 @@ export class ConfigFile extends CollectionComponentResource {
// for resource definitions that can be managed by Kubernetes, and registers those with the
// engine instead.
if (
(gvk === "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList")
(gvk === "v1/List")
|| (gvk === "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList")
|| (gvk === "admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList")
|| (gvk === "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList")
|| (gvk === "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList")
Expand Down

0 comments on commit 71a610a

Please sign in to comment.