Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/prometheus-operator] Errors with Helm3 #19452

Closed
shadycuz opened this issue Dec 8, 2019 · 21 comments
Closed

[stable/prometheus-operator] Errors with Helm3 #19452

shadycuz opened this issue Dec 8, 2019 · 21 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@shadycuz
Copy link

shadycuz commented Dec 8, 2019

Describe the bug
When deploying the chart:

shadycuz-> kubectl create namespace monitoring
namespace/monitoring created
[~/repos/shadycuz/kube_monitoring]
shadycuz-> helm upgrade -i --namespace monitoring -f values.yml monitoring stable/prometheus-operator --version 8.3.3
Release "monitoring" does not exist. Installing it now.
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
NAME: monitoring
LAST DEPLOYED: Sun Dec  8 15:35:40 2019
NAMESPACE: monitoring
STATUS: deployed
REVISION: 1
NOTES:
The Prometheus Operator has been installed. Check its status by running:
  kubectl --namespace monitoring get pods -l "release=monitoring"

Visit https://github.com/coreos/prometheus-operator for instructions on how
to create & configure Alertmanager and Prometheus instances using the Operator.
[~/repos/shadycuz/kube_monitoring]
shadycuz-> kubectl --namespace monitoring get pods -l "release=monitoring"
NAME                                                   READY   STATUS    RESTARTS   AGE
monitoring-grafana-57699d9c7c-9fgbm                    2/2     Running   0          72s
monitoring-prometheus-node-exporter-bsj8f              1/1     Running   0          73s
monitoring-prometheus-node-exporter-k84m6              1/1     Running   0          73s
monitoring-prometheus-node-exporter-kpqb4              1/1     Running   0          73s
monitoring-prometheus-node-exporter-l8gjv              1/1     Running   0          73s
monitoring-prometheus-node-exporter-shvd5              1/1     Running   0          73s
monitoring-prometheus-oper-operator-689bfd4f59-qkmks   2/2     Running   0          72s

Version of Helm and Kubernetes:

shadycuz-> helm version
version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}
shadycuz-> kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

Which chart:

stable/prometheus-operator --version 8.3.3

What happened:
Errors about CRD

What you expected to happen:
No errors ;)

How to reproduce it (as minimally and precisely as possible):
Try to install chart with Helm 3.0, after some googling it appears this is a common error for charts not compatible with Helm3

Anything else we need to know:
I logged into grafana and I do see some dashboards and data looks populated but I haven't looked everything over.

@shadycuz shadycuz changed the title [stable/prometheus-operator] Fails to deploy with default values.yml [stable/prometheus-operator] Errors with Helm3 Dec 8, 2019
@Belonias
Copy link

Did you find any solution? I am experiencing the same error but when the installation is done I don't get the message that everything deployed fine.

@shadycuz
Copy link
Author

@Belonias Everything seems to be working for me. My only complain is when I change from one dashboard to the other, It asks me to save the dashboard even though I didn't change anything. Not sure if thats a bug with the dashboards, grafana or what.

@Belonias
Copy link

ok @shadycuz thank you for your time to reply. For me it seems the problem was EKS in GKE everything works perfect, I think that I am messing somehow in cluster creation.

@shadycuz
Copy link
Author

@Belonias I think I was wrong. The CRD's don't get deployed.

shadycuz-> kubectl get prometheuses.monitoring.coreos.com -o yaml
apiVersion: v1
items: []
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

This means you will not be able to do lots of things the Prometheus Operator is for, like adding new services into monitoring =/.

@maver1ck
Copy link
Collaborator

Can we maybe hide this hook on helm3 ?

@maver1ck
Copy link
Collaborator

I have error and failed release because of this error:

FAILED RELEASES:
NAME
prometheus-operator
in ./helmfile.yaml: failed processing release prometheus-operator: helm exited with status 1:
  manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
  manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
  manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
  manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
  manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
  Error: context canceled

@stale
Copy link

stale bot commented Jan 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

@stale stale bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 11, 2020
@lucj
Copy link

lucj commented Jan 22, 2020

Hello,
any update on this issue ? Got the same thing on a fresh k3s cluster.

@stale stale bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 22, 2020
@alexander-nolan
Copy link

I'm also seeing this. Could somebody look into this please?

@NicoForce
Copy link

Also seeing this problem, opting to install helm 2 and use it.

@diversario
Copy link

Somewhat unexpectedly, I was able to install the chart with Helm 3 by setting prometheusOperator.createCustomResource=false (like so). My understanding is that Helm 3 picks up the contents of the crds/ directory, but doesn't do anything special with it (so "helm.sh/hook": crd-install doesn't do anything). Without it, CRDs end up under templates/ dir, where Helm does process them as templates, causing the error.

@onedr0p
Copy link
Contributor

onedr0p commented Feb 25, 2020

Moreover in the docs for prometheusOperator.createCustomResource=false

Regardless of value of this, Helm v3+ will install the CRDs if those are not present already. Use --skip-crds with helm install if you want to skip CRD creation.

My understanding of that is if you are using helm 3 make sure you have prometheusOperator.createCustomResource=false so that the warnings don't show up.

@stale
Copy link

stale bot commented Mar 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

@stale stale bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 26, 2020
@stale
Copy link

stale bot commented Apr 9, 2020

This issue is being automatically closed due to inactivity.

@stale stale bot closed this as completed Apr 9, 2020
@lishitiancn
Copy link

Come on. Quickly support helm3

@onedr0p
Copy link
Contributor

onedr0p commented Apr 22, 2020

This works great with helm 3, what are you on about?

@lishitiancn
Copy link

When deploying... The info log doesn't matter?
[root@master ~]# helm install prometheus-operator stable/prometheus-operator -n prometheus-operator
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
manifest_sorter.go:175: info: skipping unknown hook: "crd-instal"
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"

@onedr0p
Copy link
Contributor

onedr0p commented Apr 22, 2020

Did you read the comments, specially the one I posted like 2 comments back?

@Hashfyre
Copy link
Contributor

Existence of an workaround does not mean the error does not exist, if we have to manually create CRDs and disable CRDcreation through a flag, that's not a fix. Ordered CRD Creation does need a fix for helm3.

@abdennour
Copy link

This issue last for more than 6 months.. and till now it is not fixed.
PR approval also took time.
Any other solutions ?

@faraonc
Copy link

faraonc commented Oct 28, 2020

Still an issue for

$ helm version
version.BuildInfo{Version:"v3.3.4", GitCommit:"a61ce5633af99708171414353ed49547cf05013d", GitTreeState:"dirty", GoVersion:"go1.15.2"}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests