-
Epic
-
Resolution: Done
-
Normal
-
rhos-18.0 Beta
-
None
-
Heat Operator webhook should allow null > something valid databaseInstance changes
-
False
-
-
False
-
?
-
No Docs Impact
-
?
-
?
-
0% To Do, 0% In Progress, 100% Done
-
-
-
2023Q4
-
Low
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
- duplicates
-
OSPRH-9281 Heat Operator webhook should allow null > something valid databaseInstance changes
- Closed