File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed
examples/kubevela/template-oam-app Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ [package]
2
+ name = " inherit-oam-app"
3
+ edition = " v0.10.0"
4
+ version = " 0.0.1"
5
+
6
+ [dependencies]
7
+ oam = " 0.2.1"
Original file line number Diff line number Diff line change
1
+ [dependencies]
2
+ [dependencies.k8s]
3
+ name = "k8s"
4
+ full_name = "k8s_1.31.2"
5
+ version = "1.31.2"
6
+ [dependencies.oam]
7
+ name = "oam"
8
+ full_name = "oam_0.2.1"
9
+ version = "0.2.1"
10
+ sum = "bz5HT/ggMm6heYVUOaZd5mOLIv/q2jicXupv0ChDlsE="
Original file line number Diff line number Diff line change
1
+ import oam
2
+
3
+ schema MyTemplate:
4
+ name: str
5
+ image: str
6
+ cmd?: [str]
7
+ port: int = 80
8
+
9
+ schema MyApplication[template: MyTemplate](oam.Application):
10
+ metadata = {name = "kcl-play-svc"}
11
+ spec = {
12
+ components = [{
13
+ name = metadata.name
14
+ type = "webservice"
15
+ properties = {
16
+ image = "kcllang/kcl"
17
+ ports = [{port = 80, expose = True}]
18
+ cmd = ["kcl", "play"]
19
+ }
20
+ }]
21
+ }
22
+
23
+ MyApplication({
24
+ name = "kcl-play-svc"
25
+ image = "kcllang/kcl"
26
+ cmd: ["kcl", "play"]
27
+ }) {}
You can’t perform that action at this time.
0 commit comments