Skip to content

Commit ef9bd7a

Browse files
authored
[cherry-pick] Update dependencies (#488) (#490)
/cherry-pick Signed-off-by: 1gtm <1gtm@appscode.com>
1 parent 753cf71 commit ef9bd7a

File tree

7 files changed

+58
-32
lines changed

7 files changed

+58
-32
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
k8s.io/client-go v0.21.1
1515
k8s.io/klog/v2 v2.8.0
1616
kmodules.xyz/client-go v0.0.0-20210827153326-54ead9c6225f
17-
kmodules.xyz/custom-resources v0.0.0-20210812193424-1631fae03a1a
17+
kmodules.xyz/custom-resources v0.0.0-20210824055127-e5a3d2d6c161
1818
kmodules.xyz/objectstore-api v0.0.0-20210817052835-df749235585e // indirect
1919
kmodules.xyz/offshoot-api v0.0.0-20210804100837-d0388be3e60d
2020
stash.appscode.dev/apimachinery v0.15.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,8 @@ kmodules.xyz/client-go v0.0.0-20210827153326-54ead9c6225f/go.mod h1:0gkPeALtYjB2
10271027
kmodules.xyz/constants v0.0.0-20210218100002-2c304bfda278/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY=
10281028
kmodules.xyz/crd-schema-fuzz v0.0.0-20210618002152-fae23aef5fb4/go.mod h1:IIkUctlfoptoci0BOrsUf8ya+MOG5uaeh1PE4uzaIbA=
10291029
kmodules.xyz/custom-resources v0.0.0-20210618003440-c6bb400da153/go.mod h1:/NLuNSf299U0XVuNEh2swtw3EczWFRL3Sx24WhNoWCM=
1030-
kmodules.xyz/custom-resources v0.0.0-20210812193424-1631fae03a1a h1:ivsga5FiRMpVr+WlFF3BxkAHchJ2B+HQUeqtbhZjfyo=
1031-
kmodules.xyz/custom-resources v0.0.0-20210812193424-1631fae03a1a/go.mod h1:VYtz1fgHgLqCk+sdSUGBClfZfJ6z4873wB5MYOXxpS8=
1030+
kmodules.xyz/custom-resources v0.0.0-20210824055127-e5a3d2d6c161 h1:0zHsitjggQMbdlJ5eC8cTac6Lqy8AS5jJ3Fs5cAwpiA=
1031+
kmodules.xyz/custom-resources v0.0.0-20210824055127-e5a3d2d6c161/go.mod h1:VYtz1fgHgLqCk+sdSUGBClfZfJ6z4873wB5MYOXxpS8=
10321032
kmodules.xyz/objectstore-api v0.0.0-20210618005912-71f8a80f48f9/go.mod h1:8sCfgZQImwjTLh2mDxYiim6+GecFN+DamkPSF9joyu4=
10331033
kmodules.xyz/objectstore-api v0.0.0-20210817052835-df749235585e h1:e9Q0JFAWPmhjGYmNa9OBxewV3SKf82ZDJ1h0b7YdRms=
10341034
kmodules.xyz/objectstore-api v0.0.0-20210817052835-df749235585e/go.mod h1:Tkcf9uTplnrJ6C8o0zlw2kpgS1SaWAiMO5P2YgLjTo8=

vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/generated.proto

Lines changed: 8 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/metricsconfiguration_types.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,15 @@ type MetricValue struct {
285285
// int() returns 1 if the expression is true otherwise 0,
286286
// example: int(phase == 'Running')
287287
//
288-
// percentage(a, b) returns the value of (a * b%)
289-
// example: percentage(replicas, maxUnavailable)
288+
// percentage(percent, total, roundUp) returns the value of (percent * total%) when `percent` contains the percent(%) value.
289+
// If percent represents an Integer value, then it will simply return it.
290+
// roundUp is an optional field. By default, its value is false. If roundUp is set as `true`, the resultant value will be rounded up.
291+
// example: (i) percentage("25%", 4) will return 1.
292+
// (ii) percentage("25%", 1 , true) will return 1 as roundUp is set as true.
293+
// (iii) percentage(2, 4) will return 2 as percent is representing an Integer value.
290294
//
291-
// cpuCores() returns the cpu in unit core
292-
// example: cpuCores(cpu), for cpu value 150m, it will return 0.15
295+
// cpu_cores() returns the cpu in unit core
296+
// example: cpu_cores(cpu), for cpu value 150m, it will return 0.15
293297
//
294298
// bytes() returns the memory size in byte
295299
// example: bytes(memory), for memory value 1 ki, it will return 1024

vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/openapi_generated.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/kmodules.xyz/custom-resources/crds/metrics.appscode.com_metricsconfigurations.yaml

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,17 @@ spec:
146146
Parameters is used in the expression string \n Available
147147
expression evaluation functions are: \n int() returns
148148
1 if the expression is true otherwise 0, example: int(phase
149-
== 'Running') \n percentage(a, b) returns the value of
150-
(a * b%) example: percentage(replicas, maxUnavailable)
151-
\n cpuCores() returns the cpu in unit core example: cpuCores(cpu),
149+
== 'Running') \n percentage(percent, total, roundUp) returns
150+
the value of (percent * total%) when `percent` contains
151+
the percent(%) value. If percent represents an Integer
152+
value, then it will simply return it. roundUp is an optional
153+
field. By default, its value is false. If roundUp is set
154+
as `true`, the resultant value will be rounded up. example:
155+
(i) percentage(\"25%\", 4) will return 1. (ii)
156+
percentage(\"25%\", 1 , true) will return 1 as roundUp
157+
is set as true. (iii) percentage(2, 4) will return
158+
2 as percent is representing an Integer value. \n cpu_cores()
159+
returns the cpu in unit core example: cpu_cores(cpu),
152160
for cpu value 150m, it will return 0.15 \n bytes() returns
153161
the memory size in byte example: bytes(memory), for memory
154162
value 1 ki, it will return 1024 \n unix() returns the
@@ -259,22 +267,32 @@ spec:
259267
the expression string \n Available expression
260268
evaluation functions are: \n int() returns 1
261269
if the expression is true otherwise 0, example:
262-
int(phase == 'Running') \n percentage(a, b)
263-
returns the value of (a * b%) example: percentage(replicas,
264-
maxUnavailable) \n cpuCores() returns the cpu
265-
in unit core example: cpuCores(cpu), for cpu
266-
value 150m, it will return 0.15 \n bytes() returns
267-
the memory size in byte example: bytes(memory),
268-
for memory value 1 ki, it will return 1024 \n
269-
unix() returns the DateTime string into unix
270-
format. example: unix(dateTime) will return
271-
the corresponding unix value for the given dateTime
272-
\n in above examples phase, replicas, maxUnavailable,
273-
cpu, memory, dateTime are Parameter's key those
274-
values will come from corresponding Parameter's
275-
value \n Some expression evaluation functions
276-
are used for calculating resource requests and
277-
limits. Those functions are stated here: https://github.com/kmodules/resource-metrics/blob/master/eval.go"
270+
int(phase == 'Running') \n percentage(percent,
271+
total, roundUp) returns the value of (percent
272+
* total%) when `percent` contains the percent(%)
273+
value. If percent represents an Integer value,
274+
then it will simply return it. roundUp is an
275+
optional field. By default, its value is false.
276+
If roundUp is set as `true`, the resultant value
277+
will be rounded up. example: (i) percentage(\"25%\",
278+
4) will return 1. (ii) percentage(\"25%\",
279+
1 , true) will return 1 as roundUp is set as
280+
true. (iii) percentage(2, 4) will return
281+
2 as percent is representing an Integer value.
282+
\n cpu_cores() returns the cpu in unit core
283+
example: cpu_cores(cpu), for cpu value 150m,
284+
it will return 0.15 \n bytes() returns the memory
285+
size in byte example: bytes(memory), for memory
286+
value 1 ki, it will return 1024 \n unix() returns
287+
the DateTime string into unix format. example:
288+
unix(dateTime) will return the corresponding
289+
unix value for the given dateTime \n in above
290+
examples phase, replicas, maxUnavailable, cpu,
291+
memory, dateTime are Parameter's key those values
292+
will come from corresponding Parameter's value
293+
\n Some expression evaluation functions are
294+
used for calculating resource requests and limits.
295+
Those functions are stated here: https://github.com/kmodules/resource-metrics/blob/master/eval.go"
278296
type: string
279297
valueFromPath:
280298
description: "ValueFromPath contains the field

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ kmodules.xyz/client-go/meta
547547
kmodules.xyz/client-go/tools/analytics
548548
kmodules.xyz/client-go/tools/cli
549549
kmodules.xyz/client-go/tools/clusterid
550-
# kmodules.xyz/custom-resources v0.0.0-20210812193424-1631fae03a1a
550+
# kmodules.xyz/custom-resources v0.0.0-20210824055127-e5a3d2d6c161
551551
## explicit
552552
kmodules.xyz/custom-resources/apis/appcatalog
553553
kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1

0 commit comments

Comments
 (0)