Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions example/quickstart/default/kcl.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
[package]

[dependencies]
kam = { git = "https://github.com/KusionStack/kam.git", tag = "0.2.0" }
service = { oci = "oci://ghcr.io/kusionstack/service", tag = "0.1.0" }
mysql = { oci = "oci://ghcr.io/kusionstack/mysql", tag = "0.2.0" }
network = { oci = "oci://ghcr.io/kusionstack/network", tag = "0.2.0" }
kam = { git = "git://github.com/KusionStack/kam", tag = "0.2.2" }
network = { oci = "oci://ghcr.io/kusionstack/network", tag = "0.3.0" }
service = { oci = "oci://ghcr.io/kusionstack/service", tag = "0.2.1" }
44 changes: 18 additions & 26 deletions example/quickstart/default/main.k
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,26 @@ import kam.v1.app_configuration as ac
import service
import service.container as c
import network as n
import mysql

# `main.k` declares the customized configuration codes for default stack.
#
# Please replace the ${APPLICATION_NAME} with the name of your application, and complete the
# 'AppConfiguration' instance with your own workload and accessories.
quickstart: ac.AppConfiguration {
workload: service.Service {
containers: {
quickstart: c.Container {
image: "kusionstack/kusion-quickstart:latest"
env: {
"DB_HOST": "$(KUSION_DB_HOST_QUICKSTART_DEFAULT_QUICKSTART_MYSQL)"
"DB_USERNAME": "$(KUSION_DB_USERNAME_QUICKSTART_DEFAULT_QUICKSTART_MYSQL)"
"DB_PASSWORD": "$(KUSION_DB_PASSWORD_QUICKSTART_DEFAULT_QUICKSTART_MYSQL)"
}
}
}
}
accessories: {
"network": n.Network {
ports: [
n.Port {
port: 8080
}
]
}
"mysql": mysql.MySQL {
type: "local"
version: "8.0"
}
}
workload: service.Service {
containers: {
quickstart: c.Container {
image: "kusionstack/kusion-quickstart:latest"
}
}
}
accessories: {
"network": n.Network {
ports: [
n.Port {
port: 8080
}
]
}
}
}
2 changes: 1 addition & 1 deletion example/quickstart/default/stack.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# The metadata information of the stack.
name: default
name: default
18 changes: 18 additions & 0 deletions example/quickstart/default/workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
modules:
kam:
path: git://github.com/KusionStack/kam
version: 0.2.2
configs:
default: {}
network:
path: oci://ghcr.io/kusionstack/network
version: 0.3.0
configs:
default: {}
service:
path: oci://ghcr.io/kusionstack/service
version: 0.2.1
configs:
default: {}
context:
KUBECONFIG_PATH: /path/to/kubeconfig
3 changes: 2 additions & 1 deletion example/quickstart/project.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
name: quickstart
# The project basic info.
name: quickstart
Loading