You can specify a generated component instance revision with field
spec.components[*].externalRevision in Application like below:
If the field is not specified, it will generated by the name rule
After the Application created, it will generate a ControllerRevision object for each component.
- Get the revision for component instance
You can specify the component revision for component rolling update.
When the capabilities(Component or Trait) changes, KubeVela will generate a definition revision automatically.
- Check ComponentDefinition Revision
- Check TraitDefinition Revision
You can specify the revision with
@version approach, for example, if a user want to stick to using the
v1 revision of
In this way, if system admin changes the ComponentDefinition, it won't affect your application. If no revision specified, KubeVela will use the latest revision when you upgrade your application.
When updating an application entity except workflow, KubeVela will create a new revision as a snapshot for this change.
You can get all the information related with the application in the application revision, including the application spec, and all related definitions.
Live-diff helps you to have a preview of what would change if you're going to upgrade an application without making any changes to the living cluster. This feature is extremely useful for serious production deployment, and make the upgrade under control
It basically generates a diff between the specific revision of running instance and the local candidate application. The result shows the changes (added/modified/removed/no_change) of the application as well as its sub-resources, such as components and traits.
Assume we're going to upgrade the application like below.
Run live-diff like this:
--revision is a flag that specifies the name of a living ApplicationRevision with which you want to compare the updated application.
--context is a flag that specifies the number of lines shown around a change. The unchanged lines
which are out of the context of a change will be omitted. It's useful if the diff result contains a lot of unchanged content
while you just want to focus on the changed ones.
Click to view the details of diff result
Furthermore, you can integrate the revision for application snapshot and recovery with your own system.