Skip to content

Commit

Permalink
chore: add example and upgrade version to 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gshilei committed Dec 19, 2024
1 parent 29e3487 commit 40c6742
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/network/example/dev/example_workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
modules:
network:
path: oci://ghcr.io/kusionstack/network
version: 0.2.3
version: 0.3.0
configs:
default:
port:
Expand Down
2 changes: 1 addition & 1 deletion modules/network/example/dev/kcl.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name = "example"
[dependencies]
kam = { git = "https://github.com/KusionStack/kam.git", tag = "0.2.0" }
service = { oci = "oci://ghcr.io/kusionstack/service", tag = "0.2.0" }
network = { oci = "oci://ghcr.io/kusionstack/network", tag = "0.2.3" }
network = { oci = "oci://ghcr.io/kusionstack/network", tag = "0.3.0" }

[profile]
entries = ["main.k"]
34 changes: 32 additions & 2 deletions modules/network/example/dev/main.k
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import kam.v1.app_configuration as ac
import service
import service.container as c
import network as n
import network.ingress as ni

nginx: ac.AppConfiguration {
workload: service.Service {
Expand All @@ -16,10 +17,39 @@ nginx: ac.AppConfiguration {
"network": n.Network {
ports: [
n.Port {
port: 80
public: True
port: 8080
targetPort: 80
public: False
}
]
ingress: {
defaultBackend: {
service: {
port: {
number: 8080
}
}
}
rules: [
{
http: {
paths: [
{
path: "/"
pathType: "Prefix"
backend: {
service: {
port: {
number: 8080
}
}
}
}
]
}
}
]
}
}
}
}
2 changes: 1 addition & 1 deletion modules/network/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ TEST?=$$(go list ./... | grep -v 'vendor')
###### chang variables below according to your own modules ###
NAMESPACE=kusionstack
NAME=network
VERSION=0.2.3
VERSION=0.3.0
BINARY=../bin/kusion-module-${NAME}_${VERSION}

LOCAL_ARCH := $(shell uname -m)
Expand Down

0 comments on commit 40c6742

Please sign in to comment.