Skip to content

Commit 4b6fc44

Browse files
authored
chore(limits): modify limits cmd annotation
1 parent 7699475 commit 4b6fc44

File tree

7 files changed

+27
-15
lines changed

7 files changed

+27
-15
lines changed

cmd/pts.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ func printProcessTypeDetail(d *DryccCmd, ptypeStates api.PtypeStates, events api
169169
tpt.Append([]string{"", fmt.Sprintf("%s from %s", mount.MountPath, mount.Name)})
170170
}
171171
}
172+
sp := getHealthcheckString("", "", &containerState.StartupProbe)
173+
if sp != "" {
174+
tpt.Append([]string{"Startup:", strings.TrimSpace(sp)})
175+
}
172176
lp := getHealthcheckString("", "", &containerState.LivenessProbe)
173177
if lp != "" {
174178
tpt.Append([]string{"Liveness:", strings.TrimSpace(lp)})

cmd/volumes.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ func (d *DryccCmd) volumesClientCp(appID, src, dst string) error {
291291
if err != nil {
292292
return err
293293
}
294+
if urlpath == "" || urlpath == "/" {
295+
return fmt.Errorf("path is a directory, not a file")
296+
}
294297
res, err := volumes.GetFile(s.Client, appID, name, urlpath)
295298
if err != nil {
296299
return err
@@ -302,7 +305,7 @@ func (d *DryccCmd) volumesClientCp(appID, src, dst string) error {
302305
dst = path.Join(dst, arrays[len(arrays)-1])
303306
}
304307
}
305-
w, err := os.OpenFile(dst, os.O_CREATE|os.O_WRONLY, 0644)
308+
w, err := os.OpenFile(dst, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
306309
if err != nil {
307310
return err
308311
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.22
55
require (
66
github.com/containerd/console v1.0.4
77
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
8-
github.com/drycc/controller-sdk-go v0.0.0-20240710072101-82db20de8e4a
8+
github.com/drycc/controller-sdk-go v0.0.0-20240712012621-75bd5ebae3da
99
github.com/drycc/pkg v0.0.0-20240225112316-78fc9239f51f
1010
github.com/olekukonko/tablewriter v0.0.5
1111
github.com/stretchr/testify v1.9.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
44
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
55
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ=
66
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
7-
github.com/drycc/controller-sdk-go v0.0.0-20240710072101-82db20de8e4a h1:ETfWMgVW7ZR5PqFwnaCYbZHsejFym/vPdsv5RLTjNkE=
8-
github.com/drycc/controller-sdk-go v0.0.0-20240710072101-82db20de8e4a/go.mod h1:n6eQe1irJqjwLo/7t9+Dhdv6faSESQN+ATnZRBP3/Uc=
7+
github.com/drycc/controller-sdk-go v0.0.0-20240712012621-75bd5ebae3da h1:tNidQf7Aey4QTNC5oFHG8SAEwuXA74DZQjJYABKToVg=
8+
github.com/drycc/controller-sdk-go v0.0.0-20240712012621-75bd5ebae3da/go.mod h1:n6eQe1irJqjwLo/7t9+Dhdv6faSESQN+ATnZRBP3/Uc=
99
github.com/drycc/pkg v0.0.0-20240225112316-78fc9239f51f h1:kgjvUQJeAszDoU1Vo4vTTE92KI8Av3JPb6Qn890niXg=
1010
github.com/drycc/pkg v0.0.0-20240225112316-78fc9239f51f/go.mod h1:n+QxGif6ha9CEoxVnlipxb9IdmerybcUSzTEDFkvjiA=
1111
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=

parser/healthchecks.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,20 @@ Sets healthchecks for an application.
8282
8383
By default, Workflow only checks that the application starts in their Container. A health
8484
check may be added by configuring a health check probe for the application. The health
85-
checks are implemented as Kubernetes Container Probes. A 'liveness' and a 'readiness'
86-
probe can be configured, and each probe can be of type 'httpGet', 'exec' or 'tcpSocket'
87-
depending on the type of probe the Container requires.
85+
checks are implemented as Kubernetes Container Probes. A 'startupProbe' 'livenessProbe'
86+
and a 'readinessProbe' can be configured, and each probe can be of type 'httpGet', 'exec'
87+
or 'tcpSocket' depending on the type of probe the Container requires.
8888
89-
A 'liveness' probe is useful for applications running for long periods of time, eventually
89+
A 'startupProbe' indicates whether the application within the container is started.
90+
All other probes are disabled if a startup probe is provided, until it succeeds.
91+
If the startup probe fails, the container is subjected to its restart policy.
92+
93+
A 'livenessProbe' is useful for applications running for long periods of time, eventually
9094
transitioning to broken states and cannot recover except by restarting them.
9195
92-
Other times, a 'readiness' probe is useful when the Container is only temporarily unable
93-
to serve, and will recover on its own. In this case, if a Container fails its 'readiness'
94-
probe, the Container will not be shut down, but rather the Container will stop receiving
96+
Other times, a 'readinessProbe' is useful when the Container is only temporarily unable
97+
to serve, and will recover on its own. In this case, if a Container fails its 'readinessProbe'
98+
, the Container will not be shut down, but rather the Container will stop receiving
9599
incoming requests.
96100
97101
'httpGet' probes are just as it sounds: it performs a HTTP GET operation on the Container.
@@ -110,7 +114,7 @@ Usage: drycc healthchecks:set <health-type> <probe-type> [options] [--] <args>..
110114
111115
Arguments:
112116
<health-type>
113-
the healthcheck type, such as 'livenessProbe' or 'readinessProbe'.
117+
the healthcheck type, such as 'startupProbe' 'livenessProbe' or 'readinessProbe'.
114118
<probe-type>
115119
the healthcheck probe type, such as 'httpGet', 'exec' or 'tcpSocket'.
116120
<args>

parser/limits.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Valid commands for limits:
1313
limits:list list resource limits for an app
1414
limits:set set resource limits for an app
1515
limits:unset unset resource limits for an app
16-
limits:specs unset resource limits for an app
17-
limits:plans unset resource limits for an app
16+
limits:specs list specification information of the server
17+
limits:plans list resource limit plans
1818
1919
Use 'drycc help [command]' to learn more.
2020
`

parser/volumes.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ Arguments:
232232
cp copy volume files
233233
rm remove volume files
234234
<args>
235-
arguments for running commands
235+
arguments for running commands, when cmd is 'cp', args should be '[source] [dest]'.
236+
volume path format 'vol://volumename/', '/' is equivalent to the mount path.
236237
237238
Options:
238239
-a --app=<app>

0 commit comments

Comments
 (0)