keptn / lifecycle-toolkit

Toolkit for cloud-native application lifecycle management
https://keptn.sh
Apache License 2.0
272 stars 111 forks source link

Grafana Dashboard Configmap errors #3419

Closed pieterv-icloud-com closed 3 months ago

pieterv-icloud-com commented 3 months ago

Running:

kubectl apply -f https://github.com/keptn/lifecycle-toolkit/blob/main/dashboards/grafana/configmap/grafana-dashboard-keptn-workloads.yaml

returns the following error:

error: error parsing https://github.com/keptn/lifecycle-toolkit/blob/main/dashboards/grafana/configmap/grafana-dashboard-keptn-workloads.yaml: error converting YAML to JSON: yaml: line 208: mapping values are not allowed in this context
pieterv-icloud-com commented 3 months ago

All grafana dashboard configmaps cause the same issue

mowies commented 3 months ago

Thanks for posting this! @bacherfl will look into it and check what's going on.

bacherfl commented 3 months ago

Hi @pieterv-icloud-com ! Thanks for submitting the issue - Please try the kubectl apply command with the URL to the raw file, i.e. like the following:

kubectl apply -f https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/dashboards/grafana/configmap/grafana-dashboard-keptn-workloads.yaml
pieterv-icloud-com commented 3 months ago

Thanks for that, I got 2 working now except for this one:

kubectl apply -f https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/dashboards/grafana/configmap/grafana-dashboard-keptn-applications.yaml
error: error parsing https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/dashboards/grafana/configmap/grafana-dashboard-keptn-applications.yaml: error converting YAML to JSON: yaml: line 863: did not find expected key
pieterv-icloud-com commented 3 months ago

Looks like that dashboard is missing some indentation on the dashboard JSON

bacherfl commented 3 months ago

Looks like that dashboard is missing some indentation on the dashboard JSON

You're right, the formatting was off in that file - I just created a PR that should fix that

mowies commented 3 months ago

@pieterv-icloud-com the fix PR is merged, please double check if it works for you now and post here if you have any more issues with this :)

pieterv-icloud-com commented 3 months ago

Thx, just tested this and it works 100% now, thanks for the quick turnaround

mowies commented 3 months ago

awesome! happy to help!