Code Monkey home page Code Monkey logo

【提问】pkg/controller/deployment/deployment_controller.go 中,updateDeployment 和 updateReplicaSet 两个函数,为啥 updateReplicaSet 中有对比 ResourceVersion 的步骤而 updateDeployment 中没有? about sig-kubernetes HOT 1 OPEN

cloudnativeto avatar cloudnativeto commented on August 11, 2024
【提问】pkg/controller/deployment/deployment_controller.go 中,updateDeployment 和 updateReplicaSet 两个函数,为啥 updateReplicaSet 中有对比 ResourceVersion 的步骤而 updateDeployment 中没有?

from sig-kubernetes.

Comments (1)

WisWang avatar WisWang commented on August 11, 2024

这个问题我也问了一下,kubernetes 的联合创始人 Brendan Burns [email protected],下面是他的回复:

I'm not super familiar with that code since I wasn't involved in writting it, but my guess from looking at it is that it is an oversight.
In both cases it is possible that there will be an "update" where the resource version doesn't change, due to a re-list of the resources. Such an "update" is in fact a no-op and should be ignored. So I think it would be reasonable to add the same check to the updateDeployment code.

还是没回答我的问题,resync 是为了 reconcile 业务逻辑和内存缓存( 最近一次 relist 的结果 )的。就是说有对比 resource version 的 controller 是不需要这一步 reconcile 的,而没有对比 resource version 的是需要这一步 reconcile 的,难道说 Deployment 需要 reconcile 业务逻辑和内存缓存,而 ReplicaSet 不需要?
我的博客对这个有更详细的记录。

from sig-kubernetes.

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.