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

feat(metaserver): support get pod by uid #39

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

cheney-lin
Copy link
Member

What type of PR is this?

Enhancements

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:

@cheney-lin cheney-lin added enhancement New feature or request workflow/need-review review: test succeeded, need to review labels Apr 20, 2023
@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Patch coverage: 58.08% and project coverage change: -0.11 ⚠️

Comparison is base (81ce219) 50.99% compared to head (6113f3d) 50.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
- Coverage   50.99%   50.88%   -0.11%     
==========================================
  Files         311      315       +4     
  Lines       31796    32126     +330     
==========================================
+ Hits        16215    16348     +133     
- Misses      13666    13844     +178     
- Partials     1915     1934      +19     
Flag Coverage Δ
unittest 50.88% <58.08%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...r/plugin/qosaware/reporter/manager/resource/cpu.go 100.00% <ø> (ø)
...lugin/qosaware/reporter/manager/resource/memory.go 100.00% <ø> (ø)
.../sysadvisor/qosaware/reporter/headroom_reporter.go 100.00% <ø> (ø)
pkg/metaserver/agent/pod/pod.go 45.98% <0.00%> (-1.93%) ⬇️
...rce/cpu/region/provisionpolicy/policy_canonical.go 66.66% <35.29%> (-8.34%) ⬇️
cmd/katalyst-agent/app/options/qrm/qrm_base.go 46.51% <42.85%> (-3.49%) ⬇️
.../agent/qrm-plugins/network/dynamicpolicy/policy.go 43.63% <43.63%> (ø)
...d/katalyst-agent/app/options/qrm/network_plugin.go 48.48% <48.48%> (ø)
...n/qosaware/resource/helper/estimation_canonical.go 65.38% <57.14%> (ø)
...resource/memory/headroompolicy/policy_canonical.go 83.72% <57.14%> (-1.07%) ⬇️
... and 16 more

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cheney-lin cheney-lin force-pushed the dev/get_pod_by_uid branch 2 times, most recently from 517b930 to 546a5f8 Compare April 25, 2023 04:58
@cheney-lin cheney-lin requested a review from luomingmeng April 25, 2023 05:38
luomingmeng
luomingmeng previously approved these changes Apr 25, 2023
@cheney-lin cheney-lin added this to the v0.2 milestone Apr 25, 2023
@waynepeking348
Copy link
Collaborator

pod-fetcher interface is kind of mess and should be refined before it can be approved cc @luomingmeng

pkg/metaserver/agent/pod/runtime.go Outdated Show resolved Hide resolved
pkg/metaserver/agent/pod/runtime.go Outdated Show resolved Hide resolved
luomingmeng
luomingmeng previously approved these changes Apr 25, 2023
// GetPodList get pods from kubelet 10255/pods api, and the returned slice does not
// contain pods that don't pass `podFilter`
func (k *kubeletPodFetcherImpl) GetPodList(_ context.Context, podFilter func(*v1.Pod) bool) ([]*v1.Pod, error) {
func getPodsByKubeletAPI() (v1.PodList, error) {
Copy link
Collaborator

@waynepeking348 waynepeking348 Apr 25, 2023

Choose a reason for hiding this comment

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

why we need to extract this function out? @cheney-lin

Copy link
Member Author

Choose a reason for hiding this comment

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

No need any more, removed already.

@cheney-lin cheney-lin added workflow/merge-ready merge-ready: code is ready and can be merged and removed workflow/need-review review: test succeeded, need to review labels Apr 25, 2023
Signed-off-by: linzhecheng <linzhecheng@bytedance.com>
@waynepeking348 waynepeking348 merged commit 240d1dc into kubewharf:main Apr 27, 2023
@cheney-lin cheney-lin deleted the dev/get_pod_by_uid branch May 9, 2023 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request workflow/merge-ready merge-ready: code is ready and can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants