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

busy-pizza-73563

02/26/2019, 5:47 PM
Hey! I think pulumi updated somehow (does it have automatic updates?), and now it wants to add
<http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: "pulumi"
label to all my k8s resources (probably because of https://github.com/pulumi/pulumi-kubernetes/commit/f23736ef49b83864a518e8c34135a466ca1f1588). Is there a way to opt-out?
g

gorgeous-egg-16927

02/26/2019, 6:07 PM
@busy-pizza-73563 Pulumi doesn’t automatically update, but you likely have
@pulumi/kubernetes
set to
latest
in your
package.json
if you’re seeing different behavior now.
There’s currently no way to opt out of that label for any resources created by pulumi. Curious why you want/need that?
b

busy-pizza-73563

02/26/2019, 6:24 PM
I didn't want to update all my deployments / daemonsets, as that would recreate all child pods, afaik.
I also think I found the "issue" - the older project had
@pulumi/kubernetes
0.20.1, and meanwhile I created another one, which installed 0.20.3, and added the newer plugin version in
~/.pulumi/plugins
. So I was running
pulumi
in the older project, but it was using the newer version of the plugin.
g

gorgeous-egg-16927

02/26/2019, 6:43 PM
Adding that label shouldn’t affect running workloads. You can check the preview diff to see what changes are expected.
pulumi preview --diff
FWIW, here’s a link to the relevant docs on recommended labels: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels
b

busy-pizza-73563

02/26/2019, 6:51 PM
Are you sure? I know for sure that changing annotations recreates child pods, so I somehow thought changing labels has the same effect.
g

gorgeous-egg-16927

02/26/2019, 6:55 PM
AFAIK, both annotations and labels in general are just metadata that you can change without further effect. There are cases where a controller acts on a specific label/annotation, e.g., updating Ingress settings, but that’s not the usual case. Would be very interested to see it if you have a counter example.
b

busy-pizza-73563

02/26/2019, 6:58 PM
Yeah, sorry, I used annotations in the past (using helm 🙂 ) to restart pods in a deployment when a configmap changes, but it was actually
.spec.template.annotations
.
So I was under the wrong impression that changing annotations on a deployment also updates the pods.
Thanks for clearing that up! 🙂
g

gorgeous-egg-16927

02/26/2019, 7:03 PM
Great! You had me a little worried there for a second, and I had to double-check to make sure I wasn’t crazy 😛
b

busy-pizza-73563

02/26/2019, 7:04 PM
Btw, thanks for this amazing tool, it's everything I ever needed to manage kubernetes - especially that I come from a JS/TS background! 😄
🎉 1