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

thousands-planet-11416

05/13/2020, 12:37 PM
Hello all! Quick question about pulumi with kubernetes and best practices. If I use pulumi to create a pod in Kubernetes, but also have a service-mesh that is auto-injecting pods, how would I inherit that auto-generated pod in pulumi on creation?
b

better-rainbow-14549

05/13/2020, 1:56 PM
i've never done it, but you may be able to create a pod definition that matches the one that will be created automatically and use the 'import' function so that it becomes an adopted part of the stack
but unless you know the precise definition of it pulumi will try and update it in future runs so that it matches its understanding of what it should look like
but if you just want to be able to reference the automatic pod and read properties out of it, you can use the getter methods
t

thousands-planet-11416

05/13/2020, 2:11 PM
Yeah. I am guessing its not built in as a single run and sounds like it requires a couple of runs, with manual importing.
b

billowy-army-68599

05/13/2020, 3:22 PM
@thousands-planet-11416 for resources that have injectors, you might have better luck using `ignoreChanges on the provider and letting the service mesh managed those fields https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges