Comments (3)
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.
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.
This is now available in version v1.4.1
.
from custom-pod-autoscaler-operator.
Related Issues (20)
- Unable to apply CustomPodAutoscaler HOT 3
- Pausing autoscaling HOT 2
- Ability to specify the serviceAccount to use HOT 1
- Can i use CPA will work for predication and sudden spike autoscaling on EKS ? HOT 1
- Missing WATCH_NAMESPACE variable HOT 4
- Could not create ServiceMonitor object HOT 3
- Helm chart only works if deployed in default namespace HOT 1
- multiple service account token being created HOT 4
- Upgrade Operator SDK to stable version v1.1.0 to get future backwards compatible bug fixes
- Operator fails to install on K8s >= v1.18.x HOT 2
- The Custom Pod Autoscaler Operator should include an option for provisioning a role with access to the metrics server
- roleRequiresMetricsServer flag does not generate role that works for custom or external metrics
- Add support for Argo Rollouts
- CustomPodAutoscaler/v1alpha1 HOT 2
- reconcile would delete existing pod during Update event HOT 1
- Operator doesn't apply pod's ObjectMeta defined on the CustomPodAutoscaler CR. HOT 5
- Namespaced deployment fails to watch namespaced resources HOT 1
- Changing Pod name through metadata can cause 2 pods to be created HOT 7
- Add status field information
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from custom-pod-autoscaler-operator.