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

Add Cilium Operator IPAM #11083

Merged
merged 19 commits into from
May 13, 2020
Merged

Add Cilium Operator IPAM #11083

merged 19 commits into from
May 13, 2020

Commits on May 13, 2020

  1. pkg/ip: add IsIPv4 helper function

    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    a9c102a View commit details
    Browse the repository at this point in the history
  2. k8s: remove waiting for node spec on k8s client init

    Initializing k8s client should not require to wait for the node spec to
    be retrieved from k8s.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    314ce06 View commit details
    Browse the repository at this point in the history
  3. pkg/node: add function to parse a k8s Node into a CiliumNode

    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    25f7e2f View commit details
    Browse the repository at this point in the history
  4. operator: add Create function to nodeEventHandler

    Distinguish between an update an create will be helpful for future
    implementations of the `nodeEventHandler` interface.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    e120838 View commit details
    Browse the repository at this point in the history
  5. pkg/cidr: add CIDR Equal and Contains methods

    These functions will be helpful for the cilium operator CIDR allocator.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    1e73c85 View commit details
    Browse the repository at this point in the history
  6. pkg/k8s: add operator status field to cilium node

    This field will be useful to report cilium-operator error messages into
    the CiliumNode structure.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    941eb31 View commit details
    Browse the repository at this point in the history
  7. pkg/ipam: add Create and Delete methods to manage CiliumNodes

    It will be helpful to use this interface to Create and Delete nodes
    for the operator IPAM based mode.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    ed990eb View commit details
    Browse the repository at this point in the history
  8. pkg/ipam: fix argument orders for Update[Status] methods

    None of the implementation were respecting the arguments order of the
    CiliumNodeGetterUpdater interface. This commit fixes all implementations
    to respect such order.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    218f3a5 View commit details
    Browse the repository at this point in the history
  9. operator: accept nil origNode in CiliumNode Update* methods

    The implementation of the Update* methods do not necessary require the
    origNode to be provided. In case the origNode is nil the client should
    try updating the node regardless.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    a600ffb View commit details
    Browse the repository at this point in the history
  10. pkg/ipam: add allocator.NodeEventHandler interface

    All allocators should share the same interface to handle node events so
    we can create a common interface for this purpose.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    a101e27 View commit details
    Browse the repository at this point in the history
  11. operator: remove duplicated code for IPAM modes

    All IPAM providers share the same code, we can remove the duplicated
    code.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    54def00 View commit details
    Browse the repository at this point in the history
  12. pkg/ipam: add podCIDR implementation

    This commit introduces the podCIDR implementation based on the k8s
    podCIDR allocation. This commit only introduces the package with the
    podCIDR implementation and integration with cilium-agent and
    cilium-operator will be made in follow up commits.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    77bce29 View commit details
    Browse the repository at this point in the history
  13. ipam/metrics: expose metrics for public usage

    Some methods and constructors are useful for public usage, so this
    commit exposes them.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    6a627af View commit details
    Browse the repository at this point in the history
  14. add Cilium-operator podCIDR allocator

    This commit adds the cilium-operator podCIDR allocator that is intended
    to replace kubernetes podCIDR allocator, which might not always be
    available. Cilium agents will rely on Cilium nodes to retrieve the
    podCIDR allocated by the cilium-operator and will use that podCIDR to
    allocate IPs for pods running on the nodes.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    ea79def View commit details
    Browse the repository at this point in the history
  15. install/kubernetes: enable Cilium-based podCIDR allocation by default

    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    9245557 View commit details
    Browse the repository at this point in the history
  16. docs: add IPAM based on Cilium Operator

    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    95fd15e View commit details
    Browse the repository at this point in the history
  17. operator/Makefile: build all ipam managers in development

    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    94cc209 View commit details
    Browse the repository at this point in the history
  18. pkg/ipam: allocate CiliumNode podCIDR once all CiliumNodes are synced

    To avoid new CiliumNodes from getting a podCIDR of existing CiliumNodes,
    when the Cilium Operator is starting, and synchronizing with k8s, the
    allocation of new CiliumNodes should only happen once Cilium Operator
    has synced with k8s.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    d5d01ae View commit details
    Browse the repository at this point in the history
  19. operator: rename ipam golang tags

    This way all ipam provider tags will be consistent
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed May 13, 2020
    Configuration menu
    Copy the full SHA
    b35b4bd View commit details
    Browse the repository at this point in the history