Skip to content

docs: Unify handling of MetalK8s versions across documentation #3184

Open
@gdemonet

Description

@gdemonet

Component: docs

Why this is needed:

In some procedures, we use the |version| substitution variable to describe the current MetalK8s version, in others, we use placeholders (like X.Y.Z). This can be confusing, especially when procedures manipulate multiple MetalK8s versions.

What should be done:

To be defined. An available option is to specify (or derive from the documented version) the potential destination/source versions we could consider in docs, expressed as constraints:

version = "2.8.0-dev"
destination = {"max": "2.10", "min": "2.8.0"}
# assuming there is something preventing downgrade to 2.7.0 / 2.7.1
source = {"max": "2.8", "min": "2.7.2"}

We could then define more substitutions, like:

rst_epilog = """
.. |dest_version| replace:: {highest_dest}
.. |dest_max_version| replace:: {destination[max]}
.. |dest_min_version| replace:: {destination[min]}
""".format(
	destination=destination,
	highest_dest=_find_latest_tag(**destination),
)
"""

And use it in some common include file (e.g. docs/includes/destination_version_constraints.rst):

.. important::

   This procedures uses |dest_version| as an example destination
   version. If you desire to use another version, make sure it
   matches the following constraints:

   - it must be strictly lower than |dest_max_version|
   - it must be higher than or equal to |dest_min_version|

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions