Skip to content

Commit 6c0cf65

Browse files
authored
Merge pull request kubevela#1346 from Chaitanyareddy0702/update-docs-v1.10
Update docs v1.10
2 parents 86eb342 + 89b0dea commit 6c0cf65

File tree

1,578 files changed

+107368
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,578 files changed

+107368
-13
lines changed
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
---
2+
title: Definition Version Control
3+
---
4+
5+
## Introduction
6+
KubeVela supports Semantic Versioning for all types of [Definitions](../getting-started/definition), providing control over which versions of Definitions are used in Applications. This feature enables to specify exact version or version range for Definitions, enforce Semantic Versioning, and manage automatic upgrades of Definitions within KubeVela Applications.
7+
8+
## Feature Overview
9+
1. Semantic Versioning for Definition
10+
11+
Definition versions are defined using Semantic Versioning, which follows the format MAJOR.MINOR.PATCH. This ensures control over how components evolve.
12+
13+
2. Auto-Upgrade Control
14+
15+
KubeVela allows control over whether Applications automatically upgrade to newer Definition versions when they are available. The `app.oam.dev/autoUpdate` annotation is used to enable or disable auto-upgrade behavior.
16+
17+
- Auto-update enabled: The application automatically uses the latest compatible version of a Definition.
18+
- Auto-update disabled: The application sticks to the specified version even if a new version of the Definition is released.
19+
20+
3. Version Range Control
21+
22+
You can specify either an exact version or a version range for Definition in your application. If a version range is used, KubeVela will select the latest version that fits within the range.
23+
24+
```
25+
Note: If `app.oam.dev/autoUpdate annotation` is set to `false` or not specified in application, the application will use explicitly specified specified or latest component version.
26+
```
27+
28+
## User Guide
29+
1. Create a `configmap-component` ComponentDefinition with `1.2.5` version
30+
```
31+
apiVersion: core.oam.dev/v1beta1
32+
kind: ComponentDefinition
33+
metadata:
34+
name: configmap-component
35+
namespace: vela-system
36+
spec:
37+
version: 1.2.5 # Specify the component version using Semantic Versioning
38+
schematic:
39+
cue:
40+
template: |
41+
output: {
42+
apiVersion: "v1"
43+
kind: "ConfigMap"
44+
metadata: {
45+
name: "comptest"
46+
}
47+
data: {
48+
version: "125"
49+
}
50+
}
51+
52+
workload:
53+
definition:
54+
apiVersion: v1
55+
kind: ConfigMap
56+
```
57+
58+
2. Create a `configmap-component` ComponentDefinition with `2.0.5` version
59+
```apiVersion: core.oam.dev/v1beta1
60+
kind: ComponentDefinition
61+
metadata:
62+
name: configmap-component
63+
namespace: vela-system
64+
spec:
65+
version: 2.5.0 # Specify the component version using Semantic Versioning
66+
schematic:
67+
cue:
68+
template: |
69+
output: {
70+
apiVersion: "v1"
71+
kind: "ConfigMap"
72+
metadata: {
73+
name: "comptest"
74+
}
75+
data: {
76+
version: "250"
77+
}
78+
}
79+
80+
workload:
81+
definition:
82+
apiVersion: v1
83+
kind: ConfigMap
84+
```
85+
3. List the DefinitionRevisions.
86+
```
87+
kubectl get definitionrevision -n vela-system | grep -i my-component
88+
my-component-v1.2.5 1 1a4f3ac77e4fcfef Component
89+
my-component-v2.5.0 2 e61e9b5e55b01c2b Component
90+
```
91+
92+
4. Create Application using `configmap-component@v1.2` version and enable the Auto Update using `app.oam.dev/autoUpdate` annotation.
93+
```apiVersion: core.oam.dev/v1beta1
94+
kind: Application
95+
metadata:
96+
name: test-app
97+
namespace: test
98+
annotations:
99+
app.oam.dev/autoUpdate: "true" # Enable automatic upgrades
100+
spec:
101+
components:
102+
- name: test-configmap
103+
type: my-component@v1 # Use the latest version in the 'v1' range
104+
```
105+
106+
Expected Behavior:
107+
- Application will use `configmap-component@v1.2.5`, as `1.2.5` is highest version in specified range(`1`).
108+
109+
6. Create a `configmap-component` ComponentDefinition with `1.2.7` version
110+
```
111+
apiVersion: core.oam.dev/v1beta1
112+
kind: ComponentDefinition
113+
metadata:
114+
name: configmap-component
115+
namespace: vela-system
116+
spec:
117+
version: 1.2.7 # Specify the component version using Semantic Versioning
118+
schematic:
119+
cue:
120+
template: |
121+
output: {
122+
apiVersion: "v1"
123+
kind: "ConfigMap"
124+
metadata: {
125+
name: "comptest"
126+
}
127+
data: {
128+
version: "127"
129+
}
130+
}
131+
132+
workload:
133+
definition:
134+
apiVersion: v1
135+
kind: ConfigMap
136+
```
137+
Expected Behavior:
138+
- After the Application is reconciled, it will use `configmap-component@v1.2.7`, as `1.2.7` is the latest version within the specified range (1).
139+
140+
7. List the DefinitionRevisions.
141+
```kubectl get definitionrevision -n vela-system | grep -i my-component
142+
my-component-v1.2.5 1 1a4f3ac77e4fcfef Component
143+
my-component-v1.2.7 3 86d7fb1a36566dea Component
144+
my-component-v2.5.0 2 e61e9b5e55b01c2b Component
145+
````

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = {
3131
id: 'start',
3232
content:
3333
'<div class="header-item">⭐️ If you like KubeVela, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/kubevela/kubevela">GitHub</a>!⭐️</div>' +
34-
'<div class="header-item"><span>KubeVela v1.9.0 is now available.(2023-06-15)</span> <a target="_blank" style="color: var(--ifm-color-primary)" rel="noopener noreferrer" href="https://github.com/kubevela/kubevela/releases/tag/v1.9.0">Read Release Note</a></div>',
34+
'<div class="header-item"><span>KubeVela v1.10.0 is now available.(2025-02-06)</span> <a target="_blank" style="color: var(--ifm-color-primary)" rel="noopener noreferrer" href="https://github.com/kubevela/kubevela/releases/tag/v1.10.0">Read Release Note</a></div>',
3535
},
3636
algolia: {
3737
appId: 'PXMFHFWUGZ',

i18n/zh/docusaurus-plugin-content-docs/current/reference/addons/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Source code of this addon are all here: https://github.com/kubevela/catalog/tree
2020

2121
* [Prometheus Server](../../platform-engineers/operations/observability.md): Collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.
2222
* [Node Exporter](../../platform-engineers/operations/observability.md): Prometheus exporter for hardware and OS metrics exposed by *NIX kernels, written in Go with pluggable metric collectors.
23-
* [Mysql Exporter](./mysql-exporter): Prometheus exporter for MySQL server metrics.
23+
* [Mysql Exporter](../../../../../../docs/reference/addons/mysql-exporter): Prometheus exporter for MySQL server metrics.
2424
* [Grafana](../../platform-engineers/operations/observability.md): Grafana is an open source, feature rich metrics dashboard and graph editor for Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB.
2525
* [Loki](../../platform-engineers/operations/o11y/logging.md): A log aggregation system designed to store and query logs from all your applications and infrastructure.
2626
* [Kube State Metrics](../../platform-engineers/operations/observability.md): A simple service that listens to the Kubernetes API server and generates metrics about the state of the objects.
@@ -62,11 +62,11 @@ Source code of this addon are all here: https://github.com/kubevela/catalog/tree
6262

6363
## Storage
6464

65-
* [ChartMuseum](./chartmuseum): An open-source and easy to deploy Helm Chart Repository server.
65+
* [ChartMuseum](../../../../../../docs/reference/addons/chartmuseum): An open-source and easy to deploy Helm Chart Repository server.
6666

6767
## SaaS Workload
6868

69-
* [netlify](./netlify): Netlify is a SaaS platform that can serve website especially for frontend service, it provides free allowances that was pretty cool to be used for demo and test.
69+
* [netlify](../../../../../../docs/reference/addons/netlify): Netlify is a SaaS platform that can serve website especially for frontend service, it provides free allowances that was pretty cool to be used for demo and test.
7070

7171
## Developer Tools
7272

0 commit comments

Comments
 (0)