diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..2beab01c2f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,118 @@ +version: 2 +updates: +- package-ecosystem: docker + directory: /util-images/network/netperfbenchmark + schedule: + interval: weekly +- package-ecosystem: docker + directory: /network/tools/network-policy-enforcement-latency/policy-creation-enforcement-latency + schedule: + interval: weekly +- package-ecosystem: docker + directory: /util-images/request-benchmark + schedule: + interval: weekly +- package-ecosystem: docker + directory: /util-images/access-tokens + schedule: + interval: weekly +- package-ecosystem: docker + directory: /util-images/probes + schedule: + interval: weekly +- package-ecosystem: docker + directory: /util-images/scratch + schedule: + interval: weekly +- package-ecosystem: docker + directory: /network/tools/network-policy-enforcement-latency/pod-creation-reachability-latency + schedule: + interval: weekly +- package-ecosystem: docker + directory: /util-images/watch-list + schedule: + interval: weekly +- package-ecosystem: docker + directory: /dns/dnsperfgo + schedule: + interval: weekly +- package-ecosystem: docker + directory: /dns/dnsperfgo/vendor/golang.org/x/net/http2 + schedule: + interval: weekly +- package-ecosystem: docker + directory: /dns/image + schedule: + interval: weekly +- package-ecosystem: docker + directory: /perfdash + schedule: + interval: weekly +- package-ecosystem: docker + directory: /slo-monitor + schedule: + interval: weekly +- package-ecosystem: docker + directory: /util-images/sleep + schedule: + interval: weekly +- package-ecosystem: docker + directory: /util-images/containerd + schedule: + interval: weekly +- package-ecosystem: docker + directory: /network/benchmarks/netperf + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /util-images/network/netperfbenchmark + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /util-images/access-tokens + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /util-images/request-benchmark + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /util-images/probes + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /dns/jsonify + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /clusterloader2 + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /dns/dnsperfgo + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /util-images/watch-list + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /perfdash + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /network/tools/network-policy-enforcement-latency + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /benchmark + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /slo-monitor + schedule: + interval: weekly +- package-ecosystem: gomod + directory: /network/benchmarks/netperf + schedule: + interval: weekly diff --git a/benchmark/docs/design.md b/benchmark/docs/design.md index 9389c03929..5472414b8b 100644 --- a/benchmark/docs/design.md +++ b/benchmark/docs/design.md @@ -105,7 +105,7 @@ We classify each metric as matched/mismatched based on the above test. We could **NOTES FOR INTERESTED CONTRIBUTORS** -This tool has been implemented and the code for it lies [here](https://github.com/kubernetes/perf-tests/tree/master/benchmark). Further, we have setup an [automated CI job](https://k8s-testgrid.appspot.com/sig-scalability-perf-tests#kubemark-100-benchmark) that runs this benchmark periodically and compares the metrics across our 100-node kubemark and 100-node real-cluster runs from the last 24 hrs. +This tool has been implemented and the code for it lies [here](https://github.com/kubernetes/perf-tests/tree/master/benchmark). Further, we have setup an [automated CI job](https://testgrid.k8s.io/sig-scalability-perf-tests#kubemark-100-benchmark) that runs this benchmark periodically and compares the metrics across our 100-node kubemark and 100-node real-cluster runs from the last 24 hrs. If you want to contribute to this tool, file bugs or help with understanding/resolving differences we’re currently observing across kubemark and real-cluster (e.g [#44701](https://github.com/kubernetes/kubernetes/issues/44701)), ping us on “sig-scale” kubernetes slack channel and/or write an email to `kubernetes-sig-scale@googlegroups.com`. diff --git a/benchmark/go.mod b/benchmark/go.mod index b7f7af5cae..eb6ce5249c 100644 --- a/benchmark/go.mod +++ b/benchmark/go.mod @@ -5,8 +5,8 @@ go 1.15 require ( github.com/aclements/go-moremath v0.0.0-20190830160640-d16893ddf098 // indirect github.com/dgryski/go-onlinestats v0.0.0-20170612111826-1c7d19468768 - github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b - github.com/spf13/pflag v1.0.1 + github.com/golang/glog v1.1.2 + github.com/spf13/pflag v1.0.5 k8s.io/contrib v0.0.0-20190411182844-89f6948e2457 k8s.io/kubernetes v1.15.0 ) diff --git a/benchmark/go.sum b/benchmark/go.sum index ae38c0421c..4b0006d667 100644 --- a/benchmark/go.sum +++ b/benchmark/go.sum @@ -94,8 +94,9 @@ github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+ github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v0.0.0-20160127222235-bd3c8e81be01/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -201,8 +202,9 @@ github.com/spf13/afero v0.0.0-20160816080757-b28a7effac97/go.mod h1:j4pytiNVoe2o github.com/spf13/cast v0.0.0-20160730092037-e31f36ffc91a/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cobra v0.0.0-20180319062004-c439c4fa0937/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/jwalterweatherman v0.0.0-20160311093646-33c24e77fb80/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v0.0.0-20160820190039-7fb2782df3d8/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/clusterloader2/README.md b/clusterloader2/README.md index 0af0c826e3..d6b24b4f4d 100644 --- a/clusterloader2/README.md +++ b/clusterloader2/README.md @@ -127,6 +127,11 @@ This measurement gathers the memory profile provided by pprof for a given compon - **MetricsForE2E** \ The measurement gathers metrics from kube-apiserver, controller manager, scheduler and optionally all kubelets. +- **PodPeriodicCommand** \ +This measurement continually runs commands on an interval in pods targeted +with a label selector. The output from each command is collected, allowing for +information to be polled throughout the duration of the measurement, such as +CPU and memory profiles. - **PodStartupLatency** \ This measurement verifies if [pod startup SLO] is satisfied. - **ResourceUsageSummary** \ @@ -154,6 +159,10 @@ Pods can be specified by label selector, field selector and namespace. In case of timeout test continues to run, with error (causing marking test as failed) being logged. - **Sleep** \ This is a barrier that waits until requested amount of the time passes. +- **WaitForGenericK8sObjects** \ +This is a barrier that waits until required number of k8s object fulfill given condition requirements. +Those conditions can be specified as a list of requirements of `Type=Status` format, e.g.: `NodeReady=True`. +In case of timeout test continues to run, with error (causing marking test as failed) being logged. ## Prometheus metrics diff --git a/clusterloader2/api/types.go b/clusterloader2/api/types.go index 2d72c97893..8dac7cb2fe 100644 --- a/clusterloader2/api/types.go +++ b/clusterloader2/api/types.go @@ -94,10 +94,17 @@ type Module struct { // In a given namespace range (or cluster scope if no range is specified) // it defines the number and the configuration of managed objects. type Phase struct { - // NamespaceRange defines the set of namespaces in which objects + // NamespaceRange defines the range of generated namespaces in which objects // should be reconciled. // If null, objects are assumed to be cluster scoped. + // Note: Only one of NamespaceList and NamespaceRange should be set NamespaceRange *NamespaceRange `json:"namespaceRange"` + // NamespaceList defines a list of namespaces in which objects + // should be reconciled. This is used for resources that should be forced + // into specific namespaces. + // If null, assumed to use NamespaceRange. + // Note: Only one of NamespaceList and NamespaceRange should be set + NamespaceList []string `json:"namespaceList"` // ReplicasPerNamespace is a number of instances of a given object // to exist in each of referenced namespaces. ReplicasPerNamespace int32 `json:"replicasPerNamespace"` diff --git a/clusterloader2/api/validation.go b/clusterloader2/api/validation.go index 4001ab25d2..6047ff52db 100644 --- a/clusterloader2/api/validation.go +++ b/clusterloader2/api/validation.go @@ -139,6 +139,10 @@ func validateTuningSetInPhase(s *Step, ts []*TuningSet, fldPath *field.Path) fie func (v *ConfigValidator) validatePhase(p *Phase, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} + + if p.NamespaceList != nil && p.NamespaceRange != nil { + allErrs = append(allErrs, field.Forbidden(fldPath, "must specify at most 1 of namespaceList and namespaceRange")) + } if p.NamespaceRange != nil { allErrs = append(allErrs, v.validateNamespaceRange(p.NamespaceRange, fldPath.Child("namespaceRange"))...) } diff --git a/clusterloader2/api/validation_test.go b/clusterloader2/api/validation_test.go index 76b792b0e8..cf8cd1d999 100644 --- a/clusterloader2/api/validation_test.go +++ b/clusterloader2/api/validation_test.go @@ -223,6 +223,25 @@ func TestVerifyPhase(t *testing.T) { }, expected: true, }, + { + name: "namespaceList specifies namespace", + input: Phase{ + ReplicasPerNamespace: 10, + NamespaceList: []string{"ns1"}, + }, + expected: true, + }, + { + name: "namespaceRange specifies namespace", + input: Phase{ + ReplicasPerNamespace: 10, + NamespaceRange: &NamespaceRange{ + Min: 1, + Max: 1, + }, + }, + expected: true, + }, { name: "negative replicas", input: Phase{ @@ -230,6 +249,15 @@ func TestVerifyPhase(t *testing.T) { }, expected: false, }, + { + name: "namespaceList and namespaceRange both specify namespace", + input: Phase{ + ReplicasPerNamespace: 10, + NamespaceList: []string{"ns1"}, + NamespaceRange: &NamespaceRange{}, + }, + expected: false, + }, } { t.Run(test.name, func(t *testing.T) { v := NewConfigValidator("", &Config{}) diff --git a/clusterloader2/go.mod b/clusterloader2/go.mod index 5f4980dfa6..40d3391801 100644 --- a/clusterloader2/go.mod +++ b/clusterloader2/go.mod @@ -40,13 +40,13 @@ require ( github.com/google/gofuzz v1.2.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/onsi/ginkgo v1.14.0 - github.com/prometheus/client_model v0.2.0 + github.com/prometheus/client_model v0.5.0 github.com/prometheus/common v0.26.0 github.com/prometheus/prometheus v1.8.2-0.20210331101223-3cafc58827d1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c + golang.org/x/sync v0.4.0 golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac gopkg.in/yaml.v2 v2.4.0 @@ -55,7 +55,7 @@ require ( k8s.io/client-go v0.22.15 k8s.io/component-base v0.22.15 k8s.io/component-helpers v0.22.15 - k8s.io/klog/v2 v2.30.0 + k8s.io/klog/v2 v2.100.1 k8s.io/kubelet v0.22.15 k8s.io/kubernetes v1.22.15 ) diff --git a/clusterloader2/go.sum b/clusterloader2/go.sum index 8a90cf9da7..b9ebc1d201 100644 --- a/clusterloader2/go.sum +++ b/clusterloader2/go.sum @@ -799,8 +799,9 @@ github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1: github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1152,8 +1153,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1470,8 +1472,9 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1548,8 +1551,8 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= -k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-aggregator v0.22.15/go.mod h1:hPN3C1b2O8JKEALJMG5ONTFWdBA45rf9zwoLimkSvdk= k8s.io/kube-controller-manager v0.22.15/go.mod h1:maHnFZAM4XeOVRNMJsuqpXGhD5Nznx7kiAONP3xDb18= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= diff --git a/clusterloader2/pkg/config/template_functions.go b/clusterloader2/pkg/config/template_functions.go index 23c1148c36..5ac21d9fff 100644 --- a/clusterloader2/pkg/config/template_functions.go +++ b/clusterloader2/pkg/config/template_functions.go @@ -50,6 +50,7 @@ func GetFuncs(fsys fs.FS) template.FuncMap { "IncludeFile": includeFile, "IncludeEmbedFile": includeEmbedFile(fsys), "Loop": loop, + "Lowercase": strings.ToLower, "MaxFloat": maxFloat, "MaxInt": maxInt, "MinFloat": minFloat, @@ -62,6 +63,7 @@ func GetFuncs(fsys fs.FS) template.FuncMap { "RandIntRange": randIntRange, "Seq": seq, "SliceOfZeros": sliceOfZeros, + "StringSplit": stringSplit, "SubtractFloat": subtractFloat, "SubtractInt": subtractInt, "YamlQuote": yamlQuote, @@ -292,6 +294,11 @@ func sliceOfZeros(size interface{}) []int { return make([]int, int(toFloat64(size))) } +// stringSplit splits a string by commas. +func stringSplit(s string) []string { + return strings.Split(s, ",") +} + // loop returns a slice with incremential values starting from zero. func loop(size interface{}) []int { sizeInt := int(toFloat64(size)) diff --git a/clusterloader2/pkg/measurement/common/pod_command.go b/clusterloader2/pkg/measurement/common/pod_command.go new file mode 100644 index 0000000000..dec2c4e4f0 --- /dev/null +++ b/clusterloader2/pkg/measurement/common/pod_command.go @@ -0,0 +1,716 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package common + +import ( + "bytes" + "context" + "fmt" + "strings" + "sync" + "time" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/remotecommand" + "k8s.io/client-go/util/exec" + "k8s.io/klog/v2" + "k8s.io/perf-tests/clusterloader2/pkg/measurement" + "k8s.io/perf-tests/clusterloader2/pkg/measurement/util/informer" + "k8s.io/perf-tests/clusterloader2/pkg/util" +) + +const ( + podPeriodicCommandMeasurementName = "PodPeriodicCommand" +) + +type podPeriodicCommandMeasurementCommandParams struct { + // Name is an identifier for the command. + Name string + // Command is the actual Command to execute in a pod. + Command []string + // Timeout is the maximum amount of time the command will have to finish. + Timeout time.Duration +} + +type podPeriodicCommandMeasurementParams struct { + // LabelSelector is used to select applicable pods to run commands on. + LabelSelector *labels.Selector + // Interval is the time between sequential command executions. + Interval time.Duration + // Container is the name of the Container to run the command in. + Container string + // Limit is the maximum number of pods that will have the commands executed in on every interval. + Limit int + // FailOnCommandError controls if the measurement will fail if a command has a non-zero RC during the life of the measurement. + FailOnCommandError bool + // FailOnExecError controls if the measurement will fail if an error occurs while trying to execute a command. + // For example, this would include any error returned from the k8s client-go library. + FailOnExecError bool + // FailOnTimeout controls if the measurement will fail if a command times out. + FailOnTimeout bool + // Commands is the list of Commands that will be executed in each pod on each interval. + Commands []*podPeriodicCommandMeasurementCommandParams +} + +func newPodPeriodCommandMeasurementParams( + params map[string]interface{}, +) (p *podPeriodicCommandMeasurementParams, err error) { + p = &podPeriodicCommandMeasurementParams{} + + p.LabelSelector, err = util.GetLabelSelector(params, "labelSelector") + if err != nil { + return + } + p.Interval, err = util.GetDuration(params, "interval") + if err != nil { + return + } + + p.Container, err = util.GetString(params, "container") + if err != nil { + return + } + + p.Limit, err = util.GetInt(params, "limit") + if err != nil { + return + } + + p.FailOnCommandError, err = util.GetBool(params, "failOnCommandError") + if err != nil { + return + } + + p.FailOnExecError, err = util.GetBool(params, "failOnExecError") + if err != nil { + return + } + + p.FailOnTimeout, err = util.GetBool(params, "failOnTimeout") + if err != nil { + return + } + + var commandMaps []map[string]interface{} + commandMaps, err = util.GetMapArray(params, "commands") + if err != nil { + return + } + + p.Commands = []*podPeriodicCommandMeasurementCommandParams{} + for _, commandMap := range commandMaps { + c := &podPeriodicCommandMeasurementCommandParams{} + + c.Name, err = util.GetString(commandMap, "name") + if err != nil { + return + } + + c.Command, err = util.GetStringArray(commandMap, "command") + if err != nil { + return + } + + c.Timeout, err = util.GetDuration(commandMap, "timeout") + if err != nil { + return + } + + p.Commands = append(p.Commands, c) + } + + return p, nil +} + +type runCommandResult struct { + // stdout is the saved stdout from the command. Will be stored as its own measurement summary. + stdout string + // stderr is the saved stderr from the command. Will be stored as its own measurement summary. + stderr string + // ExitCode is the RC from the command. Defaults to zero and will not be set if the command times + // out or fails to run. + ExitCode int `json:"exitCode"` + // Name is the name of the command that was run, set in the config. + Name string `json:"name"` + // Command is the actual command which was executed. + Command []string `json:"command"` + // Timeout is the configured timeout duration. + Timeout string `json:"timeout"` + // HitTimeout is set to true if the command did not finish before the timeout. + HitTimeout bool `json:"hitTimeout"` + // StartTime is the time the command began executing. Isn't super precise. + StartTime time.Time `json:"startTime"` + // EndTime is the time the command finished executing. Isn't super precise. + EndTime time.Time `json:"endTime"` + // ExecError is set to any go error raised while executing the command. + ExecError string `json:"execError"` +} + +type runAllCommandsResult struct { + Pod string `json:"pod"` + Namespace string `json:"namespace"` + Container string `json:"container"` + Commands []*runCommandResult `json:"commands"` +} + +type stats struct { + // Execs is the total number of times a command was executed in a pod. + Execs int `json:"execs"` + // ExecErrors is the total number of errors that were observed, not including errors from the executed commands. + // For example, this includes any errors that are returned by the k8s client-go library. + ExecErrors int `json:"execErrors"` + // Timeouts is the number of commands which hit a timeout. + Timeouts int `json:"timeouts"` + // NonZeroRCs is the total number of non-zero return codes that were collected from the commands executed. + NonZeroRCs int `json:"nonZeroRCs"` + // Measurements is the total number of measurements gathered. + Measurements int `json:"measurements"` + // Ticks is the total number of intervals that were executed. + Ticks int `json:"ticks"` + // TicksNoPods is the total number of intervals that were skipped because no applicable pods could be found. + TicksNoPods int `json:"ticksNoPods"` +} + +// podPeriodicCommandMeasurement can be used to continually run commands within pods at an interval. +// +// It works by performing the following on each tick: +// +// 1. Creating a list of pods, with maximum size `params.Limit`, which will execute the configured commands. +// Pods are selected using `params.LabelSelector`, must contain `params.Container`, and must be in a running +// state. If no applicable pods are available, then no step is performed for the tick. +// 2. For each pod, spin a goroutine which will run all configured commands in the pod. +// 3. For each command, spin a goroutine to handle running the command. +// 4. If the command returns non-zero, this will be reflected in the associated measurement. +// 5. If a go error occurred while trying to execute the command, this will be reflected in the associated measurement. +// +// The following measurements are produced during the gather step: +// +// 1. One summary measurement, which includes information on all executed commands, such as if the command +// took longer than `params.Timeout`, the command's RC, and the pod the command was executed on. +// 2. One measurement for each command's non-empty stdout and stderr. +// 3. One measurement containing statistics, such as the number of commands executed, the number of errors observed, +// and the number of non-zero RCs. +// +// The measurement fails in the following scenarios: +// +// 1. `params.FailOnCommandError` is set to true and a command has a non-zero RC. +// 2. `params.FailOnExecError` is set to true and an error occurs while trying to execute a command. +// 3. `params.FailOnTimeout` is set to true and a command takes longer than its configured timeout to execute. +type podPeriodicCommandMeasurement struct { + clientset kubernetes.Interface + restConfig *rest.Config + params *podPeriodicCommandMeasurementParams + isRunning bool + // skipGather signals if the gather step should be skipped, mainly used to bail if param parsing failed. + skipGather bool + // stopCh is closed when stop() is called. + stopCh chan struct{} + // doneCh is closed after stopCh is closed and all in progress commands have finished. + doneCh chan struct{} + results []*runAllCommandsResult + informer cache.SharedInformer + stats *stats + // statsLock needs to be held to modify and read the stats field. + statsLock *sync.Mutex +} + +// isApplicablePod checks if a pod is a viable candidate for running a command on. +func (p *podPeriodicCommandMeasurement) isApplicablePod(pod *v1.Pod) bool { + if pod.Status.Phase != v1.PodRunning { + return false + } + + hasContainer := false + for _, c := range pod.Spec.Containers { + if c.Name == p.params.Container { + hasContainer = true + + break + } + } + + if !hasContainer { + return false + } + + for _, c := range pod.Status.Conditions { + if c.Type == v1.PodReady && c.Status == v1.ConditionTrue { + return true + } + } + + return false +} + +// getMaxNPods gets at most N pods from the internal informer's store. +// The informer uses a ThreadSafeStore, which stores objects in a map. When List is called, the map is +// iterated over using range, which ensures a random order. +func (p *podPeriodicCommandMeasurement) getMaxNPods(n int) []*v1.Pod { + store := p.informer.GetStore() + pods := []*v1.Pod{} + + podList := store.List() + if len(podList) == 0 { + return pods + } + + for _, podInterface := range podList { + pod := podInterface.(*v1.Pod) + if !p.isApplicablePod(pod) { + continue + } + + pods = append(pods, pod) + + if len(pods) >= n { + return pods + } + } + + return pods +} + +// runCommandInPod runs a specific given command in the specific given pod. +func (p *podPeriodicCommandMeasurement) runCommandInPod( + pod *v1.Pod, params *podPeriodicCommandMeasurementCommandParams, +) *runCommandResult { + klog.V(4).Infof( + "%s: running named command %s in pod %s/%s", + podPeriodicCommandMeasurementName, params.Name, pod.Namespace, pod.Name, + ) + + p.statsLock.Lock() + p.stats.Execs++ + p.statsLock.Unlock() + + result := &runCommandResult{ + Name: params.Name, + Command: params.Command, + Timeout: params.Timeout.String(), + ExitCode: 0, + HitTimeout: false, + } + + req := p.clientset.CoreV1().RESTClient(). + Post(). + Namespace(pod.Namespace). + Resource("pods"). + Name(pod.Name). + SubResource("exec"). + VersionedParams(&v1.PodExecOptions{ + Container: p.params.Container, + Command: params.Command, + Stdin: false, + Stdout: true, + Stderr: true, + TTY: false, + }, scheme.ParameterCodec) + + executor, err := remotecommand.NewSPDYExecutor(p.restConfig, "POST", req.URL()) + if err != nil { + result.ExecError = err.Error() + + return result + } + + stdoutBuf := &bytes.Buffer{} + stderrBuf := &bytes.Buffer{} + // Holds error returned from executor.Stream. + execErrChan := make(chan error, 1) + + // The logic used here to start the executor and the timeout timer isn't super precise, but + // it is good enough for this use case. It is ok that the timeout timer is started after the + // executor, since we still guarantee that the timeout is at least the configured value. + result.StartTime = time.Now() + + go func() { + err := executor.Stream(remotecommand.StreamOptions{ + Stdout: stdoutBuf, + Stderr: stderrBuf, + }) + execErrChan <- err + }() + + // Two different cases: (1) if the command returns before the timeout, and (2) if the timeout + // triggers before the command is done. + // The value result.EndTime is set in both cases. + // If the timeout triggers, then the command isn't actually cancelled. This logic isn't available until + // client-go version 0.26 (see Executor.StreamWithContext). + select { + case err = <-execErrChan: + result.EndTime = time.Now() + + if err == nil { + break + } + + switch e := err.(type) { + case exec.CodeExitError: + result.ExitCode = e.ExitStatus() + + p.statsLock.Lock() + p.stats.NonZeroRCs++ + p.statsLock.Unlock() + + klog.V(2).Infof( + "%s: warning: non-zero exit code %d for named command %s in pod %s/%s", + podPeriodicCommandMeasurementName, result.ExitCode, params.Name, pod.Namespace, pod.Name, + ) + default: + result.ExecError = err.Error() + return result + } + case <-time.After(params.Timeout): + result.EndTime = time.Now() + result.HitTimeout = true + + p.statsLock.Lock() + p.stats.Timeouts++ + p.statsLock.Unlock() + + klog.V(2).Infof( + "%s: warning: hit timeout of %s for named command %s in pod %s/%s", + podPeriodicCommandMeasurementName, params.Timeout.String(), params.Name, pod.Namespace, pod.Name, + ) + } + + klog.V(4).Infof( + "%s: finished running named command %s in pod %s/%s", + podPeriodicCommandMeasurementName, params.Name, pod.Namespace, pod.Name, + ) + + result.stdout = stdoutBuf.String() + result.stderr = stderrBuf.String() + + return result +} + +// runAllCommandsInPod runs all of the configured commands in the given specific pod. +func (p *podPeriodicCommandMeasurement) runAllCommandsInPod(pod *v1.Pod) *runAllCommandsResult { + wg := &sync.WaitGroup{} + commandResultCh := make(chan *runCommandResult, len(p.params.Commands)) + + getRunCommandFunc := func(c *podPeriodicCommandMeasurementCommandParams) func() { + return func() { + defer wg.Done() + + if c := p.runCommandInPod(pod, c); c != nil { + if c.ExecError != "" { + p.statsLock.Lock() + p.stats.ExecErrors++ + p.statsLock.Unlock() + + klog.V(2).Infof( + "%s: error while running named command %s on pod %s/%s: %v", + podPeriodicCommandMeasurementName, c.Name, pod.Namespace, pod.Name, c.ExecError, + ) + } + + commandResultCh <- c + } + } + } + + klog.V(4).Infof( + "%s: running commands on pod %s/%s", podPeriodicCommandMeasurementName, pod.Namespace, pod.Name, + ) + + for _, command := range p.params.Commands { + wg.Add(1) + + go getRunCommandFunc(command)() + } + + wg.Wait() + close(commandResultCh) + + klog.V(4).Infof( + "%s: finished running commands on pod %s/%s", podPeriodicCommandMeasurementName, pod.Namespace, pod.Name, + ) + + results := &runAllCommandsResult{ + Pod: pod.Name, + Namespace: pod.Namespace, + Container: p.params.Container, + Commands: []*runCommandResult{}, + } + + for c := range commandResultCh { + results.Commands = append(results.Commands, c) + } + + klog.V(8).Infof("%s: %#v", podPeriodicCommandMeasurementName, results) + + return results +} + +// commandWorker runs the configured commands in applicable pods on the configured interval. +func (p *podPeriodicCommandMeasurement) commandWorker() { + ticker := time.NewTicker(p.params.Interval) + defer func() { + ticker.Stop() + // Close doneCh to signal the worker has exited. + close(p.doneCh) + }() + + doTick := func() { + p.statsLock.Lock() + p.stats.Ticks++ + p.statsLock.Unlock() + + targetPods := p.getMaxNPods(p.params.Limit) + if len(targetPods) == 0 { + klog.V(2).Infof("%s: warning: no pods available to run commands on", podPeriodicCommandMeasurementName) + + p.statsLock.Lock() + p.stats.TicksNoPods++ + p.statsLock.Unlock() + + return + } + + wg := &sync.WaitGroup{} + resultsChan := make(chan *runAllCommandsResult, len(targetPods)) + + for _, pod := range targetPods { + wg.Add(1) + go func(targetPod *v1.Pod) { + defer wg.Done() + resultsChan <- p.runAllCommandsInPod(targetPod) + }(pod) + } + + wg.Wait() + close(resultsChan) + + for r := range resultsChan { + p.results = append(p.results, r) + } + } + + // Do an initial tick + doTick() + for { + select { + case <-p.stopCh: + return + case <-ticker.C: + doTick() + } + } +} + +func (p *podPeriodicCommandMeasurement) start( + clientset kubernetes.Interface, restConfig *rest.Config, params *podPeriodicCommandMeasurementParams, +) error { + if p.isRunning { + return fmt.Errorf("%s: measurement already running", podPeriodicCommandMeasurementName) + } + + klog.V(2).Infof("%s: starting pod periodic command measurement...", podPeriodicCommandMeasurementName) + + p.clientset = clientset + p.restConfig = restConfig + p.params = params + p.isRunning = true + p.skipGather = false + p.stopCh = make(chan struct{}) + p.doneCh = make(chan struct{}) + p.results = []*runAllCommandsResult{} + p.stats = &stats{} + p.statsLock = &sync.Mutex{} + + labelSelectorString := (*params.LabelSelector).String() + p.informer = informer.NewInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + options.LabelSelector = labelSelectorString + return clientset.CoreV1().Pods("").List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + options.LabelSelector = labelSelectorString + return clientset.CoreV1().Pods("").Watch(context.TODO(), options) + }, + }, + // Use the informer's internal cache to handle listing pods, no need to handle events. + func(_, _ interface{}) {}, + ) + + if err := informer.StartAndSync(p.informer, p.stopCh, informerSyncTimeout); err != nil { + return err + } + + go p.commandWorker() + + return nil +} + +func (p *podPeriodicCommandMeasurement) stop() { + if p.isRunning { + p.isRunning = false + close(p.stopCh) + // Wait for the commandWorker function to stop. + <-p.doneCh + } +} + +func (p *podPeriodicCommandMeasurement) gather() ([]measurement.Summary, error) { + p.stop() + + klog.V(2).Infof("%s: gathered %d command results", podPeriodicCommandMeasurementName, len(p.results)) + + // Create summary for all results. + content, err := util.PrettyPrintJSON(p.results) + if err != nil { + // Ignore p.params.FailOnError here, since this is fatal. + return nil, fmt.Errorf("unable to convert results to JSON: %w", err) + } + + measurements := []measurement.Summary{ + measurement.CreateSummary(podPeriodicCommandMeasurementName, "json", content), + } + + // Hold error to be returned to signal that the measurement failed, or nil. + // Should only be non-nil if one of the FailOnXYZ params is set. + var resultErr error + + // Create individual results for stdout and stderr. + // Saving these as a value in a json document can lead to weird issues in reading the data + // properly, especially if the data is binary, such as for profiling results. + // Additionally, check for any errors or timeouts that may have occurred. + for _, r := range p.results { + getSummaryName := func(c *runCommandResult, suffix string) string { + return strings.Join( + []string{ + podPeriodicCommandMeasurementName, c.StartTime.Format(time.RFC3339), r.Namespace, r.Pod, c.Name, suffix, + }, "-", + ) + } + + for _, c := range r.Commands { + if c.stdout != "" { + measurements = append(measurements, measurement.CreateSummary(getSummaryName(c, "stdout"), "txt", c.stdout)) + } + if c.stderr != "" { + measurements = append(measurements, measurement.CreateSummary(getSummaryName(c, "stderr"), "txt", c.stderr)) + } + + // If the result error has already been set, we don't need to set it again. + if resultErr != nil { + continue + } + + if p.params.FailOnCommandError && c.ExitCode != 0 { + resultErr = fmt.Errorf( + "unexpected non-zero RC while executing command %s in pod %s/%s: got RC %d", + c.Name, r.Namespace, r.Pod, c.ExitCode, + ) + continue + } + + if p.params.FailOnExecError && c.ExecError != "" { + resultErr = fmt.Errorf( + "unexpected error while executing command %s in pod %s/%s: %s", c.Name, r.Namespace, r.Pod, c.ExecError, + ) + continue + } + + if p.params.FailOnTimeout && c.HitTimeout { + resultErr = fmt.Errorf( + "hit timeout of %s while executing command %s in pod %s/%s", + c.Timeout, c.Name, r.Namespace, r.Pod, + ) + } + } + } + + // Create summary for stats. + p.stats.Measurements = len(measurements) + 1 // Adding another measurement for the stats. + content, err = util.PrettyPrintJSON(p.stats) + if err != nil { + // Ignore p.params.FailOnError here, since this is fatal. + return nil, fmt.Errorf("unable to convert stats to JSON: %w", err) + } + + measurements = append( + measurements, + measurement.CreateSummary( + strings.Join([]string{podPeriodicCommandMeasurementName, "stats"}, "-"), "json", content, + ), + ) + + // resultErr can only be set if one of the FailOnXYZ params is set. + if resultErr != nil { + return measurements, resultErr + } + + return measurements, nil +} + +func (*podPeriodicCommandMeasurement) String() string { + return podPeriodicCommandMeasurementName +} + +func (p *podPeriodicCommandMeasurement) Execute(config *measurement.Config) ([]measurement.Summary, error) { + action, err := util.GetString(config.Params, "action") + if err != nil { + return nil, err + } + + switch action { + case "start": + params, err := newPodPeriodCommandMeasurementParams(config.Params) + if err != nil { + p.skipGather = true + return nil, err + } + + return nil, p.start( + config.ClusterFramework.GetClientSets().GetClient(), config.ClusterFramework.GetRestClient(), params, + ) + case "gather": + if p.skipGather { + return nil, nil + } + + return p.gather() + default: + return nil, fmt.Errorf("unknown action %s", action) + } +} + +func (p *podPeriodicCommandMeasurement) Dispose() { + p.stop() +} + +func createPodPeriodicCommandMeasurement() measurement.Measurement { + return &podPeriodicCommandMeasurement{} +} + +func init() { + if err := measurement.Register(podPeriodicCommandMeasurementName, createPodPeriodicCommandMeasurement); err != nil { + klog.Fatalf("Cannot register %s: %v", podPeriodicCommandMeasurementName, err) + } +} diff --git a/clusterloader2/pkg/measurement/common/service_creation_latency.go b/clusterloader2/pkg/measurement/common/service_creation_latency.go index 6b69dedfba..63dea22157 100644 --- a/clusterloader2/pkg/measurement/common/service_creation_latency.go +++ b/clusterloader2/pkg/measurement/common/service_creation_latency.go @@ -48,7 +48,7 @@ const ( defaultServiceCreationLatencyTimeout = 10 * time.Minute defaultCheckInterval = 10 * time.Second pingBackoff = 1 * time.Second - pingChecks = 10 + pingChecks = 3 creatingPhase = "creating" ipAssigningPhase = "ipAssigning" @@ -351,9 +351,6 @@ func (p *pingChecker) run() { case <-p.stopCh: return default: - if _, exists := p.creationTimes.Get(key, phaseName(reachabilityPhase, p.svc.Spec.Type)); exists { - return - } // TODO(#685): Make ping checks less communication heavy. pod, err := execservice.GetPod() if err != nil { @@ -393,6 +390,7 @@ func (p *pingChecker) run() { success++ if success == pingChecks { p.creationTimes.Set(key, phaseName(reachabilityPhase, p.svc.Spec.Type), time.Now()) + return } } } diff --git a/clusterloader2/pkg/measurement/common/slos/network_programming.go b/clusterloader2/pkg/measurement/common/slos/network_programming.go index 6812e7715f..0a802e5dbb 100644 --- a/clusterloader2/pkg/measurement/common/slos/network_programming.go +++ b/clusterloader2/pkg/measurement/common/slos/network_programming.go @@ -21,6 +21,7 @@ import ( "time" "k8s.io/klog/v2" + "k8s.io/perf-tests/clusterloader2/pkg/errors" "k8s.io/perf-tests/clusterloader2/pkg/measurement" "k8s.io/perf-tests/clusterloader2/pkg/measurement/common" measurementutil "k8s.io/perf-tests/clusterloader2/pkg/measurement/util" @@ -46,9 +47,23 @@ func init() { } } -type netProgGatherer struct{} +type netProgGatherer struct { + enableViolations bool + threshold time.Duration +} func (n *netProgGatherer) Configure(config *measurement.Config) error { + enableViolations, err := util.GetBoolOrDefault(config.Params, "enableViolations", false) + if err != nil { + return err + } + n.enableViolations = enableViolations + + threshold, err := util.GetDuration(config.Params, "threshold") + if err != nil { + return err + } + n.threshold = threshold return nil } @@ -99,5 +114,12 @@ func (n *netProgGatherer) createSummary(latency *measurementutil.LatencyMetric) if err != nil { return nil, err } - return measurement.CreateSummary(netProg, "json", content), nil + if n.enableViolations { + klog.V(2).Infof("%s: programming thresholds validation is enabled", n.enableViolations) + if slosErr := latency.VerifyThreshold(n.threshold); slosErr != nil { + err = errors.NewMetricViolationError("Network Programming Latency", slosErr.Error()) + klog.Errorf("%s: %v", n, err) + } + } + return measurement.CreateSummary(netProg, "json", content), err } diff --git a/clusterloader2/pkg/measurement/common/wait_for_generic_k8s_object.go b/clusterloader2/pkg/measurement/common/wait_for_generic_k8s_object.go new file mode 100644 index 0000000000..0491cb346d --- /dev/null +++ b/clusterloader2/pkg/measurement/common/wait_for_generic_k8s_object.go @@ -0,0 +1,152 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package common + +import ( + "context" + "time" + + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/klog/v2" + "k8s.io/perf-tests/clusterloader2/pkg/measurement" + measurementutil "k8s.io/perf-tests/clusterloader2/pkg/measurement/util" + "k8s.io/perf-tests/clusterloader2/pkg/util" +) + +const ( + defaultWaitForGenericK8sObjectsTimeout = 30 * time.Minute + defaultWaitForGenericK8sObjectsInterval = 30 * time.Second + waitForGenericK8sObjectsMeasurementName = "WaitForGenericK8sObjects" +) + +func init() { + if err := measurement.Register(waitForGenericK8sObjectsMeasurementName, createWaitForGenericK8sObjectsMeasurement); err != nil { + klog.Fatalf("Cannot register %s: %v", waitForGenericK8sObjectsMeasurementName, err) + } +} + +func createWaitForGenericK8sObjectsMeasurement() measurement.Measurement { + return &waitForGenericK8sObjectsMeasurement{} +} + +type waitForGenericK8sObjectsMeasurement struct{} + +// Execute waits until desired number of k8s objects reached given conditions. +// Conditions can denote either success or failure. The measurement assumes the +// k8s object has a status.conditions field, which contains a []metav1.Condition. +// More here: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties +// Measurement will timeout if not enough objects have required conditions. +func (w *waitForGenericK8sObjectsMeasurement) Execute(config *measurement.Config) ([]measurement.Summary, error) { + groupVersionResource, err := getGroupVersionResource(config.Params) + if err != nil { + return nil, err + } + namespaces, err := getNamespaces(config.ClusterFramework.GetAutomanagedNamespacePrefix(), config.Params) + if err != nil { + return nil, err + } + timeout, err := util.GetDurationOrDefault(config.Params, "timeout", defaultWaitForGenericK8sObjectsTimeout) + if err != nil { + return nil, err + } + refreshInterval, err := util.GetDurationOrDefault(config.Params, "refreshInterval", defaultWaitForGenericK8sObjectsInterval) + if err != nil { + return nil, err + } + successfulConditions, err := util.GetStringArray(config.Params, "successfulConditions") + if err != nil { + return nil, err + } + failedConditions, err := util.GetStringArray(config.Params, "failedConditions") + if err != nil { + return nil, err + } + minDesiredObjectCount, err := util.GetInt(config.Params, "minDesiredObjectCount") + if err != nil { + return nil, err + } + maxFailedObjectCount, err := util.GetInt(config.Params, "maxFailedObjectCount") + if err != nil { + return nil, err + } + + dynamicClient := config.ClusterFramework.GetDynamicClients().GetClient() + ctx, cancel := context.WithTimeout(context.TODO(), timeout) + defer cancel() + + options := &measurementutil.WaitForGenericK8sObjectsOptions{ + GroupVersionResource: groupVersionResource, + Namespaces: namespaces, + SuccessfulConditions: successfulConditions, + FailedConditions: failedConditions, + MinDesiredObjectCount: minDesiredObjectCount, + MaxFailedObjectCount: maxFailedObjectCount, + CallerName: w.String(), + WaitInterval: refreshInterval, + } + return nil, measurementutil.WaitForGenericK8sObjects(ctx, dynamicClient, options) +} + +// Dispose cleans up after the measurement. +func (*waitForGenericK8sObjectsMeasurement) Dispose() {} + +// String returns a string representation of the measurement. +func (*waitForGenericK8sObjectsMeasurement) String() string { + return waitForGenericK8sObjectsMeasurementName +} + +func getGroupVersionResource(params map[string]interface{}) (schema.GroupVersionResource, error) { + group, err := util.GetString(params, "objectGroup") + if err != nil { + return schema.GroupVersionResource{}, err + } + version, err := util.GetString(params, "objectVersion") + if err != nil { + return schema.GroupVersionResource{}, err + } + resource, err := util.GetString(params, "objectResource") + if err != nil { + return schema.GroupVersionResource{}, err + } + + return schema.GroupVersionResource{ + Group: group, + Version: version, + Resource: resource, + }, nil +} + +func getNamespaces(namespacesPrefix string, params map[string]interface{}) (measurementutil.NamespacesRange, error) { + namespaceRange, err := util.GetMap(params, "namespaceRange") + if err != nil { + return measurementutil.NamespacesRange{}, err + } + min, err := util.GetInt(namespaceRange, "min") + if err != nil { + return measurementutil.NamespacesRange{}, err + } + max, err := util.GetInt(namespaceRange, "max") + if err != nil { + return measurementutil.NamespacesRange{}, err + } + + return measurementutil.NamespacesRange{ + Prefix: namespacesPrefix, + Min: min, + Max: max, + }, nil +} diff --git a/clusterloader2/pkg/measurement/util/object_store_dynamic.go b/clusterloader2/pkg/measurement/util/object_store_dynamic.go new file mode 100644 index 0000000000..155df1c3a7 --- /dev/null +++ b/clusterloader2/pkg/measurement/util/object_store_dynamic.go @@ -0,0 +1,114 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +This file is copy of https://github.com/kubernetes/kubernetes/blob/master/test/utils/pod_store.go +with slight changes regarding labelSelector and flagSelector applied. +*/ + +package util + +import ( + "context" + "encoding/json" + "fmt" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/dynamic/dynamicinformer" + "k8s.io/client-go/tools/cache" +) + +const ( + defaultResyncInterval = 10 * time.Second +) + +// DynamicObjectStore is a convenient wrapper around cache.GenericLister. +type DynamicObjectStore struct { + cache.GenericLister + namespaces map[string]bool +} + +// NewDynamicObjectStore creates DynamicObjectStore based on given object version resource and selector. +func NewDynamicObjectStore(ctx context.Context, dynamicClient dynamic.Interface, gvr schema.GroupVersionResource, namespaces map[string]bool) (*DynamicObjectStore, error) { + informerFactory := dynamicinformer.NewDynamicSharedInformerFactory(dynamicClient, defaultResyncInterval) + lister := informerFactory.ForResource(gvr).Lister() + informerFactory.Start(ctx.Done()) + informerFactory.WaitForCacheSync(ctx.Done()) + + return &DynamicObjectStore{ + GenericLister: lister, + namespaces: namespaces, + }, nil +} + +// ListObjectSimplifications returns list of objects with conditions for each object that was returned by lister. +func (s *DynamicObjectStore) ListObjectSimplifications() ([]ObjectSimplification, error) { + objects, err := s.GenericLister.List(labels.Everything()) + if err != nil { + return nil, err + } + + result := make([]ObjectSimplification, 0, len(objects)) + for _, o := range objects { + os, err := getObjectSimplification(o) + if err != nil { + return nil, err + } + if !s.namespaces[os.Metadata.Namespace] { + continue + } + result = append(result, os) + } + return result, nil +} + +// ObjectSimplification represents the content of the object +// that is needed to be handled by this measurement. +type ObjectSimplification struct { + Metadata metav1.ObjectMeta `json:"metadata"` + Status StatusWithConditions `json:"status"` +} + +// StatusWithConditions represents the content of the status field +// that is required to be handled by this measurement. +type StatusWithConditions struct { + Conditions []metav1.Condition `json:"conditions"` +} + +func (o ObjectSimplification) String() string { + return fmt.Sprintf("%s/%s", o.Metadata.Namespace, o.Metadata.Name) +} + +func getObjectSimplification(o runtime.Object) (ObjectSimplification, error) { + dataMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(o) + if err != nil { + return ObjectSimplification{}, err + } + + jsonBytes, err := json.Marshal(dataMap) + if err != nil { + return ObjectSimplification{}, err + } + + object := ObjectSimplification{} + err = json.Unmarshal(jsonBytes, &object) + return object, err +} diff --git a/clusterloader2/pkg/measurement/util/wait_for_conditions.go b/clusterloader2/pkg/measurement/util/wait_for_conditions.go new file mode 100644 index 0000000000..362b16a3be --- /dev/null +++ b/clusterloader2/pkg/measurement/util/wait_for_conditions.go @@ -0,0 +1,148 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + "context" + "fmt" + "strings" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/dynamic" + "k8s.io/klog/v2" +) + +// WaitForGenericK8sObjectsOptions is an options object used by WaitForGenericK8sObjectsNodes methods. +type WaitForGenericK8sObjectsOptions struct { + // GroupVersionResource identifies the resource to fetch. + GroupVersionResource schema.GroupVersionResource + // Namespaces identifies namespaces which should be observed. + Namespaces NamespacesRange + // SuccessfulConditions lists conditions to look for in the objects denoting good objects. + // Formatted as `ConditionType=ConditionStatus`, e.g. `Scheduled=true`. + SuccessfulConditions []string + // SuccessfulConditions lists conditions to look for in the objects denoting good objects. + // Formatted as `ConditionType=ConditionStatus`, e.g. `Scheduled=true`. + FailedConditions []string + // MinDesiredObjectCount describes minimum number of objects that should contain + // successful or failed condition. + MinDesiredObjectCount int + // MaxFailedObjectCount describes maximum number of objects that could contain failed condition. + MaxFailedObjectCount int + // CallerName identifies the measurement making the calls. + CallerName string + // WaitInterval contains interval for which the function waits between refreshes. + WaitInterval time.Duration +} + +// NamespacesRange represents namespace range which will be queried. +type NamespacesRange struct { + Prefix string + Min int + Max int +} + +// Summary returns summary which should be included in all logs. +func (o *WaitForGenericK8sObjectsOptions) Summary() string { + return fmt.Sprintf("%s: objects: %q, namespaces: %q", o.CallerName, o.GroupVersionResource.String(), o.Namespaces.String()) +} + +// String returns printable representation of the namespaces range. +func (nr *NamespacesRange) String() string { + return fmt.Sprintf("%s-(%d-%d)", nr.Prefix, nr.Min, nr.Max) +} + +// getMap returns a map with namespaces which should be queried. +func (nr *NamespacesRange) getMap() map[string]bool { + result := map[string]bool{} + for i := nr.Min; i <= nr.Max; i++ { + result[fmt.Sprintf("%s-%d", nr.Prefix, i)] = true + } + return result +} + +// WaitForGenericK8sObjects waits till the desired number of k8s objects +// fulfills given conditions requirements, ctx.Done() channel is used to +// wait for timeout. +func WaitForGenericK8sObjects(ctx context.Context, dynamicClient dynamic.Interface, options *WaitForGenericK8sObjectsOptions) error { + store, err := NewDynamicObjectStore(ctx, dynamicClient, options.GroupVersionResource, options.Namespaces.getMap()) + if err != nil { + return err + } + + objects, err := store.ListObjectSimplifications() + if err != nil { + return err + } + successful, failed, count := countObjectsMatchingConditions(objects, options.SuccessfulConditions, options.FailedConditions) + for { + select { + case <-ctx.Done(): + return fmt.Errorf("%s: timeout while waiting for %d objects to be successful or failed - currently there are: successful=%d failed=%d count=%d", + options.Summary(), options.MinDesiredObjectCount, len(successful), len(failed), count) + case <-time.After(options.WaitInterval): + objects, err := store.ListObjectSimplifications() + if err != nil { + return err + } + successful, failed, count = countObjectsMatchingConditions(objects, options.SuccessfulConditions, options.FailedConditions) + + klog.V(2).Infof("%s: successful=%d failed=%d count=%d", options.Summary(), len(successful), len(failed), count) + if options.MinDesiredObjectCount <= len(successful)+len(failed) { + if options.MaxFailedObjectCount < len(failed) { + return fmt.Errorf("%s: too many failed objects, expected at most %d - currently there are: successful=%d failed=%d count=%d failed-objects=[%s]", + options.Summary(), options.MaxFailedObjectCount, len(successful), len(failed), count, strings.Join(failed, ",")) + } + return nil + } + } + } +} + +// countObjectsMatchingConditions counts objects that have a successful or failed condition. +// Function assumes the conditions it looks for are mutually exclusive. +func countObjectsMatchingConditions(objects []ObjectSimplification, successfulConditions []string, failedConditions []string) (successful []string, failed []string, count int) { + successfulMap := map[string]bool{} + for _, c := range successfulConditions { + successfulMap[c] = true + } + failedMap := map[string]bool{} + for _, c := range failedConditions { + failedMap[c] = true + } + + count = len(objects) + for _, object := range objects { + for _, c := range object.Status.Conditions { + if successfulMap[conditionToKey(c)] { + successful = append(successful, object.String()) + break + } + if failedMap[conditionToKey(c)] { + failed = append(failed, object.String()) + break + } + } + } + return +} + +func conditionToKey(c metav1.Condition) string { + return fmt.Sprintf("%s=%s", c.Type, c.Status) +} diff --git a/clusterloader2/pkg/measurement/util/wait_for_conditions_test.go b/clusterloader2/pkg/measurement/util/wait_for_conditions_test.go new file mode 100644 index 0000000000..1a22013a79 --- /dev/null +++ b/clusterloader2/pkg/measurement/util/wait_for_conditions_test.go @@ -0,0 +1,236 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + "context" + "testing" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/dynamic/fake" +) + +func TestWaitForGenericK8sObjects(t *testing.T) { + + tests := []struct { + name string + timeout time.Duration + options *WaitForGenericK8sObjectsOptions + existingObjects []exampleObject + wantErr bool + }{ + { + name: "one successful object", + timeout: 1 * time.Second, + options: &WaitForGenericK8sObjectsOptions{ + GroupVersionResource: schema.GroupVersionResource{ + Group: "kuberentes.io", + Version: "v1alpha1", + Resource: "Conditions", + }, + Namespaces: NamespacesRange{ + Prefix: "namespace", + Min: 1, + Max: 1, + }, + SuccessfulConditions: []string{"Successful=True"}, + FailedConditions: []string{}, + MinDesiredObjectCount: 1, + MaxFailedObjectCount: 0, + CallerName: "test", + WaitInterval: 100 * time.Millisecond, + }, + existingObjects: []exampleObject{ + newExampleObject("test-1", "namespace-1", []interface{}{ + map[string]interface{}{ + "type": "Successful", + "status": "True", + }, + }), + }, + }, + { + name: "one failed object", + timeout: 1 * time.Second, + options: &WaitForGenericK8sObjectsOptions{ + GroupVersionResource: schema.GroupVersionResource{ + Group: "kuberentes.io", + Version: "v1alpha1", + Resource: "Conditions", + }, + Namespaces: NamespacesRange{ + Prefix: "namespace", + Min: 1, + Max: 1, + }, + SuccessfulConditions: []string{"Successful=True"}, + FailedConditions: []string{"Failed=True"}, + MinDesiredObjectCount: 1, + MaxFailedObjectCount: 0, + CallerName: "test", + WaitInterval: 100 * time.Millisecond, + }, + existingObjects: []exampleObject{ + newExampleObject("test-1", "namespace-1", []interface{}{ + map[string]interface{}{ + "type": "Successful", + "status": "False", + }, + map[string]interface{}{ + "type": "Failed", + "status": "True", + }, + }), + }, + wantErr: true, + }, + { + name: "one failed object, but one is acceptable", + timeout: 1 * time.Second, + options: &WaitForGenericK8sObjectsOptions{ + GroupVersionResource: schema.GroupVersionResource{ + Group: "kuberentes.io", + Version: "v1alpha1", + Resource: "Conditions", + }, + Namespaces: NamespacesRange{ + Prefix: "namespace", + Min: 1, + Max: 1, + }, + SuccessfulConditions: []string{"Successful=True"}, + FailedConditions: []string{"Failed=True"}, + MinDesiredObjectCount: 3, + MaxFailedObjectCount: 1, + CallerName: "test", + WaitInterval: 100 * time.Millisecond, + }, + existingObjects: []exampleObject{ + newExampleObject("test-1", "namespace-1", []interface{}{ + map[string]interface{}{ + "type": "Successful", + "status": "False", + }, + map[string]interface{}{ + "type": "Failed", + "status": "True", + }, + }), + newExampleObject("test-2", "namespace-1", []interface{}{ + map[string]interface{}{ + "type": "Successful", + "status": "True", + }, + }), + newExampleObject("test-3", "namespace-1", []interface{}{ + map[string]interface{}{ + "type": "Successful", + "status": "True", + }, + }), + }, + }, + { + name: "timeout due not enough objects", + timeout: 1 * time.Second, + options: &WaitForGenericK8sObjectsOptions{ + GroupVersionResource: schema.GroupVersionResource{ + Group: "kuberentes.io", + Version: "v1alpha1", + Resource: "Conditions", + }, + Namespaces: NamespacesRange{ + Prefix: "namespace", + Min: 1, + Max: 1, + }, + SuccessfulConditions: []string{"Successful=True"}, + FailedConditions: []string{"Failed=True"}, + MinDesiredObjectCount: 3, + MaxFailedObjectCount: 1, + CallerName: "test", + WaitInterval: 100 * time.Millisecond, + }, + existingObjects: []exampleObject{ + newExampleObject("test-1", "namespace-1", []interface{}{ + map[string]interface{}{ + "type": "Successful", + "status": "False", + }, + map[string]interface{}{ + "type": "Failed", + "status": "True", + }, + }), + newExampleObject("test-2", "namespace-1", []interface{}{ + map[string]interface{}{ + "type": "Successful", + "status": "True", + }, + }), + }, + wantErr: true, + }, + } + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + ctx, cancel := context.WithTimeout(context.Background(), tt.timeout) + defer cancel() + dynamicClient := fake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), map[schema.GroupVersionResource]string{ + tt.options.GroupVersionResource: "ConditionsList", + }) + for _, o := range tt.existingObjects { + c := dynamicClient.Resource(tt.options.GroupVersionResource).Namespace(o.Namespace) + if _, err := c.Create(ctx, o.Unstructured, metav1.CreateOptions{}); err != nil { + t.Fatalf("Failed to create an existing object %v, got error: %v", o, err) + } + } + + if err := WaitForGenericK8sObjects(ctx, dynamicClient, tt.options); (err != nil) != tt.wantErr { + t.Errorf("WaitForGenericK8sObjects() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + +type exampleObject struct { + Namespace string + Unstructured *unstructured.Unstructured +} + +func newExampleObject(name, namespace string, conditions []interface{}) exampleObject { + return exampleObject{ + Namespace: namespace, + Unstructured: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "metadata": map[string]interface{}{ + "name": name, + "namespace": namespace, + }, + "status": map[string]interface{}{ + "conditions": conditions, + }, + }, + }, + } +} diff --git a/clusterloader2/pkg/provider/aws.go b/clusterloader2/pkg/provider/aws.go index b3934f6110..fb6629e210 100644 --- a/clusterloader2/pkg/provider/aws.go +++ b/clusterloader2/pkg/provider/aws.go @@ -38,6 +38,7 @@ func NewAWSProvider(_ map[string]string) Provider { SupportProbe: true, SupportResourceUsageMetering: true, SupportSSHToMaster: true, + SupportKubeStateMetrics: true, }, } } diff --git a/clusterloader2/pkg/provider/eks.go b/clusterloader2/pkg/provider/eks.go index 171355a32d..80b0676ac7 100644 --- a/clusterloader2/pkg/provider/eks.go +++ b/clusterloader2/pkg/provider/eks.go @@ -29,6 +29,7 @@ type EKSProvider struct { func NewEKSProvider(_ map[string]string) Provider { return &EKSProvider{ features: Features{ + ShouldPrometheusScrapeApiserverOnly: true, SupportProbe: true, SupportImagePreload: true, SupportEnablePrometheusServer: true, @@ -36,6 +37,7 @@ func NewEKSProvider(_ map[string]string) Provider { SupportAccessAPIServerPprofEndpoint: true, SupportResourceUsageMetering: true, ShouldScrapeKubeProxy: true, + SupportKubeStateMetrics: true, }, } } diff --git a/clusterloader2/pkg/test/simple_test_executor.go b/clusterloader2/pkg/test/simple_test_executor.go index 80ae168c30..adfd933dbc 100644 --- a/clusterloader2/pkg/test/simple_test_executor.go +++ b/clusterloader2/pkg/test/simple_test_executor.go @@ -180,7 +180,10 @@ func (ste *simpleExecutor) ExecuteStep(ctx Context, step *api.Step) *errors.Erro // ExecutePhase executes single test phase based on provided phase configuration. func (ste *simpleExecutor) ExecutePhase(ctx Context, phase *api.Phase) *errors.ErrorList { errList := errors.NewErrorList() - nsList := createNamespacesList(ctx, phase.NamespaceRange) + nsList := phase.NamespaceList + if nsList == nil { + nsList = createNamespacesList(ctx, phase.NamespaceRange) + } tuningSet, err := ctx.GetFactory().CreateTuningSet(phase.TuningSet) if err != nil { return errors.NewErrorList(fmt.Errorf("tuning set creation error: %v", err)) diff --git a/clusterloader2/pkg/util/util.go b/clusterloader2/pkg/util/util.go index 18b00a13ff..0069ce544c 100644 --- a/clusterloader2/pkg/util/util.go +++ b/clusterloader2/pkg/util/util.go @@ -23,6 +23,8 @@ import ( "math/rand" "strconv" "time" + + "k8s.io/apimachinery/pkg/labels" ) // ErrKeyNotFound is returned when key doesn't exists in a map. @@ -93,6 +95,11 @@ func GetStringArray(dict map[string]interface{}, key string) ([]string, error) { return getStringArray(dict, key) } +// GetLabelSelector tries to return value from map parsed as labels.Selector type. If value doesn't exist, error is returned. +func GetLabelSelector(dict map[string]interface{}, key string) (*labels.Selector, error) { + return getLabelSelector(dict, key) +} + // GetStringOrDefault tries to return value from map cast to string type. If value doesn't exist default value is used. func GetStringOrDefault(dict map[string]interface{}, key string, defaultValue string) (string, error) { value, err := getString(dict, key) @@ -138,6 +145,20 @@ func GetBoolOrDefault(dict map[string]interface{}, key string, defaultValue bool return value, err } +func getLabelSelector(dict map[string]interface{}, key string) (*labels.Selector, error) { + value, err := getString(dict, key) + if err != nil { + return nil, err + } + + selector, err := labels.Parse(value) + if err != nil { + return nil, err + } + + return &selector, nil +} + func getMap(dict map[string]interface{}, key string) (map[string]interface{}, error) { value, exists := dict[key] if !exists || value == nil { diff --git a/clusterloader2/pkg/util/util_test.go b/clusterloader2/pkg/util/util_test.go index 7c44614e32..b9af670e0c 100644 --- a/clusterloader2/pkg/util/util_test.go +++ b/clusterloader2/pkg/util/util_test.go @@ -20,6 +20,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "k8s.io/apimachinery/pkg/labels" ) type test struct { @@ -99,3 +100,40 @@ func TestToStruct(t *testing.T) { }) } } + +func TestGetLabelSelector(t *testing.T) { + tests := []struct { + name string + value interface{} + matches labels.Labels + wantErr bool + }{ + { + name: "error with non-string value", + value: 1, + wantErr: true, + }, + { + name: "error with bad label selector value", + value: "?i am a bad label selector?", + wantErr: true, + }, + { + name: "no error with good label selector value", + value: "app=test", + matches: labels.Set{"app": "test"}, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + l, err := GetLabelSelector(map[string]interface{}{"key": tt.value}, "key") + if (err != nil) != tt.wantErr { + t.Errorf("GetLabelSelector() error = %v, wantErr %v", err, tt.wantErr) + } + if !tt.wantErr { + assert.Equal(t, true, (*l).Matches(tt.matches)) + } + }) + } +} diff --git a/clusterloader2/testing/list/README.md b/clusterloader2/testing/list/README.md new file mode 100644 index 0000000000..07fa8362eb --- /dev/null +++ b/clusterloader2/testing/list/README.md @@ -0,0 +1,16 @@ +## List load test + +List load test perform the following steps: +- Create configmaps and secrets in a set of namespaces. + - The namespaces used here are managed by CL2. + - The number of namespaces is derived from `NODES_PER_NAMESPACE`. Namespaces will be 2, if there are no nodes. + - The size of a single configmap and secret can be speficed using `CL2_LIST_CONFIG_MAP_BYTES` and `CL2_LIST_SECRET_BYTES` respectively. + - The number of configmaps and secrets can be specified using `CL2_LIST_CONFIG_MAP_NUMBER` and `CL2_LIST_SECRET_NUMBER` respectively. +- Create RBAC rules to allow lister pods to access these configmaps and secrets +- Create lister pods using deployment in a separate namespace to list configmaps and secrets. + - The namespace is created using `namespace.yaml` as a template, but its lifecycle is managed by CL2. + - The number of replicas for the lister pods can be specified using `CL2_LIST_BENCHMARK_PODS`. + - Each lister pod will maintain `CL2_LIST_CONCURRENCY` number of inflight list requests. +- Measurement uses [`APIResponsivenessPrometheusSimple`](https://github.com/kubernetes/perf-tests/blob/master/clusterloader2/README.md) to meansure API latency for list configmaps and secrets calls. + +The lister pods leverage https://github.com/kubernetes/perf-tests/tree/master/util-images/request-benchmark to create in-cluster list load. diff --git a/clusterloader2/testing/list/clusterrole.yaml b/clusterloader2/testing/list/clusterrole.yaml new file mode 100644 index 0000000000..e8cb88a723 --- /dev/null +++ b/clusterloader2/testing/list/clusterrole.yaml @@ -0,0 +1,11 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: list-clusterrole +rules: +- apiGroups: + - "" + resources: + - "*" + verbs: + - list diff --git a/clusterloader2/testing/list/clusterrolebinding.yaml b/clusterloader2/testing/list/clusterrolebinding.yaml new file mode 100644 index 0000000000..871a480b77 --- /dev/null +++ b/clusterloader2/testing/list/clusterrolebinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{.Name}} +subjects: +- kind: ServiceAccount + name: default + namespace: list-benchmark-0 +roleRef: + kind: ClusterRole + name: list-clusterrole-0 + apiGroup: rbac.authorization.k8s.io diff --git a/clusterloader2/testing/list/config.yaml b/clusterloader2/testing/list/config.yaml new file mode 100644 index 0000000000..f744b42284 --- /dev/null +++ b/clusterloader2/testing/list/config.yaml @@ -0,0 +1,194 @@ +# List benchmark +{{$NODES_PER_NAMESPACE := DefaultParam .NODES_PER_NAMESPACE 5}} +{{$namespaces := DivideInt .Nodes $NODES_PER_NAMESPACE}} +{{$namespaceNumber := MaxInt $namespaces 2}} + +{{$configMapBytes := DefaultParam .CL2_LIST_CONFIG_MAP_BYTES 1000}} +{{$configMapNumber := DefaultParam .CL2_LIST_CONFIG_MAP_NUMBER 300}} +{{$configMapGroup := DefaultParam .CL2_LIST_CONFIG_MAP_GROUP "list-configmap"}} + +{{$secretBytes := DefaultParam .CL2_LIST_SECRET_BYTES 1000}} +{{$secretNumber := DefaultParam .CL2_LIST_SECRET_NUMBER 300}} +{{$secretGroup := DefaultParam .CL2_LIST_SECRET_GROUP "list-secret"}} + +{{$listReplicas := DefaultParam .CL2_LIST_BENCHMARK_PODS 1}} +{{$inflight := DefaultParam .CL2_LIST_CONCURRENCY 1}} + +{{$listConfigMapsPodCpu := MultiplyInt $inflight (MultiplyInt (DivideInt $configMapBytes 1000) $configMapNumber)}} +{{$listConfigMapsPodMemory := MultiplyInt $inflight (MultiplyInt (DivideInt $configMapBytes 1000) $configMapNumber)}} +{{$listSecretsPodCpu := MultiplyInt $inflight (MultiplyInt (DivideInt $secretBytes 1000) $secretNumber)}} +{{$listSecretsPodMemory := MultiplyInt $inflight (MultiplyInt (DivideInt $secretBytes 1000) $secretNumber)}} + +# CL2_LIST_BENCHMARK_POD_CPU and CL2_LIST_BENCHMARK_POD_MEMORY are expected to be an integer-only value. +# We will append m (milicores) and Mi for them respectively. +{{$namespacedPodCpu := DefaultParam .CL2_LIST_BENCHMARK_POD_CPU (MaxInt $listConfigMapsPodCpu $listSecretsPodCpu)}} +{{$namespacedPodMemory := DefaultParam .CL2_LIST_BENCHMARK_POD_MEMORY (MaxInt $listConfigMapsPodMemory $listSecretsPodMemory)}} +{{$clusterScopedPodCpu := MultiplyInt $namespaceNumber $namespacedPodCpu}} +{{$clusterScopedPodMemory := MultiplyInt $namespaceNumber $namespacedPodMemory}} + +name: List benchmark +namespace: + number: {{$namespaceNumber}} +tuningSets: +- name: Sequence + parallelismLimitedLoad: + parallelismLimit: 10 +steps: +- name: Setup namespace for list benchmark pods + phases: + - replicasPerNamespace: 1 + tuningSet: Sequence + objectBundle: + - basename: list-benchmark + objectTemplatePath: namespace.yaml +- name: Setup permissions + phases: + - replicasPerNamespace: 1 + tuningSet: Sequence + objectBundle: + - basename: list-clusterrole + objectTemplatePath: clusterrole.yaml + - replicasPerNamespace: 1 + tuningSet: Sequence + objectBundle: + - basename: list-clusterrolebinding + objectTemplatePath: clusterrolebinding.yaml + - namespaceRange: + min: 1 + max: {{$namespaceNumber}} + replicasPerNamespace: 1 + tuningSet: Sequence + objectBundle: + - basename: list-rolebinding + objectTemplatePath: rolebinding.yaml + +- name: Create configmaps + phases: + - namespaceRange: + min: 1 + max: {{$namespaceNumber}} + tuningSet: Sequence + replicasPerNamespace: {{$configMapNumber}} + objectBundle: + - basename: {{$configMapGroup}} + objectTemplatePath: configmap.yaml + templateFillMap: + bytes: {{$configMapBytes}} + group: {{$configMapGroup}} + - namespaceRange: + min: 1 + max: {{$namespaceNumber}} + tuningSet: Sequence + replicasPerNamespace: {{$secretNumber}} + objectBundle: + - basename: {{$secretGroup}} + objectTemplatePath: secret.yaml + templateFillMap: + bytes: {{$secretBytes}} + group: {{$secretGroup}} + +- name: "Starting measurement - list benchmark" + measurements: + - Identifier: APIResponsivenessPrometheusSimple + Method: APIResponsivenessPrometheus + Params: + action: start + enableViolations: false + useSimpleLatencyQuery: true + +- module: + path: modules/list-benchmark.yaml + params: + namePrefix: "list-namespaced-configmaps-" + replicas: {{$listReplicas}} + inflight: {{$inflight}} + uri: /api/v1/namespaces/%namespace%/configmaps + cpu: {{$namespacedPodCpu}}m + memory: {{$namespacedPodMemory}}Mi + namespaced: true + namespaceNumber: {{$namespaceNumber}} +- module: + path: modules/list-benchmark.yaml + params: + namePrefix: "list-cluster-scoped-configmaps-" + replicas: {{$listReplicas}} + inflight: {{$inflight}} + uri: /api/v1/configmaps + cpu: {{$clusterScopedPodCpu}}m + memory: {{$clusterScopedPodMemory}}Mi + namespaced: false +- name: Wait 5 minutes + measurements: + - Identifier: Wait + Method: Sleep + Params: + duration: 5m +- module: + path: modules/list-benchmark.yaml + params: + namePrefix: "list-namespaced-configmaps-" + namespaced: true + namespaceNumber: {{$namespaceNumber}} + replicas: 0 +- module: + path: modules/list-benchmark.yaml + params: + namePrefix: "list-cluster-scoped-configmaps-" + replicas: 0 + +- module: + path: modules/list-benchmark.yaml + params: + namePrefix: "list-namespaced-secrets-" + replicas: {{$listReplicas}} + inflight: {{$inflight}} + uri: /api/v1/namespaces/%namespace%/secrets + cpu: {{$namespacedPodCpu}}m + memory: {{$namespacedPodMemory}}Mi + namespaced: true + namespaceNumber: {{$namespaceNumber}} +- module: + path: modules/list-benchmark.yaml + params: + namePrefix: "list-cluster-scoped-secrets-" + replicas: {{$listReplicas}} + inflight: {{$inflight}} + uri: /api/v1/secrets + cpu: {{$clusterScopedPodCpu}}m + memory: {{$clusterScopedPodMemory}}Mi + namespaced: false +- name: Wait 5 minutes + measurements: + - Identifier: Wait + Method: Sleep + Params: + duration: 5m +- module: + path: modules/list-benchmark.yaml + params: + namePrefix: "list-namespaced-secrets-" + namespaced: true + namespaceNumber: {{$namespaceNumber}} + replicas: 0 +- module: + path: modules/list-benchmark.yaml + params: + namePrefix: "list-cluster-scoped-secrets-" + replicas: 0 + +- name: deleting namespace for list benchmark pods + phases: + - replicasPerNamespace: 0 + tuningSet: Sequence + objectBundle: + - basename: list-benchmark + objectTemplatePath: namespace.yaml + +- name: "Gathering measurement - list benchmark" + measurements: + - Identifier: APIResponsivenessPrometheusSimple + Method: APIResponsivenessPrometheus + Params: + action: gather + enableViolations: false + useSimpleLatencyQuery: true diff --git a/clusterloader2/testing/list/configmap.yaml b/clusterloader2/testing/list/configmap.yaml new file mode 100644 index 0000000000..6e0582cb9d --- /dev/null +++ b/clusterloader2/testing/list/configmap.yaml @@ -0,0 +1,11 @@ +{{$bytes := .bytes}} +{{$group := DefaultParam .group .Name}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{.Name}} + labels: + group: {{$group}} +data: + key: "{{RandData $bytes}}" diff --git a/clusterloader2/testing/list/deployment.yaml b/clusterloader2/testing/list/deployment.yaml new file mode 100644 index 0000000000..647f872799 --- /dev/null +++ b/clusterloader2/testing/list/deployment.yaml @@ -0,0 +1,37 @@ +# The source of the image is at https://github.com/kubernetes/perf-tests/tree/master/util-images/request-benchmark +{{$image := DefaultParam .CL2_BENCHMARK_IMAGE "gcr.io/k8s-testimages/perf-tests-util/request-benchmark:latest"}} +{{$cpu := DefaultParam .cpu "200m"}} +{{$memory := DefaultParam .memory "400Mi"}} + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{.Name}} + labels: + group: benchmark +spec: + replicas: {{.Replicas}} + selector: + matchLabels: + name: {{.Name}} + template: + metadata: + labels: + name: {{.Name}} + group: benchmark + spec: + containers: + - name: {{.Name}} + image: {{$image}} + imagePullPolicy: Always + args: + - --inflight={{.Inflight}} + - --namespace={{.Namespace}} + - --uri={{.Uri}} + resources: + requests: + cpu: {{$cpu}} + memory: {{$memory}} + limits: + cpu: {{$cpu}} + memory: {{$memory}} diff --git a/clusterloader2/testing/list/modules/list-benchmark.yaml b/clusterloader2/testing/list/modules/list-benchmark.yaml new file mode 100644 index 0000000000..6ae66c781b --- /dev/null +++ b/clusterloader2/testing/list/modules/list-benchmark.yaml @@ -0,0 +1,50 @@ +{{$namePrefix := DefaultParam .namePrefix "list-benchmark-"}} +{{$replicas := DefaultParam .replicas 0}} +{{$inflight := DefaultParam .inflight 0}} +{{$uri := DefaultParam .uri "/"}} +{{$namespaced := DefaultParam .namespaced false}} +{{$namespaceNumber := DefaultParam .namespaceNumber 0}} +{{$cpu := DefaultParam .cpu "200m"}} +{{$memory := DefaultParam .memory "400Mi"}} + +steps: +- name: Creating WaitForControlledPodsRunning measurement + measurements: + - Identifier: WaitForListBenchmarkDeployment + Method: WaitForControlledPodsRunning + Params: + action: start + apiVersion: apps/v1 + checkIfPodsAreUpdated: true + kind: Deployment + labelSelector: group = benchmark + operationTimeout: 5m +- name: Deploying {{$namePrefix}}deployment + phases: + - tuningSet: Sequence + replicasPerNamespace: 1 +{{if $namespaced}} + namespaceRange: + min: 1 + max: {{$namespaceNumber}} +{{else}} + namespaceRange: + min: 0 + max: 0 + basename: list-benchmark +{{end}} + objectBundle: + - basename: {{$namePrefix}}deploy + objectTemplatePath: deployment.yaml + templateFillMap: + Replicas: {{$replicas}} + Inflight: {{$inflight}} + Uri: {{$uri}} + cpu: {{$cpu}} + memory: {{$memory}} +- name: Waiting for WaitForControlledPodsRunning gather + measurements: + - Identifier: WaitForListBenchmarkDeployment + Method: WaitForControlledPodsRunning + Params: + action: gather diff --git a/clusterloader2/testing/list/namespace.yaml b/clusterloader2/testing/list/namespace.yaml new file mode 100644 index 0000000000..7543a92f49 --- /dev/null +++ b/clusterloader2/testing/list/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: list-benchmark diff --git a/clusterloader2/testing/list/rolebinding.yaml b/clusterloader2/testing/list/rolebinding.yaml new file mode 100644 index 0000000000..947e178569 --- /dev/null +++ b/clusterloader2/testing/list/rolebinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{.Name}} +subjects: +- kind: ServiceAccount + name: default + namespace: {{.Namespace}} +roleRef: + kind: ClusterRole + name: list-clusterrole-0 + apiGroup: rbac.authorization.k8s.io diff --git a/clusterloader2/testing/list/secret.yaml b/clusterloader2/testing/list/secret.yaml new file mode 100644 index 0000000000..f0044b1ed3 --- /dev/null +++ b/clusterloader2/testing/list/secret.yaml @@ -0,0 +1,12 @@ +{{$bytes := .bytes}} +{{$group := DefaultParam .group .Name}} + +apiVersion: v1 +kind: Secret +metadata: + name: {{.Name}} + labels: + group: {{$group}} +type: Opaque +stringData: + password: {{RandData $bytes}} diff --git a/clusterloader2/testing/load/modules/measurements.yaml b/clusterloader2/testing/load/modules/measurements.yaml index e5706d504b..2cd50212a9 100644 --- a/clusterloader2/testing/load/modules/measurements.yaml +++ b/clusterloader2/testing/load/modules/measurements.yaml @@ -36,6 +36,9 @@ {{$PROBE_MEASUREMENTS_PING_SLEEP_DURATION := DefaultParam .CL2_PROBE_MEASUREMENTS_PING_SLEEP_DURATION "1s"}} {{$RESTART_COUNT_THRESHOLD_OVERRIDES:= DefaultParam .RESTART_COUNT_THRESHOLD_OVERRIDES ""}} {{$USE_SIMPLE_LATENCY_QUERY := DefaultParam .USE_SIMPLE_LATENCY_QUERY false}} +{{$ENABLE_VIOLATIONS_FOR_NETWORK_PROGRAMMING_LATENCIES := DefaultParam .CL2_ENABLE_VIOLATIONS_FOR_NETWORK_PROGRAMMING_LATENCIES false}} +{{$NETWORK_PROGRAMMING_LATENCY_THRESHOLD := DefaultParam .CL2_NETWORK_PROGRAMMING_LATENCY_THRESHOLD "30s"}} +{{$NETWORK_LATENCY_THRESHOLD := DefaultParam .CL2_NETWORK_LATENCY_THRESHOLD "0s"}} # Probe measurements shared parameter {{$PROBE_MEASUREMENTS_CHECK_PROBES_READY_TIMEOUT := DefaultParam .CL2_PROBE_MEASUREMENTS_CHECK_PROBES_READY_TIMEOUT "15m"}} @@ -75,6 +78,7 @@ steps: checkProbesReadyTimeout: {{$PROBE_MEASUREMENTS_CHECK_PROBES_READY_TIMEOUT}} replicasPerProbe: {{AddInt 2 (DivideInt .Nodes 100)}} pingSleepDuration: {{$PROBE_MEASUREMENTS_PING_SLEEP_DURATION}} + threshold: {{$NETWORK_LATENCY_THRESHOLD}} {{end}} {{if $ENABLE_NODE_LOCAL_DNS_LATENCY}} - Identifier: NodeLocalDNSLatency @@ -97,6 +101,8 @@ steps: Method: NetworkProgrammingLatency Params: action: {{$action}} + enableViolations: {{$ENABLE_VIOLATIONS_FOR_NETWORK_PROGRAMMING_LATENCIES}} + threshold: {{$NETWORK_PROGRAMMING_LATENCY_THRESHOLD}} - Identifier: Kube-proxy partial iptables restore failures Method: GenericPrometheusQuery Params: diff --git a/clusterloader2/testing/load/modules/network-policy/net-policy-metrics.yaml b/clusterloader2/testing/load/modules/network-policy/net-policy-metrics.yaml index 809a0bacda..25fee71a41 100644 --- a/clusterloader2/testing/load/modules/network-policy/net-policy-metrics.yaml +++ b/clusterloader2/testing/load/modules/network-policy/net-policy-metrics.yaml @@ -6,13 +6,13 @@ # CL2 params # Negative default values are used to turn thresholds off if not overridden. Thresholds are only enabled with values of zero or higher. -{{$NP_ENFORCE_POLICY_CREATION_99_THRESHOLD_SECONDS := DefaultParam .NET_POLICY_CREATION_99_THRESHOLD_SECONDS -1}} -{{$NP_ENFORCE_POD_CREATION_99_THRESHOLD_SECONDS := DefaultParam .NP_ENFORCE_POD_CREATION_99_THRESHOLD_SECONDS -1}} -{{$NP_ENFORCE_POD_IP_ASSIGNED_99_THRESHOLD_SECONDS := DefaultParam .NP_ENFORCE_POD_IP_ASSIGNED_99_THRESHOLD_SECONDS -1}} -{{$CILIUM_POLICY_IMPORTS_ERROR_THRESHOLD := DefaultParam .CILIUM_POLICY_IMPORTS_ERROR_THRESHOLD 0}} -{{$CILIUM_ENDPOINT_REGEN_FAIL_PERC_THRESHOLD := DefaultParam .CILIUM_ENDPOINT_REGEN_FAIL_PERC_THRESHOLD 0.01}} -{{$CILIUM_POLICY_REGEN_TIME_99_THRESHOLD := DefaultParam .CILIUM_POLICY_REGEN_TIME_99_THRESHOLD -1}} -{{$CILIUM_ENDPOINT_REGEN_TIME_99_THRESHOLD := DefaultParam .CILIUM_ENDPOINT_REGEN_TIME_99_THRESHOLD -1}} +{{$NP_ENFORCE_POLICY_CREATION_99_THRESHOLD_SECONDS := DefaultParam .CL2_NP_ENFORCE_POLICY_CREATION_99_THRESHOLD_SECONDS -1}} +{{$NP_ENFORCE_POD_CREATION_99_THRESHOLD_SECONDS := DefaultParam .CL2_NP_ENFORCE_POD_CREATION_99_THRESHOLD_SECONDS -1}} +{{$NP_ENFORCE_POD_IP_ASSIGNED_99_THRESHOLD_SECONDS := DefaultParam .CL2_NP_ENFORCE_POD_IP_ASSIGNED_99_THRESHOLD_SECONDS -1}} +{{$CILIUM_POLICY_IMPORTS_ERROR_THRESHOLD := DefaultParam .CL2_CILIUM_POLICY_IMPORTS_ERROR_THRESHOLD 0}} +{{$CILIUM_ENDPOINT_REGEN_FAIL_PERC_THRESHOLD := DefaultParam .CL2_CILIUM_ENDPOINT_REGEN_FAIL_PERC_THRESHOLD 0.01}} +{{$CILIUM_POLICY_REGEN_TIME_99_THRESHOLD := DefaultParam .CL2_CILIUM_POLICY_REGEN_TIME_99_THRESHOLD -1}} +{{$CILIUM_ENDPOINT_REGEN_TIME_99_THRESHOLD := DefaultParam .CL2_CILIUM_ENDPOINT_REGEN_TIME_99_THRESHOLD -1}} steps: - name: "{{$action}}ing network policy metrics" diff --git a/golang/Makefile b/golang/Makefile index b8083aaa07..0acbfdfd5d 100644 --- a/golang/Makefile +++ b/golang/Makefile @@ -15,7 +15,7 @@ .PHONY: build-go build push export GCS_BUCKET?=k8s-infra-scale-golang-builds -export GO_COMPILER_PKG?=go1.20.6.linux-amd64.tar.gz +export GO_COMPILER_PKG?=go1.21.3.linux-amd64.tar.gz export GO_COMPILER_URL?=https://dl.google.com/go/$(GO_COMPILER_PKG) export ROOT_DIR?=/home/prow/go/src diff --git a/network/tools/network-policy-enforcement-latency/go.mod b/network/tools/network-policy-enforcement-latency/go.mod index cb28db1520..8fd62eb85f 100644 --- a/network/tools/network-policy-enforcement-latency/go.mod +++ b/network/tools/network-policy-enforcement-latency/go.mod @@ -8,7 +8,7 @@ require ( k8s.io/apimachinery v0.26.1 k8s.io/client-go v0.26.1 k8s.io/klog v1.0.0 - k8s.io/klog/v2 v2.80.1 + k8s.io/klog/v2 v2.110.1 ) require ( @@ -16,7 +16,7 @@ require ( github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.9.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/swag v0.19.14 // indirect diff --git a/network/tools/network-policy-enforcement-latency/go.sum b/network/tools/network-policy-enforcement-latency/go.sum index 43482a5352..4767e782d9 100644 --- a/network/tools/network-policy-enforcement-latency/go.sum +++ b/network/tools/network-policy-enforcement-latency/go.sum @@ -74,9 +74,8 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -558,8 +557,8 @@ k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs= diff --git a/perfdash/config.go b/perfdash/config.go index 4bc4a0cc42..8b8880e608 100644 --- a/perfdash/config.go +++ b/perfdash/config.go @@ -567,6 +567,16 @@ var ( Parser: parsePerfData, }, }, + "Responsiveness_PrometheusSimple": []TestDescription{{ + Name: "node-throughput", + OutputFilePrefix: "APIResponsivenessPrometheus_simple", + Parser: parsePerfData, + }}, + "RequestCount_PrometheusSimple": []TestDescription{{ + Name: "node-throughput", + OutputFilePrefix: "APIResponsivenessPrometheus_simple", + Parser: parseRequestCountData, + }}, }, } windowsDescriptions = TestDescriptions{ diff --git a/perfdash/go.mod b/perfdash/go.mod index 633909c479..c25d8a740c 100644 --- a/perfdash/go.mod +++ b/perfdash/go.mod @@ -5,9 +5,9 @@ go 1.17 require ( cloud.google.com/go v0.100.2 // indirect cloud.google.com/go/storage v1.10.0 - github.com/aws/aws-sdk-go v1.34.4 + github.com/aws/aws-sdk-go v1.47.3 github.com/ghodss/yaml v1.0.0 - github.com/spf13/pflag v1.0.1 + github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 // indirect google.golang.org/api v0.70.0 @@ -26,7 +26,7 @@ require ( github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect github.com/googleapis/gax-go/v2 v2.1.1 // indirect github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d // indirect - github.com/jmespath/go-jmespath v0.3.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -34,11 +34,12 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 // indirect - golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect - golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/perfdash/go.sum b/perfdash/go.sum index 31359a7ad7..7eeff64ce5 100644 --- a/perfdash/go.sum +++ b/perfdash/go.sum @@ -76,8 +76,8 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM= github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.34.4 h1:Yx49/+ZMCD9YqIVsO3CsiMs4hnUnokd9otKvWYFjnYw= -github.com/aws/aws-sdk-go v1.34.4/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.47.3 h1:e0H6NFXiniCpR8Lu3lTphVdRaeRCDLAeRyTHd1tJSd8= +github.com/aws/aws-sdk-go v1.47.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/bazelbuild/bazel-gazelle v0.0.0-20181012220611-c728ce9f663e/go.mod h1:uHBSeeATKpVazAACZBDPL/Nk/UhQDDsJWDlqYJo8/Us= github.com/bazelbuild/buildtools v0.0.0-20180226164855-80c7f0d45d7e/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -185,7 +185,6 @@ github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/ github.com/go-openapi/validate v0.17.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415 h1:WSBJMqJbLxsn+bTCPyPYZfqHdJmc8MK4wrBjMft6BAM= github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -303,8 +302,10 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.0.0-20141017032234-72f9bd7c4e0c/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be h1:AHimNtVIpiBjPUhEF5KNCkrUyqTSA5zWUl8sQ2bfGBE= @@ -369,7 +370,6 @@ github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v0.0.0-20160930220758-4d0e916071f6/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -404,8 +404,9 @@ github.com/spf13/cast v0.0.0-20160730092037-e31f36ffc91a/go.mod h1:r2rcYCSwa1IEx github.com/spf13/cobra v0.0.0-20180319062004-c439c4fa0937/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/jwalterweatherman v0.0.0-20160311093646-33c24e77fb80/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v0.0.0-20160820190039-7fb2782df3d8/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -432,6 +433,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -450,8 +452,10 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -490,6 +494,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -531,8 +537,12 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -562,6 +572,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -616,10 +628,19 @@ golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -630,8 +651,11 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -692,6 +716,8 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/slo-monitor/Makefile b/slo-monitor/Makefile index 7df7504143..7f6d80e2c4 100644 --- a/slo-monitor/Makefile +++ b/slo-monitor/Makefile @@ -13,7 +13,7 @@ # limitations under the License. PACKAGE = k8s.io/perf-tests/slo-monitor -TAG = 0.15.4 +TAG = 0.15.5 # Image should be pulled from registry.k8s.io, which will auto-detect # region/cloud provider and pull from the closest. REPOSITORY?=registry.k8s.io diff --git a/slo-monitor/go.mod b/slo-monitor/go.mod index a3cd760bc6..f2bafae16f 100644 --- a/slo-monitor/go.mod +++ b/slo-monitor/go.mod @@ -1,45 +1,58 @@ module k8s.io/perf-tests/slo-monitor require ( - github.com/golang/glog v0.0.0-20141105023935-44145f04b68c - github.com/prometheus/client_golang v1.7.1 - github.com/spf13/pflag v1.0.1 - k8s.io/api v0.0.0-20190405172450-8fc60343b75c - k8s.io/apimachinery v0.0.0-20190405172352-ba051b3c4d9d - k8s.io/client-go v0.0.0-20190405172624-a18eda0c053a - k8s.io/kubernetes v1.14.0 + github.com/golang/glog v1.1.2 + github.com/prometheus/client_golang v1.17.0 + github.com/spf13/pflag v1.0.5 + k8s.io/api v0.28.3 + k8s.io/apimachinery v0.28.3 + k8s.io/client-go v0.28.3 + k8s.io/kubernetes v1.15.0-alpha.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/gogo/protobuf v1.1.1 // indirect - github.com/golang/protobuf v1.4.2 // indirect - github.com/google/gofuzz v1.0.0 // indirect - github.com/googleapis/gnostic v0.2.0 // indirect - github.com/hashicorp/golang-lru v0.5.0 // indirect - github.com/imdario/mergo v0.3.5 // indirect - github.com/json-iterator/go v1.1.10 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/imdario/mergo v0.3.6 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.10.0 // indirect - github.com/prometheus/procfs v0.1.3 // indirect - golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 // indirect - golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 // indirect - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a // indirect - golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 // indirect - golang.org/x/text v0.3.0 // indirect - golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect - google.golang.org/appengine v1.5.0 // indirect - google.golang.org/protobuf v1.23.0 // indirect - gopkg.in/inf.v0 v0.9.0 // indirect - gopkg.in/yaml.v2 v2.2.5 // indirect - k8s.io/klog v0.2.0 // indirect - k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7 // indirect - sigs.k8s.io/yaml v1.1.0 // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.11.1 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect + golang.org/x/time v0.3.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/protobuf v1.31.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/klog/v2 v2.100.1 // indirect + k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect + k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) go 1.20 diff --git a/slo-monitor/go.sum b/slo-monitor/go.sum index 80004701d4..7fcf5e75b2 100644 --- a/slo-monitor/go.sum +++ b/slo-monitor/go.sum @@ -1,188 +1,168 @@ -cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/Azure/go-autorest v11.1.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/glog v0.0.0-20141105023935-44145f04b68c h1:CbdkBQ1/PiAo0FYJhQGwASD8wrgNvTdf01g6+O9tNuA= -github.com/golang/glog v0.0.0-20141105023935-44145f04b68c/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903 h1:LbsanbbD6LieFkXbj9YNNBupiGHJgFeLpO0j0Fza1h8= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= +github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v0.0.0-20171113160352-8c31c18f31ed/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g= -github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= -github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -golang.org/x/crypto v0.0.0-20180808211826-de0752318171/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/oauth2 v0.0.0-20170412232759-a6bd8cefa181/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/inf.v0 v0.9.0 h1:3zYtXIO92bvsdS3ggAdA8Gb4Azj0YU+TVY1uGYNFA8o= -gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5 h1:ymVxjfMaHvXD8RqPRmzHHsB3VvucivSkIAvJFDI5O3c= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -k8s.io/api v0.0.0-20190405172450-8fc60343b75c h1:H3lTZIwwi5RFpDu7FaNWuj/nLGx/VGJtf0lgnibxt7E= -k8s.io/api v0.0.0-20190405172450-8fc60343b75c/go.mod h1:3Wzsx7slWzBw6GbPMeksreuwqpC7UoolhqORRc9g5XY= -k8s.io/apimachinery v0.0.0-20190405172352-ba051b3c4d9d h1:s/rgqwvHE1BhkNHwFD6ZE3PL5UkmsCqlgSMa5KzTTj4= -k8s.io/apimachinery v0.0.0-20190405172352-ba051b3c4d9d/go.mod h1:ELqXqns4PTTzr6t0VpyJODef88bmhBzTAkXf2Sa8Nhc= -k8s.io/client-go v0.0.0-20190405172624-a18eda0c053a h1:lrDgpvNkk0XNb3RulvofmeHnCAwlx5qgVWU96T7X260= -k8s.io/client-go v0.0.0-20190405172624-a18eda0c053a/go.mod h1:CwRy++LDGrMlpoULu2KnnlvejZMB49ldqV9WYq8foOE= -k8s.io/klog v0.0.0-20190306015804-8e90cee79f82/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.2.0 h1:0ElL0OHzF3N+OhoJTL0uca20SxtYt4X4+bzHeqrB83c= -k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kubernetes v1.14.0 h1:6T2iAEoOYQnzQb3WvPlUkcczEEXZ7+YPlAO8olwujRw= -k8s.io/kubernetes v1.14.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= -k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7 h1:8r+l4bNWjRlsFYlQJnKJ2p7s1YQPj4XyXiJVqDHRx7c= -k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= -sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= +k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= +k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= +k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= +k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/kubernetes v1.15.0-alpha.0 h1:gIwzzIgt0BX8fznDZRxdZv2837cEmVetI54aUfzkPk8= +k8s.io/kubernetes v1.15.0-alpha.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= +k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/slo-monitor/src/monitors/pod_monitor.go b/slo-monitor/src/monitors/pod_monitor.go index 10fc64139d..0f99302381 100644 --- a/slo-monitor/src/monitors/pod_monitor.go +++ b/slo-monitor/src/monitors/pod_monitor.go @@ -17,11 +17,12 @@ limitations under the License. package monitors import ( + "context" "strings" "sync" "time" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" @@ -136,7 +137,7 @@ func (pm *PodStartupLatencyDataMonitor) Run(stopCh chan struct{}) error { o := metav1.ListOptions{ Limit: 1, } - result, err := pm.kubeClient.CoreV1().Pods(v1.NamespaceAll).List(o) + result, err := pm.kubeClient.CoreV1().Pods(v1.NamespaceAll).List(context.TODO(), o) if err != nil { return nil, err } @@ -145,7 +146,7 @@ func (pm *PodStartupLatencyDataMonitor) Run(stopCh chan struct{}) error { return result, nil }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - return pm.kubeClient.CoreV1().Pods(v1.NamespaceAll).Watch(options) + return pm.kubeClient.CoreV1().Pods(v1.NamespaceAll).Watch(context.TODO(), options) }, }, &v1.Pod{}, @@ -194,7 +195,7 @@ func (pm *PodStartupLatencyDataMonitor) Run(stopCh chan struct{}) error { o := metav1.ListOptions{ Limit: 1, } - result, err := pm.kubeClient.CoreV1().Events(v1.NamespaceAll).List(o) + result, err := pm.kubeClient.CoreV1().Events(v1.NamespaceAll).List(context.TODO(), o) if err != nil { return nil, err } @@ -204,7 +205,7 @@ func (pm *PodStartupLatencyDataMonitor) Run(stopCh chan struct{}) error { }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.FieldSelector = eventSelector - return pm.kubeClient.CoreV1().Events(v1.NamespaceAll).Watch(options) + return pm.kubeClient.CoreV1().Events(v1.NamespaceAll).Watch(context.TODO(), options) }, }, &v1.Event{}, diff --git a/slo-monitor/src/monitors/store.go b/slo-monitor/src/monitors/store.go index 044cfce847..1414cb3d9f 100644 --- a/slo-monitor/src/monitors/store.go +++ b/slo-monitor/src/monitors/store.go @@ -171,7 +171,7 @@ func (q *NoStoreQueue) Pop(process cache.PopProcessFunc) (interface{}, error) { delete(q.indices, key) } }() - err := process(item) + err := process(item, false) if e, ok := err.(cache.ErrRequeue); ok { err = q.AddIfNotPresent(item) if err != nil { diff --git a/slo-monitor/src/monitors/watcher.go b/slo-monitor/src/monitors/watcher.go index 6c00fbd51c..cf0b4b3933 100644 --- a/slo-monitor/src/monitors/watcher.go +++ b/slo-monitor/src/monitors/watcher.go @@ -40,7 +40,7 @@ func NewWatcherWithHandler(lw cache.ListerWatcher, objType runtime.Object, setHa FullResyncPeriod: resyncPeriod, RetryOnError: false, - Process: func(obj interface{}) error { + Process: func(obj interface{}, isInInitialList bool) error { workItem := obj.(workItem) switch workItem.operationType { case setOperationType: