https://pulumi.com logo
#kubernetes
Title
# kubernetes
a

ancient-megabyte-79588

04/08/2020, 8:32 PM
This does not work
Copy code
export const nginxIngressControllerConfigMap = new k8s.core.v1.ConfigMap("nginx-nginx-ingress-controller", {
    metadata:{
        name: "nginx-nginx-ingress-controller",
        labels: {"k8s-app": "nginx-ingress-controller"},
        namespace:"kube-system"
    },
    data: {
        "proxy-buffer-size": "128k",
        "proxy-buffers": "8 128k"
    }
},{provider: k8sProvider, import: "kube-system/nginx-nginx-ingress-controller"});
g

gorgeous-egg-16927

04/08/2020, 8:37 PM
The
data
field should be base64 encoded. You can use the
stringData
field if you want to pass in a raw string, and it will get encoded server-side.
a

ancient-megabyte-79588

04/08/2020, 8:48 PM
I didn't have to do that on my coredns one to get it to work.
Am I trying this incorrectly?
@gorgeous-egg-16927 any thoughts?
g

gorgeous-egg-16927

04/08/2020, 9:09 PM
Oh, I’m sorry. I just realized you said this was a ConfigMap, not a Secret. Disregard my previous comment
You should be able to tell what the difference is from the detailed diff when you run
pulumi up
. Likely whitespace, or similar, so copy-paste works well to match the fields exactly.
a

ancient-megabyte-79588

04/08/2020, 9:21 PM
That sort of worked on the coredns configMap, it isn't working on this one.
Importing the manifest that I posted above should allow you to try it out. I can't make it work and I'm not sure why Pulumi is saying they aren't the same.
g

gorgeous-egg-16927

04/08/2020, 9:29 PM
You just need to add
annotations: {}
Copy code
metadata:{
        annotations: {},
        name: "nginx-nginx-ingress-controller",
        labels: {"k8s-app": "nginx-ingress-controller"},
        namespace:"kube-system"
    },
Opened https://github.com/pulumi/pulumi-kubernetes/issues/1065 to track this issue. I’m not sure why it’s requiring that.
👍 1
a

ancient-megabyte-79588

04/08/2020, 9:35 PM
My output is not as detailed as yours.
Mine didn't show that annotations: {} were missing in red like yours did
I see it now.. Too much thrashing around from the first missing
annotations: {}
had me and pulumi not comparing the same things
I re-imported my manifest, and cleaned up the pulumi .ts with the
annotations: {}
in it, and it worked as expected. Thank you once again @gorgeous-egg-16927!!
🎉 1
3 Views