loki
loki copied to clipboard
loki/simple-scalable helm deployment fails
Describe the bug I am trying to use the grafana/loki-simple-scalable chart when following the guide: https://grafana.com/docs/loki/latest/installation/simple-scalable-helm/ When trying to deploy the cluster I get the following error:
helm upgrade --install loki --namespace=mikefreitas grafana/loki-simple-scalable Release "loki" does not exist. Installing it now. Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(GrafanaAgent.spec): unknown field "enableConfigReadAPI" in com.grafana.monitoring.v1alpha1.GrafanaAgent.spec I did not have this issue with the loki-stack chart.
helm version version.BuildInfo{Version:"v3.9.4", GitCommit:"dbc6d8e20fe1d58d50e6ed30f09a04a77e4c68db", GitTreeState:"clean", GoVersion:"go1.19"}
To Reproduce Steps to reproduce the behavior:
- Add grafana helm repo
- helm upgrade --install loki --namespace=mikefreitas grafana/loki-simple-scalable Release "loki" does not exist. Installing it now. Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(GrafanaAgent.spec): unknown field "enableConfigReadAPI" in com.grafana.monitoring.v1alpha1.GrafanaAgent.spec I did not have this issue with the loki-stack chart.
Expected behavior The simple-scalable deployment version of loki should be deployed into my kubernetes cluster.
Environment:
- Infrastructure:kubernetes
- Deployment tool: helm
Screenshots, Promtail config, or terminal output
DEBUG Output:
helm upgrade --install loki --namespace=mikefreitas grafana/loki-simple-scalable --debug
history.go:56: [debug] getting history for release loki
Release "loki" does not exist. Installing it now.
install.go:178: [debug] Original chart version: ""
install.go:195: [debug] CHART PATH: /Users/mike.freitas/Library/Caches/helm/repository/loki-simple-scalable-1.8.10.tgz
client.go:128: [debug] creating 1 resource(s)
install.go:151: [debug] CRD prometheusrules.monitoring.coreos.com is already present. Skipping.
client.go:128: [debug] creating 1 resource(s)
install.go:151: [debug] CRD servicemonitors.monitoring.coreos.com is already present. Skipping.
client.go:128: [debug] creating 1 resource(s)
install.go:151: [debug] CRD podmonitors.monitoring.coreos.com is already present. Skipping.
client.go:128: [debug] creating 1 resource(s)
install.go:151: [debug] CRD probes.monitoring.coreos.com is already present. Skipping.
client.go:128: [debug] creating 1 resource(s)
install.go:151: [debug] CRD servicemonitors.monitoring.coreos.com is already present. Skipping.
client.go:128: [debug] creating 1 resource(s)
install.go:151: [debug] CRD grafanaagents.monitoring.grafana.com is already present. Skipping.
client.go:128: [debug] creating 1 resource(s)
install.go:151: [debug] CRD integrations.monitoring.grafana.com is already present. Skipping.
client.go:128: [debug] creating 1 resource(s)
install.go:151: [debug] CRD logsinstances.monitoring.grafana.com is already present. Skipping.
client.go:128: [debug] creating 1 resource(s)
install.go:151: [debug] CRD metricsinstances.monitoring.grafana.com is already present. Skipping.
client.go:128: [debug] creating 1 resource(s)
install.go:151: [debug] CRD podlogs.monitoring.grafana.com is already present. Skipping.
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(GrafanaAgent.spec): unknown field "enableConfigReadAPI" in com.grafana.monitoring.v1alpha1.GrafanaAgent.spec
helm.go:84: [debug] error validating "": error validating data: ValidationError(GrafanaAgent.spec): unknown field "enableConfigReadAPI" in com.grafana.monitoring.v1alpha1.GrafanaAgent.spec
helm.sh/helm/v3/pkg/kube.scrubValidationError
helm.sh/helm/v3/pkg/kube/client.go:643
helm.sh/helm/v3/pkg/kube.(*Client).Build
helm.sh/helm/v3/pkg/kube/client.go:215
helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
helm.sh/helm/v3/pkg/action/install.go:275
main.runInstall
helm.sh/helm/v3/cmd/helm/install.go:264
main.newUpgradeCmd.func2
helm.sh/helm/v3/cmd/helm/upgrade.go:121
github.com/spf13/cobra.(*Command).execute
github.com/spf13/[email protected]/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
github.com/spf13/[email protected]/command.go:974
github.com/spf13/cobra.(*Command).Execute
github.com/spf13/[email protected]/command.go:902
main.main
helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
runtime/proc.go:250
runtime.goexit
runtime/asm_arm64.s:1165
unable to build kubernetes objects from release manifest
helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
helm.sh/helm/v3/pkg/action/install.go:277
main.runInstall
helm.sh/helm/v3/cmd/helm/install.go:264
main.newUpgradeCmd.func2
helm.sh/helm/v3/cmd/helm/upgrade.go:121
github.com/spf13/cobra.(*Command).execute
github.com/spf13/[email protected]/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
github.com/spf13/[email protected]/command.go:974
github.com/spf13/cobra.(*Command).Execute
github.com/spf13/[email protected]/command.go:902
main.main
helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
runtime/proc.go:250
runtime.goexit
runtime/asm_arm64.s:1165
Could you try the latest Helm release Loki 3.0.0?
Got a similar problem while trying to get a simple deployment without monitoring
I guess we need the ability not to deploy Prometheus operator CRDs. In my case it also already exists in my clusters
we need the ability not to deploy Prometheus operator CRDs. In my case it also already exists in my clusters
I've just talked with @trevorwhitney about this. I think you can disable them with serviceMonitoring.enable = false
.
@majid-akbari @jeschkies Most of the time, charts that provide the ability to include SerivceMonitor in the deployments do not include CRD itself. I guess it's good practice.
Now I'm locked with the same CRD version that Loki uses. I guess it's a bad solution.
The better solution will be:
- Remove CRD from Loki chart OR
- the Add ability to disable CRD (coverint to IF section)
yeah, I think we could revisit this, since the agent will deploy the CRDs itself when deployed, we may be able to remove them. I think the problem we ran into was while helm will automatically deploy CRDs in a crd
folder before deploying templates (as is necessary if those CRDs are used in the templates), it does not do that for subcharts. I need to revisit this to confirm.
Hi!
I ran into this problem too while installing the grafana/loki
helm chart.
I already had a grafana-agent running inside of my cluster, so the GrafanaAgent CRD was already installed.
Deploying the chart with
monitoring:
selfMonitoring:
enabled: true
grafanaAgent:
installOperator: false
would fail with
unknown field "enableConfigReadAPI" in com.grafana.monitoring.v1alpha1.GrafanaAgent.spec
The workaround for me was to delete the existing CRD, uninstall loki chart:
kubectl delete crd grafanaagents.monitoring.grafana.com
helm uninstall loki -n MY_NAMESPACE
and then reinstall the chart.