-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix: prometheus input plugin run outside k8s cluster err #9960
Conversation
Thanks so much for the pull request! |
Thanks so much for the pull request! |
!signed-cla |
bc0f232
to
e07fb44
Compare
@yahaa thanks for the pull request, can you add more detail on the error this is trying to resolve? The CI is failing because |
The first one, when we run telegra in outside of a kubernetes cluster the line The second one, the method of getting rest.Config instance in // add this UT into plugins/inputs/prometheus/kubernetes_test.go
func TestLoadClient(t *testing.T) {
kubeconfig := "/path_to_your_kubeconfig"
client, err := loadClient(kubeconfig)
if err != nil {
t.Errorf("got err: %v", err)
return
}
watcher, err := client.CoreV1().Pods("kube-system").Watch(context.TODO(), metav1.ListOptions{
LabelSelector: "app=debug",
})
if err != nil {
t.Errorf("watch pod got err: %v", err)
return
}
defer watcher.Stop()
} this UT can got |
e07fb44
to
5addf2b
Compare
📦 Looks like new artifacts were built from this PR. Expand this list to get them here! 🐯Artifact URLs |
@sspaink Please help me review this PR, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Thanks for this PR! If you are still interested in landing this, can you please rebase this on master, resolve the conflicts, and answer my question about the check-deps changes?
Thanks!
scripts/check-deps.sh
Outdated
|
||
grep '^-' docs/LICENSE_OF_DEPENDENCIES.md | grep -v github.com/DataDog/datadog-agent | cut -f 2 -d' ' > "${tmpdir}/LICENSE_OF_DEPENDENCIES.md" | ||
grep '^-' docs/LICENSE_OF_DEPENDENCIES.md | grep -v github.com/DataDog/datadog-agent | cut -f 2 -d' ' | sort -n > "${tmpdir}/LICENSE_OF_DEPENDENCIES.md" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these changes required for this PR? Seems odd to sort numerically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, Thanks for your feedback, i have rebase and resolve the conflicts.
It is difficult to add github.com/imdario/mergo
and github.com/spf13/pflag
in the right place in the LICENSE_OF_DEPENDENCIES.md
because we need to ensure it in alphabetical order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm go mod tidy
did not handle that for you? I am still seeing a conflict.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yahaa I'd prefer if we kept the dependency licenses in alphabetical order opposed to numerical, would you mind removing this change? We could always consider this in a separate pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yahaa I'd prefer if we kept the dependency licenses in alphabetical order opposed to numerical, would you mind removing this change? We could always consider this in a separate pull request.
Sorry, forgot to reply you. I also think a single pr would be better.
5addf2b
to
cfd8046
Compare
cfd8046
to
598438c
Compare
📦 Looks like new artifacts were built from this PR. Expand this list to get them here ! 🐯Artifact URLs |
88129a5
to
598438c
Compare
Required for all PRs:
resolves #
fix prometheus input plugin run outside k8s cluster err.