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

StatusManager: consolidate status updates from different zones #3750

Merged
merged 7 commits into from
Nov 29, 2023

Commits on Nov 29, 2023

  1. Update code generation to include Apply client API.

    Update `update-codegen` script to always install
    latest controller-gen, so that `controller-gen.kubebuilder.io/version`
    on the generate object doesn't decrease. Also overwrite v1/apis
    folder for every crd to ensure the latest version is applied
    (deleting is required to ensure stale files will be deleted).
    
    Signed-off-by: Nadia Pinaeva <[email protected]>
    npinaeva committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    ccb0d96 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6219881 View commit details
    Browse the repository at this point in the history
  3. Create a generic level-driven controller functionality

    Signed-off-by: Nadia Pinaeva <[email protected]>
    npinaeva committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    7d39ab3 View commit details
    Browse the repository at this point in the history
  4. Create StatusManager - a centralized component responsible for updating

    the centralized status of an object, based on zone-specific statuses.
    Created as a part of cluster manager, handles only apbroutepolicy
    objects for now.
    
    Update AdminPolicyBasedRouteStatus.Messages to allow patching with
    merge strategy.
    
    Remove updated policy check based on timestamp,
    since LastTransitionTime precision is in seconds, and the whole test
    takes less than a second to complete, therefore all timestamps will
    be the same for multiple updates. Just checking expected policy state
    is enough for that test.
    
    Update unit tests to check Status.Messages instead of Status.Status
    
    Signed-off-by: Nadia Pinaeva <[email protected]>
    npinaeva committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    9c3ccc4 View commit details
    Browse the repository at this point in the history
  5. Add distributed status management for EgressFirewall.

    Add Status.Messages field to record statuses from zones,
    make egressfirewall status a subresource.
    
    Signed-off-by: Nadia Pinaeva <[email protected]>
    npinaeva committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    c8854ed View commit details
    Browse the repository at this point in the history
  6. Make StatusManager zone-aware. It will only set accumulated status when

    all zones have reported their statuses.
    To do so, ZoneTracker was added to StatusManager, which tracks
    existing zones and notifies its subscriber about zones changes.
    StatusManager will also cleanup status messages left by deleted zones.
    
    Signed-off-by: Nadia Pinaeva <[email protected]>
    npinaeva committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    fada6ae View commit details
    Browse the repository at this point in the history
  7. Fix linter bug

    Signed-off-by: Nadia Pinaeva <[email protected]>
    npinaeva committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    33b04b6 View commit details
    Browse the repository at this point in the history