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

pkg/controller: Fix panic when creating cluster-scoped RBAC in OG controller #2349

Commits on Sep 23, 2021

  1. pkg/controller: Fix panic when creating cluster-scoped RBAC in OG con…

    …troller
    
    Fixes [operator-framework#2091](operator-framework#2091).
    
    This is a follow-up to [operator-framework#2309](operator-framework#2309) that attempted to fix the original issue. When checking whether the ClusterRole/ClusterRoleBinding resources already exist, we're also checking whether the existing labels are owned by the CSV we're currently handling. When accessing the "cr" or "crb" variables that the Create calls output, a panic is produced as we're attempting to access the meta.Labels key from those resources, except those resources themselves are nil. Update the check to verify that the cr/crb variables are not nil before attempting to access those object's labels. The testing fake client may need to be updated in the future to handle returning these resources properly.
    
    Signed-off-by: timflannagan <timflannagan@gmail.com>
    timflannagan committed Sep 23, 2021
    Configuration menu
    Copy the full SHA
    c97edf6 View commit details
    Browse the repository at this point in the history
  2. test(og): de-flake sync unit tests

    njhale authored and timflannagan committed Sep 23, 2021
    Configuration menu
    Copy the full SHA
    ad27f33 View commit details
    Browse the repository at this point in the history