Skip to content

Commit 4fdfd5f

Browse files
committed
feat: update quickstart config codes
1 parent 0692bdf commit 4fdfd5f

File tree

5 files changed

+42
-34
lines changed

5 files changed

+42
-34
lines changed

example/quickstart/default/kcl.mod

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
[package]
2-
31
[dependencies]
4-
kam = { git = "https://github.com/KusionStack/kam.git", tag = "0.2.0" }
5-
service = { oci = "oci://ghcr.io/kusionstack/service", tag = "0.1.0" }
6-
mysql = { oci = "oci://ghcr.io/kusionstack/mysql", tag = "0.2.0" }
7-
network = { oci = "oci://ghcr.io/kusionstack/network", tag = "0.2.0" }
2+
kam = { git = "git://github.com/KusionStack/kam", tag = "0.2.2" }
3+
network = { oci = "oci://ghcr.io/kusionstack/network", tag = "0.3.0" }
4+
service = { oci = "oci://ghcr.io/kusionstack/service", tag = "0.2.1" }

example/quickstart/default/main.k

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,26 @@ import kam.v1.app_configuration as ac
33
import service
44
import service.container as c
55
import network as n
6-
import mysql
76

7+
# `main.k` declares the customized configuration codes for default stack.
8+
#
89
# Please replace the ${APPLICATION_NAME} with the name of your application, and complete the
910
# 'AppConfiguration' instance with your own workload and accessories.
1011
quickstart: ac.AppConfiguration {
11-
workload: service.Service {
12-
containers: {
13-
quickstart: c.Container {
14-
image: "kusionstack/kusion-quickstart:latest"
15-
env: {
16-
"DB_HOST": "$(KUSION_DB_HOST_QUICKSTART_DEFAULT_QUICKSTART_MYSQL)"
17-
"DB_USERNAME": "$(KUSION_DB_USERNAME_QUICKSTART_DEFAULT_QUICKSTART_MYSQL)"
18-
"DB_PASSWORD": "$(KUSION_DB_PASSWORD_QUICKSTART_DEFAULT_QUICKSTART_MYSQL)"
19-
}
20-
}
21-
}
22-
}
23-
accessories: {
24-
"network": n.Network {
25-
ports: [
26-
n.Port {
27-
port: 8080
28-
}
29-
]
30-
}
31-
"mysql": mysql.MySQL {
32-
type: "local"
33-
version: "8.0"
34-
}
35-
}
12+
workload: service.Service {
13+
containers: {
14+
quickstart: c.Container {
15+
image: "kusionstack/kusion-quickstart:latest"
16+
}
17+
}
18+
}
19+
accessories: {
20+
"network": n.Network {
21+
ports: [
22+
n.Port {
23+
port: 8080
24+
}
25+
]
26+
}
27+
}
3628
}

example/quickstart/default/stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# The metadata information of the stack.
2-
name: default
2+
name: default
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
modules:
2+
kam:
3+
path: git://github.com/KusionStack/kam
4+
version: 0.2.2
5+
configs:
6+
default: {}
7+
network:
8+
path: oci://ghcr.io/kusionstack/network
9+
version: 0.3.0
10+
configs:
11+
default: {}
12+
service:
13+
path: oci://ghcr.io/kusionstack/service
14+
version: 0.2.1
15+
configs:
16+
default: {}
17+
context:
18+
KUBECONFIG_PATH: /path/to/kubeconfig

example/quickstart/project.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
name: quickstart
1+
# The project basic info.
2+
name: quickstart

0 commit comments

Comments
 (0)