-
Bug
-
Resolution: Done
-
Normal
-
None
-
rhos-18.0 Beta
-
None
Summary
Heat Operator should allow the transition between `databaseInstance: null` to `databaseInstance: <somethingValid>` and not block with the webhook.
Details
When Heat is enabled in the `OpenStackControlPlane` without a setting for `databaseInstance` it will automatically be set to an empty string "":
[root@titan132 ospdo-migration]# oc get oscp openstack -o jsonpath='{.spec.heat}' | jq '. | "enabled=\(.enabled), databaseInstance=\(.template.databaseInstance)"' "enabled=false, databaseInstance=null"
If the user tries to change this to something valid during adoption, this change will be blocked by the webhook.
[root@titan132 ospdo-migration]# oc patch openstackcontrolplane openstack -n ${OSP18_NAMESPACE} --type=merge --patch '
spec:
heat:
enabled: true
apiOverride:
route: {}
template:
databaseInstance: openstack
databaseAccount: heat
secret: osp-secret
memcachedInstance: memcached
passwordSelectors:
authEncryptionKey: HeatAuthEncryptionKey
database: HeatDatabasePassword
service: HeatPassword
'
Warning: unknown field "spec.heat.template.passwordSelectors.database"
The OpenStackControlPlane "openstack" is invalid: spec.databaseInstance: Forbidden: Changing the DatabaseInstance is not supported for existing deployments
Expected behaviour
This action should be allowed by the webhook. So we need to first check if `databaseInstance` is empty, if it is then we can bypass the validation
- is duplicated by
-
OSPRH-9282 Heat Operator webhook should allow null > something valid databaseInstance changes
-
- Closed
-