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

incalculable-diamond-5088

05/30/2019, 10:56 PM
When trying to deploy
kiam
helm chart, it seems that the TLS certificates are not generated. I checked
helm template .
and it generates them. Does pulumi has its own helm implementation?
c

creamy-potato-29402

05/30/2019, 10:58 PM
no
it uses
helm template
i

incalculable-diamond-5088

05/30/2019, 11:00 PM
Does it use system helm, or downloads its own? Anyway, there’s a problem - the certificate not generated. Do you have any direction to look at?
c

creamy-potato-29402

05/30/2019, 11:00 PM
I’ts hard to say what’s going on without more info. It uses the system helm
there might be a bug here but it’s really hard to see where it would be since we’re literally calling out to
helm template
i

incalculable-diamond-5088

05/30/2019, 11:04 PM
Can I provide any additional info? I can even jump on a call and we can look at it
But I’m generating the template using system helm and it does contain the certificates
c

creamy-potato-29402

05/30/2019, 11:07 PM
does it show up in the preview?
i

incalculable-diamond-5088

05/30/2019, 11:08 PM
nope
c

creamy-potato-29402

05/30/2019, 11:08 PM
can you point me to the helm code you’re using?
i

incalculable-diamond-5088

05/30/2019, 11:08 PM
In preview no data is shown
c

creamy-potato-29402

05/30/2019, 11:08 PM
and the TLS certs are… CRDs?
i

incalculable-diamond-5088

05/30/2019, 11:08 PM
Sure.
Copy code
new k8s.helm.v2.Chart('kiam', {
      chart: 'stable/kiam',
      values: {
        fullnameOverride: 'kiam',
        server: {
          nodeSelector: {
            'nodeGroupName': 'default'
          }
        }
      }
    }, { parent: this })
c

creamy-potato-29402

05/30/2019, 11:09 PM
I mean which helm repository
i

incalculable-diamond-5088

05/30/2019, 11:09 PM
c

creamy-potato-29402

05/30/2019, 11:09 PM
oh I see
so this is captured in the
_helpers
?
is that right?
i

incalculable-diamond-5088

05/30/2019, 11:10 PM
Correct
c

creamy-potato-29402

05/30/2019, 11:10 PM
I see. We will not render that, then.
i

incalculable-diamond-5088

05/30/2019, 11:10 PM
hmmm… but why?
c

creamy-potato-29402

05/30/2019, 11:10 PM
helm template
doesn’t know about helpers!
What does helm do here? generate a file?
you can do this with pulumi though. Something like:
Copy code
kiam.apply(kiam => { [... generate cert here ...] })
you’d have to write the code yourself.
is there a helm CLI command to expand the helpers automatically?
i

incalculable-diamond-5088

05/30/2019, 11:13 PM
Here’s helm template output:
Copy code
---
# Source: kiam/templates/agent-secret.yaml
kind: Secret
apiVersion: v1
metadata:
  name: release-name-kiam-agent
type: Opaque
data:
  ca: LS0tLS1CRUdJTiBDRV...
  cert: LS0tLS1CRUdJTiBDR...
  key: LS0tLS1CRUdJTiBSU0...
It does generate the keys and certs
c

creamy-potato-29402

05/30/2019, 11:13 PM
sorry, I’m confused … so you want it to generate a secret?
I apologize for my lack of experience with this particular chart.
and helm generally.
i

incalculable-diamond-5088

05/30/2019, 11:14 PM
And to prove this, I ran locally
helm template .
on this exact repository - and it generated a K8S secret resource with the certificate from helpers
c

creamy-potato-29402

05/30/2019, 11:15 PM
ok so this doesn’t generate the secret at all, or generates it without any data?
i

incalculable-diamond-5088

05/30/2019, 11:15 PM
While in pulumi, it does generate the secret, but without any data
c

creamy-potato-29402

05/30/2019, 11:17 PM
what happens if you pass the CA file? still empty?
i

incalculable-diamond-5088

05/30/2019, 11:17 PM
If I pass I guess it will work
c

creamy-potato-29402

05/30/2019, 11:18 PM
just want to make sure. sanity check.
i

incalculable-diamond-5088

05/30/2019, 11:18 PM
let me try
Yep, it does create the data:
c

creamy-potato-29402

05/30/2019, 11:20 PM
omg
ok
please file a bug and I will follow up
if you don’t mind.
i

incalculable-diamond-5088

05/30/2019, 11:21 PM
I’m not even sure what to write there and what’s the cause
c

creamy-potato-29402

05/30/2019, 11:21 PM
if you put the code above in and mention that you tried it both with and without the CA file, and include the link to the kiam stuff
I’ll figure it out.
I ask only because I don’t have time to try it myself right now.
on first blush it seems we’re somehow eliding the helpers, but I don’t yet know how.
i

incalculable-diamond-5088

05/30/2019, 11:24 PM
The helpers do work. Most of the helm charts use helpers
c

creamy-potato-29402

05/30/2019, 11:24 PM
yeah I don’t know, I’ll have to dig in, sorry.
i

incalculable-diamond-5088

05/30/2019, 11:56 PM
@creamy-potato-29402 Found the issue. The problem was outdated local helm repo
Sorry for the false alarm
c

creamy-potato-29402

05/30/2019, 11:58 PM
ah
welp 🙂