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

[feature request] add feature-gate to let cloneset gc inactive pods of it #925

Open
DrAuYueng opened this issue Mar 10, 2022 · 8 comments
Open
Labels
help wanted Extra attention is needed kind/enhancement New feature or request kind/feature-request
Milestone

Comments

@DrAuYueng
Copy link

What happened:
Deploy CloneSet which specified replicas 1, and node selector such as :

nodeSelector:
  foo: "bar"

k8s scheduled pod with different node, eg: 192.168.0.10, 192.168.0.11
image

Pod status:

status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: "2022-03-09T09:45:59Z"
    status: "True"
    type: KruisePodReady
  - lastProbeTime: null
    lastTransitionTime: "2022-03-09T09:46:00Z"
    status: "True"
    type: InPlaceUpdateReady
  message: Pod Predicate NodeAffinity failed
  phase: Failed
  reason: NodeAffinity
  startTime: "2022-03-09T09:46:09Z"

What you expected to happen:
Pods with status of NodeAffinity should be cleaned when UpdatedReplicas==Replicas

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kruise version: v1.0.1
  • Kubernetes version (use kubectl version): v1.20.15-rc.0
  • Install details (e.g. helm install args): helm install kruise openkruise/kruise --version 1.0.1 --set featureGates="CloneSetPartitionRollback=true"
  • Others:
@DrAuYueng DrAuYueng added the kind/bug Something isn't working label Mar 10, 2022
@FillZpp
Copy link
Member

FillZpp commented Mar 10, 2022

Pods with phase Failed or Succeeded will not be handled by CloneSet. They should be deleted by podgc-controller in kube-controller-manager.

@FillZpp
Copy link
Member

FillZpp commented Mar 10, 2022

So does Deployment or ReplicaSet.

@DrAuYueng
Copy link
Author

Actually not deleted by podgc-controller.

@DrAuYueng
Copy link
Author

Similar as:kubernetes/kubernetes#99986

@DrAuYueng
Copy link
Author

Seem gc-controller not work as expect.

@FillZpp
Copy link
Member

FillZpp commented Mar 10, 2022

Yep, the default threshold 12500 is a little high. Now you can change it in the args of your kube-controller-manager.

@DrAuYueng
Copy link
Author

Not sure the suitable value for arg terminated-pod-gc-threshold.
Feature-gates include GC would be useful, would you think?

@FillZpp
Copy link
Member

FillZpp commented Mar 10, 2022

We could consider adding that.

/retitle [feature request] add feature-gate to let cloneset gc inactive pods of it

@kruise-bot kruise-bot changed the title [BUG]CloneSet, pods with status of NodeAffinity should be cleaned when UpdatedReplicas==Replicas [feature request] add feature-gate to let cloneset gc inactive pods of it Mar 10, 2022
@FillZpp FillZpp added kind/feature-request and removed kind/bug Something isn't working labels Mar 10, 2022
@zmberg zmberg assigned zmberg and unassigned FillZpp Feb 16, 2023
@zmberg zmberg removed their assignment Jun 8, 2023
@zmberg zmberg added kind/enhancement New feature or request help wanted Extra attention is needed labels Jun 8, 2023
@zmberg zmberg modified the milestones: 1.8, 1.9 Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed kind/enhancement New feature or request kind/feature-request
Projects
None yet
Development

No branches or pull requests

3 participants