Skip to content
New issue

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

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

Already on GitHub? # to your account

Improvement for #5 and #12 #13

Merged
merged 7 commits into from
Feb 22, 2021
Merged

Improvement for #5 and #12 #13

merged 7 commits into from
Feb 22, 2021

Conversation

wangchen615
Copy link
Collaborator

@wangchen615 wangchen615 commented Feb 14, 2021

To solve and close issue #5, we did the following.

  1. Change the Dockerfile to build the binaries so the building process is independent of the machine.
  2. Add Makefile for the new Dockerfile.
  3. Add manifests/load-watcher-deployment.yaml to allow users to deploy load-watcher as a service in a Kubernetes cluster directly. Please advise if the official docker account needs to be updated.

To solve and close issue #12, we added the following.

  1. Add pkg/metricsprovider/loadwatcher.go to allow users use load-watcher libraries in client mode.
  2. Add load-watcher-client.go to give an example of using load-watcher libraries in client mode.
  3. Change all clients' FetchAllHostsMetrics method's return metrics from map[string][]watcher.Metric to watcher.NodeMetricsMap, so all clients' have the same interface as load-watcher client.
  4. Change all clients' FetchAllHostsMetrics method's return metrics from map[string][]watcher.Metric to watcher.WatcherMetrics, so all clients' have the same interface as load-watcher client.
  5. Change all clients' FetchHostMetrics method's return metrics from []watcher.Metric to watcher.WatcherMetrics, so all clients' have the same interface as load-watcher client.
  6. Add pkg/utils/utils.go to initiate all environment variables and have a unified method to create client according to env setup.
  7. Export all client names to be used by pkg/utils/utils.go.

@wangchen615 wangchen615 requested a review from zorro786 February 14, 2021 22:31
@wangchen615 wangchen615 force-pushed the iss5 branch 6 times, most recently from 57de47d to 498c7a8 Compare February 15, 2021 04:05
@wangchen615 wangchen615 self-assigned this Feb 15, 2021
Copy link
Contributor

@zorro786 zorro786 left a comment

Choose a reason for hiding this comment

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

Left some comments on design

@wangchen615 wangchen615 force-pushed the iss5 branch 2 times, most recently from fc989c4 to 2b8ea21 Compare February 16, 2021 15:06
@zorro786 zorro786 requested review from ridv and lenhattan86 February 16, 2021 17:03
@ridv
Copy link
Contributor

ridv commented Feb 18, 2021

In the interest of not losing comments and change history, I suggest we try to avoid force pushes 😄 Hard to keep track of what was talked about in the past otherwise

@wangchen615
Copy link
Collaborator Author

In the interest of not losing comments and change history, I suggest we try to avoid for

Ok, Will just squash when merge.

wangchen615 and others added 3 commits February 19, 2021 09:41
sort library imports
Refactor code, move metricsprovider to internal

Signed-off-by: Abdul Qadeer <aqadeer@paypal.com>
wangchen615 and others added 2 commits February 22, 2021 12:05
Signed-off-by: Abdul Qadeer <aqadeer@paypal.com>
Copy link
Contributor

@zorro786 zorro786 left a comment

Choose a reason for hiding this comment

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

LGTM

@wangchen615 wangchen615 merged commit fd8dfd7 into master Feb 22, 2021
@wangchen615 wangchen615 deleted the iss5 branch February 22, 2021 18:33
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants