Versioning Templates
Versioning a template allows you to make changes over time to a template while retaining the current version/iteration. Resources (for example virtual clusters, namespaces) that are deployed with templates that have updated versions show up with a warning indicating that a newer template version is available.
Template version strings​
When creating a virtual cluster from a template, you can specify a template version string. If omitted, the latest available version is selected by default.
You can use the X
wildcard in the major, minor, or patch components of the version string to enable automatic upgrades. This allows virtual clusters to automatically update to newer compatible versions of the template.
For example given a template version 1.0.0
:
- If you set the version string to
1.X.X
, and a new template version1.1.0
is added, the virtual cluster will automatically upgrade to1.1.0
. - If a version
2.0.0
is added instead, the virtual cluster is not upgraded, because the major version does not match.
To always upgrade to the latest available version, you can X.X.X
as the version string.
Avoid using X.X.X
unless necessary. Use the X
placeholder only in the minor or patch position—for example, 1.X.X
or 1.2.X
—to maintain greater control over version updates.
Create a template version​
You can add new versions to your templates using the UI. The steps are the same for all resources.
Alternatively, you can use a GitOps workflow by applying an updated VirtualClusterInstance
resource to the vCluster Platform cluster using tools such as kubectl
or Argo CD.
While not strictly mandatory, you should follow standard semantic versioning practices for your template versioning. vCluster Platform refers to the version numbers provided when determining whether to indicate if a template has a newer version available.
Select the Templates field on the left menu bar.
- Click the option for the resource you want to version on the templates pane.
Find the template you want to add a new version to in the list of templates. Click the dropdown list next to the name of your desired template. From the dropdown menu, click Add New Version.
In the pop-up window, enter the new version string for your App. Then, click .
In the menus displayed in the right, make any modifications desired for your new template version.
Click .
Update a template​
You can change the template and/or template version in the UI.
Select the Projects field on the left menu.
From the project dropdown menu, select the project containing the resource you want to update.
- Click the option on the project pane.
Click the dropdown arrow next to the name of the resource you want to modify.
In the dropdown menu, select Change Template.
In the pop-up window, select the name of the template from the drop-down list. The applied template is already selected, so if you are changing the template version, you don't need to do anything for this step.
If the template you are selecting has multiple versions, you might see an additional version dropdown menu next to the template selector dropdown. Select your desired template version from this menu.
Click .