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

Allow configuring a default namespace for operators #204

Commits on Feb 19, 2024

  1. Rearrange code

    This commit only moves some definitions around so that things are in a
    more consistent order, which may help other refactoring work.
    
    Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
    JustinKuli committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    cad22dd View commit details
    Browse the repository at this point in the history
  2. Add a default namespace for operators

    This will allow OperatorPolicies to use a default namespace when the
    user does not specify one in the policy. For example, on OpenShift, it's
    conventional to install operators to the openshift-operators namespace
    when they are cluster-wide. This default namespace is set via a command
    line flag, so it can be customized per deployment.
    
    This commit also adds a validation condition to OperatorPolicy, for
    reporting when the subscription or operatorgroup specs are invalid.
    
    Refs:
     - https://issues.redhat.com/browse/ACM-9896
    
    Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
    JustinKuli committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    f03275d View commit details
    Browse the repository at this point in the history
  3. Make OperatorPolicy RelatedObjects optional

    Other status fields are not required, and this field was specifically
    causing an issue for the new validation condition, since it does not
    have any relatedObjects associated with it.
    
    This both fixes the CRD and the behavior of the controller (so that
    field is always set) so that if the CRD on the cluster is still the
    old one, the controller will not get stuck.
    
    Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
    JustinKuli committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    98f2a68 View commit details
    Browse the repository at this point in the history