You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import*ask8sfrom"@pulumi/kubernetes";constnginx=newk8s.helm.v2.Chart("simple-nginx",{// Represents chart `stable/nginx-lego@v0.3.1`.repo: "stable",chart: "nginx-lego",version: "0.3.1",values: {// Override for the Chart's `values.yml` file. Use `null` to zero out resource requests so it// can be scheduled on our (wimpy) CI cluster. (Setting these values to `null` is the "normal"// way to delete values.)nginx: {resources: null},default: {resources: null},lego: {resources: null}},});// Export the (cluster-private) IP address of the Guestbook frontend.exportconstfrontendClusterIp=nginx.getResourceProperty("v1/Service","default","simple-nginx-nginx-lego","spec").apply(spec=>spec.clusterIP);
produces the following error:
error: TypeError: Cannot read property 'spec' of undefined
at getResourceImpl.apply.r (/opt/pulumi/node_modules/@pulumi/kubernetes/provider.js:70:30)
at Output.<anonymous> (/opt/pulumi/node_modules/@pulumi/kubernetes/node_modules/@pulumi/pulumi/resource.js:277:47)
at next (native)
at /opt/pulumi/node_modules/@pulumi/kubernetes/node_modules/@pulumi/pulumi/resource.js:20:71
at __awaiter (/opt/pulumi/node_modules/@pulumi/kubernetes/node_modules/@pulumi/pulumi/resource.js:16:12)
at promise.then (/opt/pulumi/node_modules/@pulumi/kubernetes/node_modules/@pulumi/pulumi/resource.js:264:62)
error: an unhandled error occurred: Program exited with non-zero exit code: 1
2019/02/12 11:14:42 Warning: Merging destination map for chart 'nginx-lego'. Cannot overwrite table item 'resources', with non table value: map[requests:map[cpu:1 memory:128Mi] limits:map[cpu:1 memory:2Gi]]
2019/02/12 11:14:42 Warning: Merging destination map for chart 'nginx-lego'. Cannot overwrite table item 'resources', with non table value: map[limits:map[cpu:1 memory:2Gi] requests:map[cpu:1 memory:128Mi]]
2019/02/12 11:14:42 Warning: Merging destination map for chart 'nginx-lego'. Cannot overwrite table item 'resources', with non table value: map[limits:map[cpu:1 memory:2Gi] requests:map[cpu:1 memory:128Mi]]
TypeError: Cannot read property 'spec' of undefined
at getResourceImpl.apply.r (/opt/pulumi/node_modules/@pulumi/kubernetes/provider.js:70:30)
at Output.<anonymous> (/opt/pulumi/node_modules/@pulumi/kubernetes/node_modules/@pulumi/pulumi/resource.js:277:47)
at next (native)
at /opt/pulumi/node_modules/@pulumi/kubernetes/node_modules/@pulumi/pulumi/resource.js:20:71
at __awaiter (/opt/pulumi/node_modules/@pulumi/kubernetes/node_modules/@pulumi/pulumi/resource.js:16:12)
at promise.then (/opt/pulumi/node_modules/@pulumi/kubernetes/node_modules/@pulumi/pulumi/resource.js:264:62)
TypeError: Cannot read property 'spec' of undefined
at getResourceImpl.apply.r (/opt/pulumi/node_modules/@pulumi/kubernetes/provider.js:70:30)
at Output.<anonymous> (/opt/pulumi/node_modules/@pulumi/kubernetes/node_modules/@pulumi/pulumi/resource.js:277:47)
at next (native)
at /opt/pulumi/node_modules/@pulumi/kubernetes/node_modules/@pulumi/pulumi/resource.js:20:71
at __awaiter (/opt/pulumi/node_modules/@pulumi/kubernetes/node_modules/@pulumi/pulumi/resource.js:16:12)
at promise.then (/opt/pulumi/node_modules/@pulumi/kubernetes/node_modules/@pulumi/pulumi/resource.js:264:62)
Note that namespace was specified as "default". It works if that parameter is omitted.
The text was updated successfully, but these errors were encountered:
This is one of the warts of this API, I'm not sure how to fix it from the SDK alone. The basic problem is that we don't know whether a resource is missing a namespace, or the resource is not namespaced at all. And we can't, unless we talk to the provider, which understands the OpenAPI spec.
So there is some sense in which this is desired behavior. I'd love to fix it, but I'm not sure how we'd do it.
produces the following error:
Note that namespace was specified as "default". It works if that parameter is omitted.
The text was updated successfully, but these errors were encountered: