Skip to content

Commit

Permalink
Use resourcePrefix on all code paths (#977)
Browse files Browse the repository at this point in the history
One code path in yaml.ts inadvertently omitted the resourcePrefix.
Helm support recently started using this code path, so this fix
affects both Helm and YAML support.
  • Loading branch information
lblackstone authored Feb 4, 2020
1 parent d48dff0 commit eaa14be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Bug fixes

- Fix hang on large YAML files. (https://github.com/pulumi/pulumi-kubernetes/pull/974).
- Use resourcePrefix all code paths. (https://github.com/pulumi/pulumi-kubernetes/pull/977).

## 1.4.5 (January 22, 2020)

Expand Down
6 changes: 5 additions & 1 deletion pkg/gen/nodejs-templates/yaml.ts.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ import * as outputs from "../types/output";

if (config.objs !== undefined) {
const objs: Promise<any[]> = Array.isArray(config.objs) ? Promise.resolve(config.objs) : Promise.resolve([config.objs]);
const docResources = parseYamlDocument({objs, transformations: config.transformations}, opts);
const docResources = parseYamlDocument({
objs,
transformations: config.transformations,
resourcePrefix: config.resourcePrefix
}, opts);
resources = pulumi.all([resources, docResources]).apply(([rs, drs]) => ({...rs, ...drs}));
}

Expand Down
6 changes: 5 additions & 1 deletion sdk/nodejs/yaml/yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ import * as outputs from "../types/output";

if (config.objs !== undefined) {
const objs: Promise<any[]> = Array.isArray(config.objs) ? Promise.resolve(config.objs) : Promise.resolve([config.objs]);
const docResources = parseYamlDocument({objs, transformations: config.transformations}, opts);
const docResources = parseYamlDocument({
objs,
transformations: config.transformations,
resourcePrefix: config.resourcePrefix
}, opts);
resources = pulumi.all([resources, docResources]).apply(([rs, drs]) => ({...rs, ...drs}));
}

Expand Down

0 comments on commit eaa14be

Please sign in to comment.