Adopt breaking change in Helm chart API
Adapt to changes in v0.18.0 from
MODIFY
azure-ts-aks-helm/index.ts
azure-ts-aks-helm/index.ts
@@ -17,6 +17,6 @@ const apache = new helm.v2.Chart(
export let cluster = k8sCluster.name;
export let kubeConfig = k8sCluster.kubeConfigRaw;
export let serviceIP = apache
- .getResource("v1/Service", "apache-apache")
- .status.apply(status => status.loadBalancer.ingress[0].ip);
+ .getResourceProperty("v1/Service", "apache-apache", "status")
+ .apply(status => status.loadBalancer.ingress[0].ip);

MODIFY
azure-ts-aks-mean/index.ts
azure-ts-aks-mean/index.ts
@@ -55,5 +55,5 @@ const node = new k8s.helm.v2.Chart(
export const kubeconfig = k8sCluster.kubeConfig;
export const cluster = k8sCluster.name;
export const frontendAddress = node
- .getResource("v1/Service", "node-node")
- .status.apply(status => status.loadBalancer.ingress[0].ip);
+ .getResourceProperty("v1/Service", "node-node", "status")
+ .apply(status => status.loadBalancer.ingress[0].ip);

MODIFY
kubernetes-ts-helm-wordpress/index.ts
kubernetes-ts-helm-wordpress/index.ts
@@ -16,5 +16,5 @@ const wordpress = new k8s.helm.v2.Chart("wpdev", {
});
// Export the public IP for Wordpress.
-const frontend = wordpress.getResource("v1/Service", "wpdev-wordpress");
-export const frontendIp = frontend.status.apply(status => status.loadBalancer.ingress[0].ip);
+const frontend = wordpress.getResourceProperty("v1/Service", "wpdev-wordpress", "status");
+export const frontendIp = frontend.apply(status => status.loadBalancer.ingress[0].ip);

MODIFY
kubernetes-ts-helm-wordpress/package.json
kubernetes-ts-helm-wordpress/package.json
"@types/node": "latest"
},
"dependencies": {
- "@pulumi/pulumi": "^0.15.0",
- "@pulumi/kubernetes": "^0.16.0"
+ "@pulumi/pulumi": "^0.16.7",
+ "@pulumi/kubernetes": "^0.18.0"
}
}

MODIFY
kubernetes-ts-staged-rollout-with-prometheus/util.ts
kubernetes-ts-staged-rollout-with-prometheus/util.ts
@@ -4,6 +4,7 @@ import * as pulumi from "@pulumi/pulumi";
import * as k8s from "@pulumi/kubernetes";
import * as http from "http";
import { spawn } from "child_process";
+import { meta } from "@pulumi/kubernetes/types/input";
export interface PromPortForwardOpts {
localPort: number;
@@ -19,15 +20,15 @@ export interface PromPortForwardOpts {
// This is useful for when we can't run Pulumi in-cluster, in which case simply calling to the
// appropriate KubeDNS URL is not sufficient.
export function forwardPrometheusService(
- service: k8s.core.v1.Service,
- deployment: k8s.extensions.v1beta1.Deployment,
+ service: pulumi.Input<k8s.core.v1.Service>,
+ deployment: pulumi.Input<k8s.extensions.v1beta1.Deployment>,
opts: PromPortForwardOpts
): pulumi.Output<() => void> {
if (pulumi.runtime.isDryRun()) {
return pulumi.output(() => {});
}
- return pulumi.all([service.metadata, deployment.urn]).apply(([meta]) => {
+ return pulumi.all([service, deployment]).apply(([s, d]) => pulumi.all([s.metadata, d.urn])).apply(([meta]) => {
return new Promise<() => void>((resolve, reject) => {
const forwarderHandle = spawn("kubectl", [
"port-forward",
@@ -182,7 +183,7 @@ function getHttpLatency(url: string): Promise<string> {
// Append to the body until the end.
const body: string[] = [];
- response.on("data", chunk => body.push(chunk));
+ response.on("data", chunk => body.push(chunk.toString()));
response.on("end", () => resolve(body.join("")));
});

Adopt breaking change in Helm chart API (#194)

Adapt to changes in v0.18.0 from https://github.com/pulumi/pulumi-kubernetes/pull/241.