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

bitter-dentist-28132

02/27/2020, 5:51 PM
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

white-balloon-205

02/27/2020, 10:30 PM
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

bitter-dentist-28132

03/01/2020, 12:57 AM
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.
5 Views