From 7beb611d00951b1362ebce84fd2bbdaad7874975 Mon Sep 17 00:00:00 2001 From: lgtm <1gtm@users.noreply.github.com> Date: Fri, 27 Aug 2021 17:52:03 -0700 Subject: [PATCH] [cherry-pick] Update dependencies (#22) (#24) /cherry-pick Signed-off-by: 1gtm <1gtm@appscode.com> --- go.mod | 2 +- go.sum | 4 +- .../apis/metrics/v1alpha1/generated.proto | 12 ++-- .../v1alpha1/metricsconfiguration_types.go | 12 ++-- .../metrics/v1alpha1/openapi_generated.go | 2 +- ...cs.appscode.com_metricsconfigurations.yaml | 56 ++++++++++++------- vendor/modules.txt | 2 +- 7 files changed, 58 insertions(+), 32 deletions(-) diff --git a/go.mod b/go.mod index de5f2bf3..3364e8f4 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,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 diff --git a/go.sum b/go.sum index 3655985f..28b50f0a 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/generated.proto b/vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/generated.proto index 08539a1d..909d9fe1 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/generated.proto +++ b/vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/generated.proto @@ -134,11 +134,15 @@ message MetricValue { // 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 diff --git a/vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/metricsconfiguration_types.go b/vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/metricsconfiguration_types.go index dc2bd906..3557992e 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/metricsconfiguration_types.go +++ b/vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/metricsconfiguration_types.go @@ -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 diff --git a/vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/openapi_generated.go index dbb30d2a..84d51cdf 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/custom-resources/apis/metrics/v1alpha1/openapi_generated.go @@ -15898,7 +15898,7 @@ func schema_custom_resources_apis_metrics_v1alpha1_MetricValue(ref common.Refere }, "valueFromExpression": { SchemaProps: spec.SchemaProps{ - Description: "ValueFromExpression contains an expression for the metric value expression can be a function as well. Parameters is used in the expression string\n\nAvailable expression evaluation functions are:\n\nint() returns 1 if the expression is true otherwise 0, example: int(phase == 'Running')\n\npercentage(a, b) returns the value of (a * b%) example: percentage(replicas, maxUnavailable)\n\ncpuCores() returns the cpu in unit core example: cpuCores(cpu), for cpu value 150m, it will return 0.15\n\nbytes() returns the memory size in byte example: bytes(memory), for memory value 1 ki, it will return 1024\n\nunix() returns the DateTime string into unix format. example: unix(dateTime) will return the corresponding unix value for the given dateTime\n\nin above examples phase, replicas, maxUnavailable, cpu, memory, dateTime are Parameter's key those values will come from corresponding Parameter's value\n\nSome 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", + Description: "ValueFromExpression contains an expression for the metric value expression can be a function as well. Parameters is used in the expression string\n\nAvailable expression evaluation functions are:\n\nint() returns 1 if the expression is true otherwise 0, example: int(phase == 'Running')\n\npercentage(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.\n (ii) percentage(\"25%\", 1 , true) will return 1 as roundUp is set as true.\n (iii) percentage(2, 4) will return 2 as percent is representing an Integer value.\n\ncpu_cores() returns the cpu in unit core example: cpu_cores(cpu), for cpu value 150m, it will return 0.15\n\nbytes() returns the memory size in byte example: bytes(memory), for memory value 1 ki, it will return 1024\n\nunix() returns the DateTime string into unix format. example: unix(dateTime) will return the corresponding unix value for the given dateTime\n\nin above examples phase, replicas, maxUnavailable, cpu, memory, dateTime are Parameter's key those values will come from corresponding Parameter's value\n\nSome 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{"string"}, Format: "", }, diff --git a/vendor/kmodules.xyz/custom-resources/crds/metrics.appscode.com_metricsconfigurations.yaml b/vendor/kmodules.xyz/custom-resources/crds/metrics.appscode.com_metricsconfigurations.yaml index e918f3e6..e0222575 100644 --- a/vendor/kmodules.xyz/custom-resources/crds/metrics.appscode.com_metricsconfigurations.yaml +++ b/vendor/kmodules.xyz/custom-resources/crds/metrics.appscode.com_metricsconfigurations.yaml @@ -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 @@ -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 diff --git a/vendor/modules.txt b/vendor/modules.txt index 4f1a4263..da647a5f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -546,7 +546,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