Skip to content

Commit 3387e0a

Browse files
committed
App: Fix openstack-operator app installation
When installing the `openstack-operator` it is correctly installed in the `openstack-operators` namespace, but because of this `kcli` also creates an `OperatorGroup` that 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 `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`. In this patch we make a small change to the `install.yml.j2` template so that the `targetNamespaces` is not created when deploying the openstack-operator. (cherry picked from commit dee7a94d98b0d50e17a6e8866c4e627fe20c7180)
1 parent 67a9f7f commit 3387e0a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kvirt/cluster/openshift/apps/install.yml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ kind: OperatorGroup
1111
metadata:
1212
name: {{ name }}-operatorgroup
1313
namespace: {{ namespace }}
14+
{% if namespace != 'openstack-operators' %}
1415
spec:
1516
targetNamespaces:
1617
- {{ namespace }}
18+
{% endif %}
1719
---
1820
{% endif %}
1921
apiVersion: operators.coreos.com/v1alpha1

0 commit comments

Comments
 (0)