Skip to content

Commit 6e6a7d5

Browse files
committed
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
1 parent 1c3d7d0 commit 6e6a7d5

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

doc/source/user/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ best meets your needs and how to develop a driver for a new COE.
1313
Section 10-15 describe the low level OpenStack infrastructure that is
1414
created and managed by Magnum to support the COE's.
1515

16+
.. warning::
17+
The heat driver described here is deprecated in favor of the k8s_capi_helm
18+
or k8s_cluster_api driver and will be removed in a future Magnum version.
19+
1620
#. `Overview`_
1721
#. `Python Client`_
1822
#. `Horizon Interface`_

magnum/api/controllers/v1/cluster_template.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@ class ClusterTemplatesController(base.Controller):
269269
"different storage driver, such as overlay2. overlay2 will be set "
270270
"as the default storage driver from Victoria cycle in Magnum.")
271271

272+
_heat_driver_deprecation_note = (
273+
"The heat driver is deprecated in favor of the k8s_capi_helm or"
274+
"k8s_cluster_api driver. Please migrate to one of the abovementioned."
275+
"Heat driver will be removed in a future Magnum version.")
276+
272277
def _generate_name_for_cluster_template(self, context):
273278
"""Generate a random name like: zeta-22-model."""
274279

@@ -432,6 +437,12 @@ def post(self, cluster_template):
432437
DeprecationWarning)
433438
LOG.warning(self._coreos_deprecation_note)
434439

440+
if (cluster_template_dict['coe'] == 'kubernetes' and
441+
cluster_template_dict['cluster_distro'] == 'fedora-coreos'):
442+
warnings.warn(self._heat_driver_deprecation_note,
443+
DeprecationWarning)
444+
LOG.warning(self._heat_driver_deprecation_note)
445+
435446
# NOTE(yuywz): We will generate a random human-readable name for
436447
# cluster_template if the name is not specified by user.
437448
arg_name = cluster_template_dict.get('name')
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
deprecations:
3+
- |
4+
Deprecate the use of 'heat' driver in favor of modern
5+
Kubernetes Cluster API based drivers: 'k8s_capi_helm' [1] or
6+
'k8s_cluster_api' [2]. User still using 'heat' driver are encouraged to
7+
migrate to one of the abovementioned as 'heat' driver will be removed in
8+
the future.
9+
10+
[1] https://docs.openstack.org/magnum-capi-helm/latest/
11+
[2] https://vexxhost.github.io/magnum-cluster-api/

0 commit comments

Comments
 (0)