Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kube-state-metrics jsonnet format wrong #2460

Closed
wangjc0216 opened this issue Jul 31, 2024 · 4 comments
Closed

kube-state-metrics jsonnet format wrong #2460

wangjc0216 opened this issue Jul 31, 2024 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@wangjc0216
Copy link

What happened:

I can't build correct kube-state-metrics yaml in kube-prometheus customizing

What you expected to happen:

I found the spelling mistake in this project , I want to fix it

How to reproduce it (as minimally and precisely as possible):

Just replay in the docs

$ mkdir my-kube-prometheus; cd my-kube-prometheus
$ jb init  # Creates the initial/empty `jsonnetfile.json`
# Install the kube-prometheus dependency
$ jb install github.com/prometheus-operator/kube-prometheus/jsonnet/kube-prometheus@main # Creates `vendor/` & `jsonnetfile.lock.json`, and fills in `jsonnetfile.json`

$ wget https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/example.jsonnet -O example.jsonnet
$ wget https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/build.sh -O build.sh
$ chmod +x build.sh

$ ./build.sh 
# print error 
RUNTIME ERROR: vendor/github.com/kubernetes/kube-state-metrics/jsonnet/kube-state-metrics/kube-state-metrics.libsonnet:392:21-22 Expected token OPERATOR but got "{"
	vendor/kube-prometheus/components/kube-state-metrics.libsonnet:51:19-124	function <anonymous>
	vendor/kube-prometheus/main.libsonnet:136:21-64	object <anonymous>
	vendor/kube-prometheus/platforms/platforms.libsonnet:37:22-40	+:
	example.jsonnet:33:90-109	thunk from <$>
	<std>:1539:24-25	thunk from <function <anonymous>>
	<std>:1539:5-33	function <anonymous>
	example.jsonnet:33:73-110	$
	example.jsonnet:33:1-112	
	example.jsonnet:33:1-112	
	During evaluation	


Anything else we need to know?:

Environment: a pc with golang env

@wangjc0216 wangjc0216 added the kind/bug Categorizes issue or PR as related to a bug. label Jul 31, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jul 31, 2024
@TimothySutton81
Copy link

Also, seeing this problem tried fixing the one mistake I noticed of missing colon but seems commit had many more errors in it.

@TimothySutton81
Copy link

It appears this check in has several bugs to the format b45913d follow up, I tried adding single quotes where it looked like they were missing as well still no dice. I am unfortunately not familiar enough with what is expected here to fix it myself.

@wangjc0216
Copy link
Author

seems like #2454 already fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

3 participants