美文网首页
Create Objects During Reconcilia

Create Objects During Reconcilia

作者: allenhaozi | 来源:发表于2020-04-22 21:56 被阅读0次
    Many Controllers create new Kubernetes objects as part of a reconcile. 
    These objects are owned by the object responsible for their creation.
    This relationship is recorded both in an OwnersReference in the ObjectMeta of the created objects 
    and through labels (on the created object) + selectors (on the created object).
    
    The labels + selectors allow the creating controller to find all of the objects it has created, 
    by listing them using their label. 
    The OwnersReference maps the created object to its owner when there is an event for the created object.
    

    控制器创建对应的所属关系记录在两个地方:

    • ObjectMeta中的OwnersReference中归属关系

    • metadata的label中

    • label + selector 可以让控制器找到它创建的Object

    • 创建的object有Event发生时, 通过OwnersReference找到它的所有者

    https://book-v1.book.kubebuilder.io/basics/what_is_a_controller.html

    相关文章

      网友评论

          本文标题:Create Objects During Reconcilia

          本文链接:https://www.haomeiwen.com/subject/bmygihtx.html