joe-elliott / cert-exporter

A Prometheus exporter that publishes cert expirations on disk and in Kubernetes secrets
Apache License 2.0
321 stars 87 forks source link

Helm install doesn't work #53

Closed iamjekyun closed 4 years ago

iamjekyun commented 4 years ago

I am trying to install cert-exporter by helm.

Sure that I added the repo. helm search repo cert-exporter shows the right exporter. After helm repo update and seeing "Successfully got an update from the "cert-exporter" chart repository", helm install fails...

With debug flag, I was able to see that

Error: failed to fetch https://github.com/joe-elliott/cert-exporter/releases/download/cert-exporter-0.1.1/cert-exporter-0.1.1.tgz : 404 Not Found

I think the url should be https://github.com/joe-elliott/cert-exporter/archive/cert-exporter-0.1.1.tar.gz . It's weird...

joe-elliott commented 4 years ago

Oh, it might be because I deleted the release. I honestly didn't like that feature of the helm releaser b/c it took the place of the current "real" release of cert-exporter on the github main page.

@flipstone42 is there anyway to keep your helm chart releaser process from creating an actual github release?

dan-vaughan commented 4 years ago

@joe-elliott - there probably is. I'll have a look into it and get back to you.

iamjekyun commented 4 years ago

I see. But as an end-user, I am eagerly looking forward to it. It would be glad to know when it supports helm chart someday.

dan-vaughan commented 4 years ago

@joe-elliott I'm not sure how GitHub Releases work when it comes to adding multiple artifacts through different actions, but if you give the chart the same version in Chart.yaml, that might work. It would be easy enough to test.

joe-elliott commented 4 years ago

Ha, I suppose that's an option. Will try.

joe-elliott commented 4 years ago

@hagsfdf see if you can install the 2.3.2 chart

iamjekyun commented 4 years ago

Nice! It works. But there's a new emerging error: it produces error in line https://github.com/joe-elliott/cert-exporter/blob/master/helm/cert-exporter/templates/dashboards/dashboard.yml#L391

The error is :

Error: parse error at (cert-exporter/templates/dashboards/dashboard.yml:391): function "kubernetes_pod_name" not defined

Want me to raise a separate issue?

dan-vaughan commented 4 years ago

I'll fix this, not sure how this wasn't caught in my testing.

iamjekyun commented 4 years ago

Good. May I ask the approximate ETA of helm support(stable version,hopefully) ? I want to apply it in my production cluster. So it's kinda important that when it's gonna be in a stable version.

joe-elliott commented 4 years ago

@flipstone42 this is my fault. the dashboard was breaking the hugo parsing when github pages was trying to generate output. It tripped up on this:

https://github.com/joe-elliott/cert-exporter/commit/ae6e14350a5dacb00d5ad6c5e92b37ab2a3a00f2

Unless you want to fight obscure hugo errors with a long feedback loop do you just want to remove {{kubernetes_pod_name}} from that dashboard?

dan-vaughan commented 4 years ago

Thanks for clarifying @joe-elliott. I can't see any Hugo errors in the GitHub Actions logs, could you point me towards them?

joe-elliott commented 4 years ago

It doesn't show up in the github action logs. The github action succeeds but the page never gets published. The error only shows up in the settings and looks something like this:

https://github.com/wowchemy/wowchemy-hugo-modules/issues/959

dan-vaughan commented 4 years ago

Oh man, that's annoying. Let's just leave remove {{kubernetes_pod_name}}.

iamjekyun commented 4 years ago

In fact, I'm perfectly fine with removing grafana functionality b/c you already published grafana json in grafana community dashboard. So it doesn't require helm chart to import the dashboard.

joe-elliott commented 4 years ago

Ok, I'm no helm wizard, but I just did this:

$ helm install cert-exporter/cert-exporter --generate-name
NAME: cert-exporter-1603827667
LAST DEPLOYED: Tue Oct 27 15:41:08 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Cert-Exporter has now been installed, have fun!

@hagsfdf see if things are working for you?

iamjekyun commented 4 years ago

Perfectly works! Thx for your hard work, and selling your own soul!