Skip to content

Commit

Permalink
[cherry-pick] Update dependencies (#936) (#943)
Browse files Browse the repository at this point in the history
/cherry-pick

Signed-off-by: 1gtm <1gtm@appscode.com>
  • Loading branch information
1gtm committed Aug 28, 2021
1 parent 50dd735 commit 7b9d74d
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 32 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
k8s.io/client-go v0.21.1
k8s.io/klog/v2 v2.8.0
kmodules.xyz/client-go v0.0.0-20210827153326-54ead9c6225f
kmodules.xyz/custom-resources v0.0.0-20210812193424-1631fae03a1a
kmodules.xyz/custom-resources v0.0.0-20210824055127-e5a3d2d6c161
kmodules.xyz/objectstore-api v0.0.0-20210817052835-df749235585e // indirect
kmodules.xyz/offshoot-api v0.0.0-20210804100837-d0388be3e60d
stash.appscode.dev/apimachinery v0.15.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,8 @@ kmodules.xyz/client-go v0.0.0-20210827153326-54ead9c6225f/go.mod h1:0gkPeALtYjB2
kmodules.xyz/constants v0.0.0-20210218100002-2c304bfda278/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY=
kmodules.xyz/crd-schema-fuzz v0.0.0-20210618002152-fae23aef5fb4/go.mod h1:IIkUctlfoptoci0BOrsUf8ya+MOG5uaeh1PE4uzaIbA=
kmodules.xyz/custom-resources v0.0.0-20210618003440-c6bb400da153/go.mod h1:/NLuNSf299U0XVuNEh2swtw3EczWFRL3Sx24WhNoWCM=
kmodules.xyz/custom-resources v0.0.0-20210812193424-1631fae03a1a h1:ivsga5FiRMpVr+WlFF3BxkAHchJ2B+HQUeqtbhZjfyo=
kmodules.xyz/custom-resources v0.0.0-20210812193424-1631fae03a1a/go.mod h1:VYtz1fgHgLqCk+sdSUGBClfZfJ6z4873wB5MYOXxpS8=
kmodules.xyz/custom-resources v0.0.0-20210824055127-e5a3d2d6c161 h1:0zHsitjggQMbdlJ5eC8cTac6Lqy8AS5jJ3Fs5cAwpiA=
kmodules.xyz/custom-resources v0.0.0-20210824055127-e5a3d2d6c161/go.mod h1:VYtz1fgHgLqCk+sdSUGBClfZfJ6z4873wB5MYOXxpS8=
kmodules.xyz/objectstore-api v0.0.0-20210618005912-71f8a80f48f9/go.mod h1:8sCfgZQImwjTLh2mDxYiim6+GecFN+DamkPSF9joyu4=
kmodules.xyz/objectstore-api v0.0.0-20210817052835-df749235585e h1:e9Q0JFAWPmhjGYmNa9OBxewV3SKf82ZDJ1h0b7YdRms=
kmodules.xyz/objectstore-api v0.0.0-20210817052835-df749235585e/go.mod h1:Tkcf9uTplnrJ6C8o0zlw2kpgS1SaWAiMO5P2YgLjTo8=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,15 @@ type MetricValue struct {
// int() returns 1 if the expression is true otherwise 0,
// example: int(phase == 'Running')
//
// percentage(a, b) returns the value of (a * b%)
// example: percentage(replicas, maxUnavailable)
// percentage(percent, total, roundUp) returns the value of (percent * total%) when `percent` contains the percent(%) value.
// If percent represents an Integer value, then it will simply return it.
// roundUp is an optional field. By default, its value is false. If roundUp is set as `true`, the resultant value will be rounded up.
// example: (i) percentage("25%", 4) will return 1.
// (ii) percentage("25%", 1 , true) will return 1 as roundUp is set as true.
// (iii) percentage(2, 4) will return 2 as percent is representing an Integer value.
//
// cpuCores() returns the cpu in unit core
// example: cpuCores(cpu), for cpu value 150m, it will return 0.15
// cpu_cores() returns the cpu in unit core
// example: cpu_cores(cpu), for cpu value 150m, it will return 0.15
//
// bytes() returns the memory size in byte
// example: bytes(memory), for memory value 1 ki, it will return 1024
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,17 @@ spec:
Parameters is used in the expression string \n Available
expression evaluation functions are: \n int() returns
1 if the expression is true otherwise 0, example: int(phase
== 'Running') \n percentage(a, b) returns the value of
(a * b%) example: percentage(replicas, maxUnavailable)
\n cpuCores() returns the cpu in unit core example: cpuCores(cpu),
== 'Running') \n percentage(percent, total, roundUp) returns
the value of (percent * total%) when `percent` contains
the percent(%) value. If percent represents an Integer
value, then it will simply return it. roundUp is an optional
field. By default, its value is false. If roundUp is set
as `true`, the resultant value will be rounded up. example:
(i) percentage(\"25%\", 4) will return 1. (ii)
percentage(\"25%\", 1 , true) will return 1 as roundUp
is set as true. (iii) percentage(2, 4) will return
2 as percent is representing an Integer value. \n cpu_cores()
returns the cpu in unit core example: cpu_cores(cpu),
for cpu value 150m, it will return 0.15 \n bytes() returns
the memory size in byte example: bytes(memory), for memory
value 1 ki, it will return 1024 \n unix() returns the
Expand Down Expand Up @@ -259,22 +267,32 @@ spec:
the expression string \n Available expression
evaluation functions are: \n int() returns 1
if the expression is true otherwise 0, example:
int(phase == 'Running') \n percentage(a, b)
returns the value of (a * b%) example: percentage(replicas,
maxUnavailable) \n cpuCores() returns the cpu
in unit core example: cpuCores(cpu), for cpu
value 150m, it will return 0.15 \n bytes() returns
the memory size in byte example: bytes(memory),
for memory value 1 ki, it will return 1024 \n
unix() returns the DateTime string into unix
format. example: unix(dateTime) will return
the corresponding unix value for the given dateTime
\n in above examples phase, replicas, maxUnavailable,
cpu, memory, dateTime are Parameter's key those
values will come from corresponding Parameter's
value \n Some expression evaluation functions
are used for calculating resource requests and
limits. Those functions are stated here: https://github.com/kmodules/resource-metrics/blob/master/eval.go"
int(phase == 'Running') \n percentage(percent,
total, roundUp) returns the value of (percent
* total%) when `percent` contains the percent(%)
value. If percent represents an Integer value,
then it will simply return it. roundUp is an
optional field. By default, its value is false.
If roundUp is set as `true`, the resultant value
will be rounded up. example: (i) percentage(\"25%\",
4) will return 1. (ii) percentage(\"25%\",
1 , true) will return 1 as roundUp is set as
true. (iii) percentage(2, 4) will return
2 as percent is representing an Integer value.
\n cpu_cores() returns the cpu in unit core
example: cpu_cores(cpu), for cpu value 150m,
it will return 0.15 \n bytes() returns the memory
size in byte example: bytes(memory), for memory
value 1 ki, it will return 1024 \n unix() returns
the DateTime string into unix format. example:
unix(dateTime) will return the corresponding
unix value for the given dateTime \n in above
examples phase, replicas, maxUnavailable, cpu,
memory, dateTime are Parameter's key those values
will come from corresponding Parameter's value
\n Some expression evaluation functions are
used for calculating resource requests and limits.
Those functions are stated here: https://github.com/kmodules/resource-metrics/blob/master/eval.go"
type: string
valueFromPath:
description: "ValueFromPath contains the field
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ kmodules.xyz/client-go/meta
kmodules.xyz/client-go/tools/analytics
kmodules.xyz/client-go/tools/cli
kmodules.xyz/client-go/tools/clusterid
# kmodules.xyz/custom-resources v0.0.0-20210812193424-1631fae03a1a
# kmodules.xyz/custom-resources v0.0.0-20210824055127-e5a3d2d6c161
## explicit
kmodules.xyz/custom-resources/apis/appcatalog
kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1
Expand Down

0 comments on commit 7b9d74d

Please sign in to comment.