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

V1alpha2 Metrics collector (part 1) #484

Merged
merged 8 commits into from
May 8, 2019

Conversation

richardsliu
Copy link
Contributor

@richardsliu richardsliu commented May 3, 2019

Part of #442

This change is Reviewable

getreq := &api.GetExperimentRequest{
ExperimentName: *experimentName,
}
getrep, err := c.GetExperiment(ctx, getreq)
Copy link
Member

@johnugeorge johnugeorge May 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider populating metric names similar to other flags? We can then avoid this API call, which will reduce the API dependency. We can avoid Manager Service flag too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manager service is still needed to make the Report call

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/kubernetes"
restclient "k8s.io/client-go/rest"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use controller runtime client itself instead of directly using client-go?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only used to get the in-cluster config, which needs the REST client. The controller runtime client also calls rest client under the hood: https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/client/config/config.go#L78

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to controller-runtime

apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/kubernetes"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Katib-client instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://stackoverflow.com/questions/53852530/how-to-get-logs-from-kubernetes-using-golang, we cannot get logs without using client-go for now.

@johnugeorge
Copy link
Member

/lgtm

@richardsliu richardsliu changed the title WIP V1alpha2 Metrics collector V1alpha2 Metrics collector (part 1) May 8, 2019
@richardsliu
Copy link
Contributor Author

/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardsliu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 6853960 into kubeflow:master May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants