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

Update NodeJS Helm v3 to use native client #1279

Merged
merged 4 commits into from
Sep 1, 2020
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
Expand Up @@ -5,6 +5,7 @@
- Upgrade to Pulumi v2.9.0, which adds type annotations and input/output classes to Python (https://github.com/pulumi/pulumi-kubernetes/pull/1276)
- Switch Helm v3 logic to use native library. (https://github.com/pulumi/pulumi-kubernetes/pull/1263)
- Bump python requests version dependency. (https://github.com/pulumi/pulumi-kubernetes/pull/1274)
- Update NodeJS Helm v3 to use native client. (https://github.com/pulumi/pulumi-kubernetes/pull/1279)

## 2.5.0 (August 26, 2020)

Expand Down
2 changes: 1 addition & 1 deletion provider/cmd/pulumi-gen-kubernetes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func writeNodeJSClient(pkg *schema.Package, outdir, templateDir string) {
overlays := map[string][]byte{
"apiextensions/customResource.ts": mustLoadFile(filepath.Join(templateDir, "apiextensions", "customResource.ts")),
"helm/v2/helm.ts": mustLoadFile(filepath.Join(templateDir, "helm", "v2", "helm.ts")),
"helm/v3/helm.ts": mustLoadFile(filepath.Join(templateDir, "helm", "v2", "helm.ts")), // v3 support is currently identical to v2
"helm/v3/helm.ts": mustLoadFile(filepath.Join(templateDir, "helm", "v3", "helm.ts")),
"kustomize/kustomize.ts": mustLoadFile(filepath.Join(templateDir, "kustomize", "kustomize.ts")),
"yaml/yaml.ts": mustRenderTemplate(filepath.Join(templateDir, "yaml", "yaml.tmpl"), templateResources),
}
Expand Down
20 changes: 9 additions & 11 deletions provider/pkg/gen/nodejs-templates/helm/v2/helm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import * as yaml from "../../yaml/index";
* ```typescript
* import * as k8s from "@pulumi/kubernetes";
*
* const nginxIngress = new k8s.helm.v3.Chart("nginx-ingress", {
* const nginxIngress = new k8s.helm.v2.Chart("nginx-ingress", {
* path: "./nginx-ingress",
* });
* ```
Expand All @@ -52,7 +52,7 @@ import * as yaml from "../../yaml/index";
* ```typescript
* import * as k8s from "@pulumi/kubernetes";
*
* const nginxIngress = new k8s.helm.v3.Chart("nginx-ingress", {
* const nginxIngress = new k8s.helm.v2.Chart("nginx-ingress", {
* chart: "nginx-ingress",
* version: "1.24.4",
* fetchOpts:{
Expand All @@ -65,7 +65,7 @@ import * as yaml from "../../yaml/index";
* ```typescript
* import * as k8s from "@pulumi/kubernetes";
*
* const nginxIngress = new k8s.helm.v3.Chart("nginx-ingress", {
* const nginxIngress = new k8s.helm.v2.Chart("nginx-ingress", {
* chart: "nginx-ingress",
* version: "1.24.4",
* fetchOpts:{
Expand All @@ -85,7 +85,7 @@ import * as yaml from "../../yaml/index";
* ```typescript
* import * as k8s from "@pulumi/kubernetes";
*
* const nginxIngress = new k8s.helm.v3.Chart("nginx-ingress", {
* const nginxIngress = new k8s.helm.v2.Chart("nginx-ingress", {
* chart: "nginx-ingress",
* version: "1.24.4",
* namespace: "test-namespace",
Expand All @@ -99,7 +99,7 @@ import * as yaml from "../../yaml/index";
* ```typescript
* import * as k8s from "@pulumi/kubernetes";
*
* const nginxIngress = new k8s.helm.v3.Chart("nginx-ingress", {
* const nginxIngress = new k8s.helm.v2.Chart("nginx-ingress", {
* chart: "nginx-ingress",
* version: "1.24.4",
* fetchOpts:{
Expand Down Expand Up @@ -204,12 +204,10 @@ export class Chart extends yaml.CollectionComponentResource {
const release = shell.quote([releaseName]);
const values = path.quotePath(overrides.name);
const apiVersionsArgs = cfg.apiVersions
? cfg.apiVersions.length > 1
? `--api-versions={${cfg.apiVersions
.map(apiVersion => shell.quote([apiVersion]))
.join(',')}}`
: `--api-versions=${shell.quote(cfg.apiVersions)}`
: '';
? cfg.apiVersions
.map(v => `--api-versions=${v}`)
.join(" ")
: "";
const namespaceArg = cfg.namespace
? `--namespace ${shell.quote([cfg.namespace])}`
: "";
Expand Down
Loading