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

glamorous-television-20475

10/30/2019, 8:00 PM
Is there any recommendation on handling kustomize with pulumi? I saw https://github.com/pulumi/pulumi-kubernetes/issues/370 which appears to be open but fairly stale. It seems like you could just the
kustomize build
command to generate the final resource yaml and use that with
from pulumi_kubernetes.yaml import ConfigFile
.
g

gorgeous-egg-16927

10/30/2019, 8:06 PM
We don’t (yet) support it natively, but you could generate the YAML yourself and use ConfigFile as you mentioned.
g

glamorous-television-20475

10/30/2019, 8:27 PM
k - ya I just got that working in Python (which I don't really know that well...)
Copy code
with open('generated/my-app-kustomized.yaml', 'w') as f:
    process = subprocess.Popen(['kustomize', 'build', './my-app'], stdout=f)
    process.communicate()

my_app = ConfigFile("my-app", "generated/my-app-kustomized.yaml")
I'm also wanting to build a docker image to the minikube docker registry
I don't know that I have a formulated question for that yet though. I was just getting started at looking at the
@pulumi/docker
stuff
w

white-balloon-205

10/30/2019, 10:20 PM
Should definitely be possible to use
new docker.Image
targeting a minikube-hosted registry. Haven’t tried it myself - but all the options necessary should be exposed there.
g

glamorous-television-20475

10/30/2019, 10:28 PM
minikube docker-env
should list out the stuff needed to target the minikube docker. I feel like there's probably a cleaner way then shellin' out to that though.
future @white-balloon-205 - I know in my previous question I referenced the library in the TypeScript but I'm actually trying to do it in Python right now. I see
RemoteImage
but not
Image
. Will you tell me if there support for building the container image locally in Python?
w

white-balloon-205

10/31/2019, 12:21 AM
Ahh - the helpers for building and pushing docker images are actually currently only in the JS version. You could still manually do the same - invoking
docker build
and
docker push
from python code. Definitely want to add this support in Python to the library soon as well.
g

glamorous-television-20475

10/31/2019, 6:52 PM
K cool - ya that helps. Keeps me from searching for something that's not there 🙂. Everyone at my work hates JavaScript for some reason so I'm trying to appease them by using Python. I'm really enjoying the documentation, tutorials, crosswalks, guides you guys have. Its seems like JS is the most supported with the others trying to keep up which can cause some confusion. My work has SDKs for several languages so I understand the pain. It might be nice to figure out a way to be more explicit about what is supported in each offered language though. Thanks for your time!