are transformations unable to set `obj.metadata.an...
# kubernetes
b
are transformations unable to set
obj.metadata.annotations
? I'm trying to set the annotations of the aws cluster autoscaler as per https://docs.aws.amazon.com/eks/latest/userguide/cluster-autoscaler.html#ca-deploy, but it seems those annotations never make it to the actual created deployment object. i'm loading from a
yaml.ConfigFile
fwiw
w
I would definitely expect this would work - see examples like https://www.pulumi.com/docs/guides/crosswalk/kubernetes/app-services/#install-nginx. (Not
annotations
in that case, but should behave the same).
Note you may also in the general case also need to actually set
obj.metadata
in case it wasn't already there.
b
Thanks @white-balloon-205, that's definitely what I'm doing and it doesn't work. I know
obj.metadata
exists because when I print it out there's data, but no annotations key. So I set it but it doesn't appear on the eventual object in kubernetes. My other transformations work (changing the command). I tried making at a
pulumi.Output
to see if maybe it had to "wait" for some reason, but that caused some yaml serialization error, so I was wondering if maybe the metadata object was special. Though I guess if you're setting the namespace in that example there, it shouldn't be.