-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #256 from zong-zhe/add-with-logger
feat: add 'WithLogWriter' for api 'RunWithOpts'
- Loading branch information
Showing
6 changed files
with
112 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
pkg/api/test_data/test_run_pkg_in_path/test_run_with_no_log/kcl.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "dep_git_commit" | ||
edition = "0.0.1" | ||
version = "0.0.1" | ||
|
||
[dependencies] | ||
catalog = { git = "https://github.com/KusionStack/catalog.git", commit = "a29e3db" } |
45 changes: 45 additions & 0 deletions
45
pkg/api/test_data/test_run_pkg_in_path/test_run_with_no_log/main.k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import catalog.models.schema.v1 as ac | ||
import catalog.models.schema.v1.workload as wl | ||
import catalog.models.schema.v1.workload.container as c | ||
import catalog.models.schema.v1.workload.container.probe as p | ||
import catalog.models.schema.v1.monitoring as m | ||
|
||
ac.AppConfiguration { | ||
workload: wl.Service { | ||
containers: { | ||
"nginx": c.Container { | ||
image: "nginx:v1" | ||
# Run the following command as defined | ||
command: ["/bin/sh", "-c", "echo hi"] | ||
# Extra arguments append to command defined above | ||
args: ["/bin/sh", "-c", "echo hi"] | ||
env: { | ||
# An environment variable of name "env1" and value "VALUE" will be set | ||
"env1": "VALUE" | ||
# An environment variable of name "env2" and value of the key "key" in the | ||
# secret named "sec-name" will be set. | ||
"env2": "secret://sec-name/key" | ||
} | ||
# Run the command "/bin/sh -c echo hi", as defined above, in the directory "/tmp" | ||
workingDir: "/tmp" | ||
# Configure a HTTP readiness probe | ||
readinessProbe: p.Probe { | ||
probeHandler: p.Http { | ||
url: "http://localhost:80" | ||
} | ||
initialDelaySeconds: 10 | ||
} | ||
} | ||
} | ||
# Set the replicas | ||
replicas: 2 | ||
} | ||
# Add the monitoring configuration backed by Prometheus | ||
monitoring: m.Prometheus{ | ||
interval: "30s" | ||
timeout: "15s" | ||
path: "/metrics" | ||
port: "web" | ||
scheme: "http" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters