Version Control for Definitions
When an OAM definition is updated, KubeVela will automatically generate a new revision of this definition.
To list the revisions of the webservice Component, run:
$ vela def get webservice --revisionsNAME REVISION TYPE HASHwebservice 1 Component dfa072dac5088ed8webservice 2 Component 519e11eb7cbe9cdd
To list the revisions of the affinity Trait, run:
$ vela def get affinity --revisionsNAME REVISION TYPE HASHaffinity 1 Trait 9db54dd8d5314bd5affinity 2 Trait 8bf3e82a6884db2c
To list the revisions of the override Policy, run:
$ vela def get override --revisionsNAME REVISION TYPE HASHoverride 1 Policy f6f87a5eb2271b8a
Note: there is only one revision of a definition if the definition has never been updated
To list the revisions of the deploy WorkflowStep, run:
$ vela def get deploy --revisionsNAME REVISION TYPE HASHdeploy 1 WorkflowStep 2ea741dae457850b
Users can specify the revision of a definition they would like to use by specifying definition types in the form <definition-name>@<definition-revision>.
For example, if a user wanted to use the v3 revision of webservice Component, they would use webservice@v3 as the type in their component specification.
apiVersion: core.oam.dev/v1beta1kind: Applicationmetadata:name: myappspec:components:- name: express-servertype: webservice@v3properties:image: stefanprodan/podinfo:4.0.3
This ensures that if an administrator of your KubeVela instance modifies the webservice definition, your application will not be affected.
If no revision is specified for a definition, KubeVela will use the latest revision available at evaluation time. This will usually be the next time you upgrade your application.
tip
Cluster administrators can create admission webhooks that will set a definition revision if the field is not set
Last updated on Feb 9, 2023 by dependabot[bot]