https://pulumi.com logo
#python
Title
s

stocky-spoon-28903

11/22/2019, 9:53 AM
Usually this is possible by specifying the name explicitly in options, but Iā€™m not sure about Kubernetes
w

white-balloon-205

11/22/2019, 3:52 PM
Yes - specifying
metadata.name
explicitly (as you would in YAML) will let you provide a specific physical name for the namespace.
a

alert-monitor-28534

11/25/2019, 4:16 PM
@white-balloon-205 Thanks, finally I got it with
ns = Namespace("rook-ceph", metadata={"name": "rook-ceph"})
But now my
pulumi up
only creates the namespace and chart doesn't seem to do anything šŸ˜ž
Copy code
+ pulumi:pulumi:Stack: (create)
    [urn=urn:pulumi:lab-dev::shadowkeep::pulumi:pulumi:Stack::shadowkeep-lab-dev]
    + kubernetes:<http://helm.sh/v2:Chart|helm.sh/v2:Chart>: (create)
        [urn=urn:pulumi:lab-dev::shadowkeep::kubernetes:<http://helm.sh/v2:Chart::rook-ceph|helm.sh/v2:Chart::rook-ceph>]
    + kubernetes:core/v1:Namespace: (create)
        [urn=urn:pulumi:lab-dev::shadowkeep::kubernetes:core/v1:Namespace::rook-ceph]
        [provider=urn:pulumi:lab-dev::shadowkeep::pulumi:providers:kubernetes::default_1_3_1::04da6b54-80e4-46f7-96ec-b56ff0331ba9]
        apiVersion: "v1"
        kind      : "Namespace"
        metadata  : {
            labels: {
                <http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: "pulumi"
            }
            name  : "rook-ceph"
        }
Well well, somehow my Helm repo was lost, would've been nice if Pulumi told me so:
Copy code
$ helm template rook-release/rook-ceph
Error: failed to download "rook-release/rook-ceph" (hint: running `helm repo update` may help)
Helm repo was missing since Snap has updated my Helm to version 3 at some point, now as I rolled back to version 2 it works.
w

white-balloon-205

11/26/2019, 3:32 PM
Did Pulumi not report any error? It definitely should report back the failure of the
helm template
command. If you can reproduce it not doing so - please do open an issue.
a

alert-monitor-28534

11/29/2019, 9:16 AM
I was just getting logs of this case when I noticed that I had
sys.exit(0)
in the main script, removing that caused Pulumi to report issues with the chart šŸ™‚