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

Fix controller reconcile PodGroup status #308

Merged

Conversation

lianghao208
Copy link
Member

Fix #166

It will be 3 final state of pod group: Failed, Finished, Pending.

Pending means:

  1. The pod group has been accepted by the system, but scheduler can not allocate enough resources to it.
  2. The PodGroup doesn't have any associated Pods or associated Pods scaled down to 0.

Failed means:
at least one of spec.minMember pods is failed.

Finished means:
all of spec.minMember pods are successfully.

/cc @Huang-Wei @cwdsuzhou @denkensk

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 7, 2021
Copy link
Member

@denkensk denkensk left a comment

Choose a reason for hiding this comment

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

Thank you for your help. Added some comments.
@lianghao208

pkg/controller/podgroup.go Outdated Show resolved Hide resolved
pkg/controller/podgroup_test.go Outdated Show resolved Hide resolved
pkg/controller/podgroup_test.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 8, 2021
@lianghao208 lianghao208 force-pushed the pod_group_reconcile branch 2 times, most recently from 0666256 to 4ab280f Compare December 8, 2021 09:20
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 8, 2021
@lianghao208
Copy link
Member Author

@denkensk Thank you for the review, I've updated the changes, PTAL.

Copy link
Member

@denkensk denkensk left a comment

Choose a reason for hiding this comment

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

Just a small comment, please take a look.
@lianghao208

pkg/controller/podgroup.go Outdated Show resolved Hide resolved
Signed-off-by: lianghao208 <302824716@qq.com>
@denkensk
Copy link
Member

/lgtm
@lianghao208 Thanks for your help

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 10, 2021
@denkensk
Copy link
Member

/assign @Huang-Wei

Pls take a look again

@denkensk
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: denkensk, lianghao208

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 15, 2021
@k8s-ci-robot k8s-ci-robot merged commit 77279bf into kubernetes-sigs:master Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

controller should reconcile the status of PodGroup
4 participants