Giter Club home page Giter Club logo

Comments (3)

jthomperoo avatar jthomperoo commented on June 14, 2024

Thanks for raising this issue and including detailed steps to reproduce and error logs, very useful.

I've been able to recreate this.

I think what's happening here is with a foreground cascading deletion it first updates some metadata values on the object being deleted (the CPA resource in this instance):

The Kubernetes API server sets the object's metadata.deletionTimestamp field to the time the object was marked for deletion.
The Kubernetes API server also sets the metadata.finalizers field to foregroundDeletion.

This will cause reconciles to occur within the operator.

Then the dependent resources are deleted:

After the owner object enters the deletion in progress state, the controller deletes the dependents.

When this occurs at the same time as the update reconciles the operator will try to recreate the resources that have just been deleted.

I think this is what causes the infinite loop, the operator is trying to recreate the dependent resources which Kubernetes is deleting at the same time.

I think if I check if the resource is marked for deletion and skip the reconcile stages if that is occurring it should fix this.

I'll keep this issue updated on my progress on this.

from custom-pod-autoscaler-operator.

jthomperoo avatar jthomperoo commented on June 14, 2024

Created a pull request with a fix for this in it. It appeared to fix it for my setup.

Once I finish testing this I will merge this in and cut a new version of the operator.

Feel free to use the branch with the fix on it if you want to test this out/need it fixed before then.

It's available with the image custompodautoscaler/operator:73793a3, you can manually edit your helm charts to use this image instead of the templated value if you want to install this.

from custom-pod-autoscaler-operator.

jthomperoo avatar jthomperoo commented on June 14, 2024

This is now available in version v1.4.1.

from custom-pod-autoscaler-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.