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

cleanup PR: reflect SELinux policy in RTE DS and report Progressing condition message #1058

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Commits on Oct 30, 2024

  1. rte: set custom SELinux policy annotation in RTE DS

    When using legacy SELinux context, set that annotation to the RTE DS annotations to make it easy to identify which
    policy is being considered.
    
    Signed-off-by: Shereen Haj <[email protected]>
    shajmakh committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    0bbf0c1 View commit details
    Browse the repository at this point in the history
  2. ctrl: report message in status for Progressing condition

    So far when controller update is in progress it's either because RTEs
    are not yet ready or MCPs are not yet updated. One can learn that from
    examining the controller logs. This PR gives another option to reflect
     this info by reporting the extra info under the condition message both
    in the controller logs and in the operator `Status`.
    
    Signed-off-by: Shereen Haj <[email protected]>
    shajmakh committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    6f83d11 View commit details
    Browse the repository at this point in the history
  3. ctrl tests: fix expected MCP status

    Even if the MCP was not updated the controller will still be reporting
    it under the operator status. Due to previous adjustments, we are now
    seeing all MCPs under the status.
    
    This is wrong however and should change in next commit.
    
    Signed-off-by: Shereen Haj <[email protected]>
    shajmakh committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    cec802a View commit details
    Browse the repository at this point in the history
  4. ctrl: reflect MCPs under operator status only if updated

    So far the operator status was having the mcps set even if they are not
    updated. Fix this to reflect the MCPs only if they are updated while
    wait for the rest to get reconciled.
    
    Signed-off-by: Shereen Haj <[email protected]>
    shajmakh committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    b6977ac View commit details
    Browse the repository at this point in the history
  5. ctrl: verify reflecting the custom SELinux annotation in RTE

    Add controller tests to verify that when the annotation is set in the
    NROP CR it is also reflected under the RTE annotations and when it's
    deleted it also vanishes from the DS annotations.
    
    Signed-off-by: Shereen Haj <[email protected]>
    shajmakh committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    b94e381 View commit details
    Browse the repository at this point in the history
  6. ctrl: update RTE annotations and labels properly

    Labels and annotations and rarely set but the problem with the old code was that
    new sets are added on top of what exists in the current sets either
    update the value or add a new key:value pair. However, the case where
    the key:value pair is not found in the new set doesn't make a difference
    in the new map state and if the key is found in the current map it will
    still exist in the updated one, while the required is to omit it.
    Apart from the API validations, the controller doesn't validate the
    labels set nor the annotations.
    
    Signed-off-by: Shereen Haj <[email protected]>
    shajmakh committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    3dc13bc View commit details
    Browse the repository at this point in the history