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

Reconcile RouteAdvertisements in cluster manager #4691

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Commits on Sep 16, 2024

  1. Generate RouteAdvertisements CRD

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    8a2c7a7 View commit details
    Browse the repository at this point in the history
  2. Add route advertisements CLI flag

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    368c337 View commit details
    Browse the repository at this point in the history
  3. Add RouteAdvertisements to watch factory

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    65ddfc7 View commit details
    Browse the repository at this point in the history
  4. Deploy FFR-k8s in kind

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    b05aad7 View commit details
    Browse the repository at this point in the history
  5. Mock NAD informer instead of handling nil in controller

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    3aa2272 View commit details
    Browse the repository at this point in the history
  6. Add VRFs as reconcilable NetInfo

    Adds to NetInfo the concept of reconcilable network information. This is
    network information that can change dynamically and network controllers
    should be able to reconcile. This includes NADs which is information
    that network controllers should have already been capable of reconciling
    although they currently don't (for example, for multinetwork policies).
    Also includes VRFs the network is leaking/advertising to, per node, that
    network controllers need to be aware of and rec0oncile as it changes.
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    e51dcc2 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. Network controllers reconcile VRF changes

    Add the ability for network controllers to reconcile some network
    information changes. Currently just changes of the VRFs the network is
    leaking/advertising to. Support for reconciling NAD changes is not
    included in this commit.
    
    Currently reconciles if the network is advertised or not:
    - for OVN network controller to configure or not the pod IP to node IP
      SNAT on the GR for a node of its zone
    - for node network controller to configure or not br-ex flows to
      redirect pod IP ingress traffic to the OVN network
    
    This should be enough to provide direct ingress capabilities for the
    default network in SGW mode.
    
    Note that secondary network controllers don't reconcile anything as
    route advertising is not supported on them. Also cluster manager network
    controllers don't reconcile much as they don't have the need.
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    f4347ed View commit details
    Browse the repository at this point in the history
  2. Provide NAD controller access to the default network controller

    The plan is for the NAD controller to fetch route advertising
    information on behalf of network controllers. It will have to do so for
    the default network as well and will need access to its network
    controller to reconcile that information.
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    fdf0b59 View commit details
    Browse the repository at this point in the history
  3. Add node/RA informer access from node watch factory

    As node controllers will need to be informed of related events in new
    level driven controllers to come.
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    03d1889 View commit details
    Browse the repository at this point in the history
  4. Define route advertisements annotation

    This annotation will be set by a future cluster manager controller on
    the NADs and will list the names of route advertisements that apply to
    the given NAD. This will ease processing time of other zone/node
    controllers that need to track which route advertisements apply to a
    network avoiding them from processing all route advertisements on each
    of their reconciliation loops.
    
    Note that this will happen for the default network as well. For that
    probably a dummy NAD on ovn-kubernetes namespace is the best option.
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    26be58c View commit details
    Browse the repository at this point in the history
  5. Get route advertisement information in NAD controller

    The network manager running within the NAD controller will, upon
    ensuring a network, fetch the VRFs per node a pod network is being
    leaked/advertised to from the applicable route advertisements
    configuration, and include it in the network information used when
    creating a network controller, or triggering a reconciliation if it was
    already running.
    
    This relies on annotations set by cluster manager on NADs pointing to
    the route advertising configuration that applies to the network which
    will come in a future PR/commit.
    
    This includes the default network for which the ever existing default
    network controller is used (instead of creating a new network
    controller). If necessary, it is assumed that cluster manager will
    create a dummy NAD for the default network in ovn-k namespace to set
    annotations on. If no NADs for the default network exist or if they have
    no annotations, network manager will reconcile the default network to a
    default configuration (instead of destroying the network controller).
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    482559b View commit details
    Browse the repository at this point in the history
  6. Bump to k8s 1.31

    For go-controller:
    
    go get k8s.io/api v0.31.0
    go get k8s.io/apimachinery v0.31.0
    go get k8s.io/client-go v0.31.0
    go get k8s.io/component-helpers v0.31.0
    go get k8s.io/kubernetes v1.31.0
    go get k8s.io/apiextensions-apiserver v0.31.0 // indirect
    go get k8s.io/component-base v0.31.0 // indirect
    go get sigs.k8s.io/controller-runtime v0.19.0
    go mod vendor && go mod tidy
    
    Fixed API changes and updated codegen
    
    For e2e tests:
    
    go get k8s.io/api v0.31.0
    go get k8s.io/apimachinery v0.31.0
    go get k8s.io/client-go v0.31.0
    go get k8s.io/klog v1.0.0
    go get k8s.io/kubernetes v1.31.0
    go get k8s.io/pod-security-admission v0.31.0
    go get k8s.io/apiextensions-apiserver v0.31.0
    go get k8s.io/apiserver v0.31.0
    go get k8s.io/cloud-provider v0.31.0
    go get k8s.io/component-base v0.31.0
    go get k8s.io/component-helpers v0.31.0
    go get k8s.io/controller-manager v0.31.0
    go get k8s.io/kms v0.31.0
    go get k8s.io/kubelet v0.31.0
    go get k8s.io/kubectl v0.31.0
    
    (konnectivity-client is not at 0.31 yet)
    
    Fixed API changes
    
    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    c9bb04f View commit details
    Browse the repository at this point in the history
  7. Add FRRConfiguration to factory

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    4bc1ff3 View commit details
    Browse the repository at this point in the history
  8. Reconcile RouteAdvertisements from cluster manager

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    e6563df View commit details
    Browse the repository at this point in the history
  9. Use RA status condition when reconciling networks

    Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
    jcaamano committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    754d12f View commit details
    Browse the repository at this point in the history