Deprecate legacy heat driver

Log a warning about fedora-coreos Heat driver, with a note
encouraging users to migrate to modern CAPI drivers.

Change-Id: I45cf3bcf6e542319fed83613919d2e1398fcb2bb
This commit is contained in:
Jakub Darmach
2025-01-09 14:14:55 +01:00
parent 1c3d7d070b
commit 6e6a7d5f9f
3 changed files with 26 additions and 0 deletions

View File

@@ -13,6 +13,10 @@ best meets your needs and how to develop a driver for a new COE.
Section 10-15 describe the low level OpenStack infrastructure that is
created and managed by Magnum to support the COE's.
.. warning::
The heat driver described here is deprecated in favor of the k8s_capi_helm
or k8s_cluster_api driver and will be removed in a future Magnum version.
#. `Overview`_
#. `Python Client`_
#. `Horizon Interface`_

View File

@@ -269,6 +269,11 @@ class ClusterTemplatesController(base.Controller):
"different storage driver, such as overlay2. overlay2 will be set "
"as the default storage driver from Victoria cycle in Magnum.")
_heat_driver_deprecation_note = (
"The heat driver is deprecated in favor of the k8s_capi_helm or"
"k8s_cluster_api driver. Please migrate to one of the abovementioned."
"Heat driver will be removed in a future Magnum version.")
def _generate_name_for_cluster_template(self, context):
"""Generate a random name like: zeta-22-model."""
@@ -432,6 +437,12 @@ class ClusterTemplatesController(base.Controller):
DeprecationWarning)
LOG.warning(self._coreos_deprecation_note)
if (cluster_template_dict['coe'] == 'kubernetes' and
cluster_template_dict['cluster_distro'] == 'fedora-coreos'):
warnings.warn(self._heat_driver_deprecation_note,
DeprecationWarning)
LOG.warning(self._heat_driver_deprecation_note)
# NOTE(yuywz): We will generate a random human-readable name for
# cluster_template if the name is not specified by user.
arg_name = cluster_template_dict.get('name')

View File

@@ -0,0 +1,11 @@
---
deprecations:
- |
Deprecate the use of 'heat' driver in favor of modern
Kubernetes Cluster API based drivers: 'k8s_capi_helm' [1] or
'k8s_cluster_api' [2]. User still using 'heat' driver are encouraged to
migrate to one of the abovementioned as 'heat' driver will be removed in
the future.
[1] https://docs.openstack.org/magnum-capi-helm/latest/
[2] https://vexxhost.github.io/magnum-cluster-api/