File tree Expand file tree Collapse file tree 15 files changed +103
-78
lines changed Expand file tree Collapse file tree 15 files changed +103
-78
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ name = "nginx"
3
3
version = " 0.1.0"
4
4
5
5
[dependencies]
6
- catalog = { git = " https://github.com/KusionStack/catalog.git" , tag = " 0.1.2" }
6
+ kam = { git = " https://github.com/KusionStack/kam.git" , tag = " 0.1.0" }
7
+ network = { oci = " oci://ghcr.io/kusionstack/network" , tag = " 0.1.0" }
7
8
8
9
[profile]
9
10
entries = [" main.k" ]
Original file line number Diff line number Diff line change 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
1
+ import kam.v1.app_configuration as ac
2
+ import kam .v1.workload as wl
3
+ import kam .v1.workload.container as c
4
+ import network as n
5
5
6
6
nginx: ac.AppConfiguration {
7
7
workload: wl.Service {
@@ -15,12 +15,16 @@ nginx: ac.AppConfiguration {
15
15
}
16
16
}
17
17
replicas: 1
18
- ports: [
19
- n.Port {
20
- port: 80
21
- protocol: "TCP"
22
- public: True
23
- }
24
- ]
18
+ }
19
+ accessories: {
20
+ "network": n.Network {
21
+ ports: [
22
+ n.Port {
23
+ port: 80
24
+ protocol: "TCP"
25
+ public: True
26
+ }
27
+ ]
28
+ }
25
29
}
26
30
}
Original file line number Diff line number Diff line change 1
- import catalog.models.schema.v1 as ac
2
- import catalog.models.schema .v1.workload as wl
3
- import catalog.models.schema. v1.workload.network as n
4
- import catalog.models.schema.v1.workload.container as c
1
+ import kam.v1.app_configuration as ac
2
+ import kam .v1.workload as wl
3
+ import kam. v1.workload.container as c
4
+ import network as n
5
5
6
6
echoserver: ac.AppConfiguration {
7
7
workload: wl.Service {
@@ -15,10 +15,14 @@ echoserver: ac.AppConfiguration {
15
15
}
16
16
}
17
17
replicas: 1
18
- ports: [
19
- n.Port {
20
- port: 80
21
- }
22
- ]
18
+ }
19
+ accessories: {
20
+ "network": n.Network {
21
+ ports: [
22
+ n.Port {
23
+ port: 80
24
+ }
25
+ ]
26
+ }
23
27
}
24
28
}
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ name = "service-multi-stack-dev"
3
3
version = " 0.1.0"
4
4
5
5
[dependencies]
6
- catalog = { git = " https://github.com/KusionStack/catalog.git" , tag = " 0.1.2" }
6
+ kam = { git = " https://github.com/KusionStack/kam.git" , tag = " 0.1.0" }
7
+ network = { oci = " oci://ghcr.io/kusionstack/network" , tag = " 0.1.0" }
7
8
8
9
[profile]
9
10
entries = [" ../base/base.k" , " main.k" ]
Original file line number Diff line number Diff line change 1
- import catalog.models.schema.v1 as ac
1
+ import kam.v1.app_configuration as ac
2
2
3
3
# main.k declares customized configurations for dev stack.
4
4
echoserver: ac.AppConfiguration {
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ name = "service-multi-stack-prod"
3
3
version = " 0.1.0"
4
4
5
5
[dependencies]
6
- catalog = { git = " https://github.com/KusionStack/catalog.git" , tag = " 0.1.2" }
6
+ kam = { git = " https://github.com/KusionStack/kam.git" , tag = " 0.1.0" }
7
+ network = { oci = " oci://ghcr.io/kusionstack/network" , tag = " 0.1.0" }
7
8
8
9
[profile]
9
10
entries = [" ../base/base.k" , " main.k" ]
11
+
Original file line number Diff line number Diff line change 1
- import catalog.models.schema.v1 as ac
1
+ import kam.v1.app_configuration as ac
2
2
3
3
# main.k declares customized configurations for prod stack.
4
4
echoserver: ac.AppConfiguration {
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ name = "simple-job"
3
3
version = " 0.1.0"
4
4
5
5
[dependencies]
6
- catalog = { git = " https://github.com/KusionStack/catalog .git" , tag = " 0.1.2 " }
6
+ kam = { git = " https://github.com/KusionStack/kam .git" , tag = " 0.1.0 " }
7
7
8
8
[profile]
9
9
entries = [" main.k" ]
10
+
Original file line number Diff line number Diff line change 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
1
+ import kam.v1.app_configuration as ac
2
+ import kam .v1.workload as wl
3
+ import kam .v1.workload.container as c
4
4
5
5
helloworld: ac.AppConfiguration {
6
6
workload: wl.Job {
Original file line number Diff line number Diff line change @@ -3,7 +3,10 @@ name = "simple-service"
3
3
version = " 0.1.0"
4
4
5
5
[dependencies]
6
- catalog = { git = " https://github.com/KusionStack/catalog.git" , tag = " 0.1.2" }
6
+ kam = { git = " https://github.com/KusionStack/kam.git" , tag = " 0.1.0" }
7
+ network = { oci = " oci://ghcr.io/kusionstack/network" , tag = " 0.1.0" }
8
+ opsrule = { oci = " oci://ghcr.io/kusionstack/opsrule" , tag = " 0.1.0" }
9
+ monitoring = { oci = " oci://ghcr.io/kusionstack/monitoring" , tag = " 0.1.0" }
7
10
8
11
[profile]
9
12
entries = [" main.k" ]
Original file line number Diff line number Diff line change 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.container.probe as p
5
- import catalog.models.schema.v1.workload.network as n
6
- import catalog.models.schema.v1.monitoring as m
7
- import catalog.models.schema.v1.trait as t
1
+ import kam.v1.app_configuration as ac
2
+ import kam .v1.workload as wl
3
+ import kam .v1.workload.container as c
4
+ import kam .v1.workload.container.probe as p
5
+ import monitoring as m
6
+ import opsrule as o
7
+ import network as n
8
8
9
9
helloworld: ac.AppConfiguration {
10
10
workload: wl.Service {
@@ -29,20 +29,21 @@ helloworld: ac.AppConfiguration {
29
29
}
30
30
}
31
31
replicas: 2
32
- # Comment the following block to un-expose service
33
- ports: [
34
- n.Port {
35
- port: 8080
36
- targetPort: 80
37
- }
38
- ]
39
- }
40
- # Comment the following block to remove opsRule
41
- opsRule: t.OpsRule {
42
- maxUnavailable: "30%"
43
32
}
44
- # Comment the following block to disable monitoring
45
- monitoring: m.Prometheus{
46
- path: "/metrics"
33
+ accessories: {
34
+ "network": n.Network {
35
+ ports: [
36
+ n.Port {
37
+ port: 8080
38
+ targetPort: 80
39
+ }
40
+ ]
41
+ }
42
+ "monitoring": m.Prometheus {
43
+ path: "/metrics"
44
+ }
45
+ "opsRule": o.OpsRule {
46
+ maxUnavailable: "30%"
47
+ }
47
48
}
48
49
}
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ name = "wordpress-cloud-rds"
3
3
version = " 0.1.0"
4
4
5
5
[dependencies]
6
- catalog = { git = " https://github.com/KusionStack/catalog.git" , tag = " 0.1.2" }
6
+ mysql = { oci = " oci://ghcr.io/kusionstack/mysql" , tag = " 0.1.0" }
7
+ kam = { git = " https://github.com/KusionStack/kam.git" , tag = " 0.1.0" }
8
+ network = { oci = " oci://ghcr.io/kusionstack/network" , tag = " 0.1.0" }
7
9
8
10
[profile]
9
11
entries = [" main.k" ]
Original file line number Diff line number Diff line change 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
- import catalog.models.schema.v1.accessories. mysql
1
+ import kam.v1.app_configuration as ac
2
+ import kam .v1.workload as wl
3
+ import kam .v1.workload.container as c
4
+ import network as n
5
+ import mysql as m
6
6
7
7
# main.k declares customized configurations for prod stacks.
8
8
wordpress: ac.AppConfiguration {
@@ -23,14 +23,16 @@ wordpress: ac.AppConfiguration {
23
23
}
24
24
}
25
25
replicas: 1
26
- ports: [
27
- n.Port {
28
- port: 80
29
- }
30
- ]
31
26
}
32
- database: {
33
- wordpress: mysql.MySQL {
27
+ accessories: {
28
+ "network": n.Network {
29
+ ports: [
30
+ n.Port {
31
+ port: 80
32
+ }
33
+ ]
34
+ }
35
+ "mysql": m.MySQL {
34
36
type: "cloud"
35
37
version: "8.0"
36
38
}
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ name = "wordpress-local-db"
3
3
version = " 0.1.0"
4
4
5
5
[dependencies]
6
- catalog = { git = " https://github.com/KusionStack/catalog.git" , tag = " 0.1.2" }
6
+ kam = { git = " https://github.com/KusionStack/kam.git" , tag = " 0.1.0" }
7
+ network = { oci = " oci://ghcr.io/kusionstack/network" , tag = " 0.1.0" }
8
+ mysql = { oci = " oci://ghcr.io/kusionstack/mysql" , tag = " 0.1.0" }
7
9
8
10
[profile]
9
11
entries = [" main.k" ]
Original file line number Diff line number Diff line change 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
- import catalog.models.schema.v1.accessories. mysql
1
+ import kam.v1.app_configuration as ac
2
+ import kam .v1.workload as wl
3
+ import kam .v1.workload.container as c
4
+ import network as n
5
+ import mysql as m
6
6
7
7
# main.k declares customized configurations for prod stack.
8
8
wordpress: ac.AppConfiguration {
@@ -19,15 +19,17 @@ wordpress: ac.AppConfiguration {
19
19
}
20
20
}
21
21
replicas: 1
22
- ports: [
23
- n.Port {
24
- port: 80
25
- }
26
- ]
27
22
}
28
- database: {
29
- wordpress: mysql.MySQL {
30
- type: "local"
23
+ accessories: {
24
+ "network": n.Network {
25
+ ports: [
26
+ n.Port {
27
+ port: 80
28
+ }
29
+ ]
30
+ }
31
+ "mysql": m.MySQL {
32
+ type: "local"
31
33
version: "8.0"
32
34
}
33
35
}
You can’t perform that action at this time.
0 commit comments