did anyone install nginx-ingress in pulumi ? I'm l...
# kubernetes
b
did anyone install nginx-ingress in pulumi ? I'm looking at examples but it might be someone did already this before me
b
yeah i have
b
I've found this: https://www.pulumi.com/docs/guides/crosswalk/kubernetes/apps/#deploy-a-helm-chart but man, I miss simplicity of
helm install
I'm not managing to convert this to python
b
i'd use the helm chart yeah
i rewrote it in pulumi but mainly because i wanted to learn pulumi at the time
not sure about python soryr, i use typescript version
b
what are you struggling with? I've done this with typescript but can quickly throw a python example together if you need?
b
well mainly, why do we need
transformations
and how to convert it to python...
b
you dont need that, its an example of if you wanted to put it in a different namespace thats all
in the real world you'd configure that normally by specifying the helm chart values for the namespace options, but transformations lets you do things which arent supported by the helm chart values
b
as @better-rainbow-14549 says, transformations are optional. They are extremely useful in situations where your helm chart doesn't have a configuration option in the
values.yaml
. I use them often for things like charts that don't support podsecurity policies
b
I'm having even more basic problems...
Copy code
import pulumi_kubernetes
pulumi_kubernetes.helm.v3.Chart('nginx', config={}
has error
AttributeError: module 'pulumi_kubernetes' has no attribute 'helm
but according to the docs it has https://www.pulumi.com/docs/reference/pkg/python/pulumi_kubernetes/helm/v3/
ok, time to get hands dirty I guess 😞
ahhh... I MUST import it first, can't use it directly 😞
from pulumi_kubernetes.helm import v3
and even after this it's not that easy as in TS 😞 I probably miss examples how to use helm in python
b
I thought we had an example in our examples repo, but you're right! We don't. I've cut this issue to get that fixed https://github.com/pulumi/examples/issues/671
b
hmmm, I can make some draft that might help...
Copy code
nginx = Chart('nginx', config=ChartOpts(
    repo='stable',
    chart='nginx-ingress',
    version='0.30.0',
    namespace=b81_namespace.metadata['name']
), opts=ResourceOptions(provider=k8s_provider))
in case you'll need it...
just...
helm list
does not see it anymore but I can leave without it
and it can't recognize the
Deployment
so pulumi tries to apply it each time when i run
pulumi up
... hmmm
I don't want to spam but,
helm list
should not work anyway because it's managed by pulumi (althought it would be cool if to use help list) Another thing that I've learn is that I must have helm on my machine + configured
helm repo add stable <https://kubernetes-charts.storage.googleapis.com>