- 
                Notifications
    
You must be signed in to change notification settings  - Fork 156
 
App: Fix openstack-operator app installation #791
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
base: main
Are you sure you want to change the base?
Conversation
| 
           the information on whether to create an operator group comes from the olm spec of the operator  | 
    
          
 But we are still creating it after this patch, we are just not restricting it to a single namespaces.  | 
    
| 
           You can see in that picture the default behavior on the UI, and that is the Installation mode to be for All namespaces on the cluster, which is what this change does.  | 
    
Currently whenever an operator defines a preferred installation namespace we limit it's installation mode to that specific namespace of the cluster. This goes against the default behavior of the web console, where the default (if the operator supports it) is to install it for all namespaces of the cluster. In this patch we change kcli to behave like the web console, so even if the operator is installed in the desired namespace it will only be restricted to that namespace if it doesn't support `AllNamespaces`. This is important because there are operators, like the openstack operator, that expects them to handle all the namespaces. When that's not the case the installation of OpenStack in OpenShift (following deployment guides) will not work, and we'll get the following error when creating a valid `OpenStackControlPlane` object in the `openstack` namespace: ``` The OpenStackControlPlane "rhoso" is invalid: * spec.galera.templates.openstack.storageClass: Required value * spec.galera.templates.openstack-cell1.storageClass: Required value * spec.glance.template.glanceAPIs.default.containerImage: Required value * spec.glance.template.imageCache: Required value * spec.barbican.template.serviceAccount: Required value * spec.nova.template.apiContainerImageURL: Required value * spec.nova.template.computeContainerImageURL: Required value * spec.nova.template.conductorContainerImageURL: Required value * spec.nova.template.metadataContainerImageURL: Required value * spec.nova.template.novncproxyContainerImageURL: Required value * spec.nova.template.schedulerContainerImageURL: Required value * <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation ``` This is because the mutating webhooks are restricted by the `targetNamespaces`.
3387e0a    to
    9dba5bd      
    Compare
  
    | 
           I have made a change to the approach, now I use the information from the package manifest ( I haven't tested the approach, but if you are ok with this approach I will.  | 
    
5e8e6a9    to
    39ec49b      
    Compare
  
    211ad8e    to
    a05e93a      
    Compare
  
    202b451    to
    3683b77      
    Compare
  
    28d0b9f    to
    1ceba51      
    Compare
  
    
When installing the
openstack-operatorit is correctly installed in theopenstack-operatorsnamespace, but because of thiskclialso creates anOperatorGroupthat is limiting the namespaces where it will take effect.This means that following the installation of OpenStack in OpenShift will not work, and we'll get the following error when creating a valid
OpenStackControlPlaneobject in theopenstacknamespace:This is because the mutating webhooks are restricted by the
targetNamespaces.In this patch we make a small change to the
install.yml.j2template so that thetargetNamespacesis not created when deploying the openstack-operator.(cherry picked from commit dee7a94d98b0d50e17a6e8866c4e627fe20c7180)