Skip to content

Commit 12ed601

Browse files
authored
feat: add test nginx (#136)
1 parent 7f69054 commit 12ed601

File tree

5 files changed

+51
-0
lines changed

5 files changed

+51
-0
lines changed

example/nginx/dev/kcl.mod

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[package]
2+
name = "nginx"
3+
edition = "0.1.0"
4+
version = "0.1.0"
5+
6+
[dependencies]
7+
catalog = { git = "https://github.com/KusionStack/catalog.git", tag = "0.1.1" }
8+
[profile]
9+
entries = ["main.k"]
10+

example/nginx/dev/kcl.mod.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[dependencies]
2+
[dependencies.catalog]
3+
name = "catalog"
4+
full_name = "catalog_0.1.1"
5+
version = "0.1.1"
6+
sum = "IYND73UKWuS/hWpVqxvZfxTxx7z8bVbTuFbEx1OuJNk="
7+
url = "https://github.com/KusionStack/catalog.git"
8+
git_tag = "0.1.1"

example/nginx/dev/main.k

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import catalog.models.schema.v1 as ac
2+
import catalog.models.schema.v1.workload as wl
3+
import catalog.models.schema.v1.workload.container as c
4+
import catalog.models.schema.v1.workload.network as n
5+
6+
nginx: ac.AppConfiguration {
7+
workload: wl.Service {
8+
containers: {
9+
wordpress: c.Container {
10+
image = "nginx:1.25.2"
11+
resources: {
12+
"cpu": "500m"
13+
"memory": "512Mi"
14+
}
15+
}
16+
}
17+
replicas: 1
18+
ports: [
19+
n.Port {
20+
type: "aliyun"
21+
port: 80
22+
protocol: "TCP"
23+
public: True
24+
}
25+
]
26+
}
27+
}

example/nginx/dev/stack.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# The stack basic info
2+
name: dev

example/nginx/project.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# The project basic info
2+
name: nginx
3+
generator:
4+
type: AppConfiguration

0 commit comments

Comments
 (0)