Skip to content

Commit 40c6742

Browse files
committed
chore: add example and upgrade version to 0.3.0
1 parent 29e3487 commit 40c6742

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

modules/network/example/dev/example_workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
modules:
22
network:
33
path: oci://ghcr.io/kusionstack/network
4-
version: 0.2.3
4+
version: 0.3.0
55
configs:
66
default:
77
port:

modules/network/example/dev/kcl.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name = "example"
44
[dependencies]
55
kam = { git = "https://github.com/KusionStack/kam.git", tag = "0.2.0" }
66
service = { oci = "oci://ghcr.io/kusionstack/service", tag = "0.2.0" }
7-
network = { oci = "oci://ghcr.io/kusionstack/network", tag = "0.2.3" }
7+
network = { oci = "oci://ghcr.io/kusionstack/network", tag = "0.3.0" }
88

99
[profile]
1010
entries = ["main.k"]

modules/network/example/dev/main.k

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import kam.v1.app_configuration as ac
33
import service
44
import service.container as c
55
import network as n
6+
import network.ingress as ni
67

78
nginx: ac.AppConfiguration {
89
workload: service.Service {
@@ -16,10 +17,39 @@ nginx: ac.AppConfiguration {
1617
"network": n.Network {
1718
ports: [
1819
n.Port {
19-
port: 80
20-
public: True
20+
port: 8080
21+
targetPort: 80
22+
public: False
2123
}
2224
]
25+
ingress: {
26+
defaultBackend: {
27+
service: {
28+
port: {
29+
number: 8080
30+
}
31+
}
32+
}
33+
rules: [
34+
{
35+
http: {
36+
paths: [
37+
{
38+
path: "/"
39+
pathType: "Prefix"
40+
backend: {
41+
service: {
42+
port: {
43+
number: 8080
44+
}
45+
}
46+
}
47+
}
48+
]
49+
}
50+
}
51+
]
52+
}
2353
}
2454
}
2555
}

modules/network/src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ TEST?=$$(go list ./... | grep -v 'vendor')
22
###### chang variables below according to your own modules ###
33
NAMESPACE=kusionstack
44
NAME=network
5-
VERSION=0.2.3
5+
VERSION=0.3.0
66
BINARY=../bin/kusion-module-${NAME}_${VERSION}
77

88
LOCAL_ARCH := $(shell uname -m)

0 commit comments

Comments
 (0)