Skip to content

Commit

Permalink
Merge branch 'kubernetes:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
hakuna-matatah authored Nov 16, 2023
2 parents 4e6854b + 69ceb1b commit 95959a1
Show file tree
Hide file tree
Showing 47 changed files with 2,283 additions and 259 deletions.
118 changes: 118 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion benchmark/docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
4 changes: 2 additions & 2 deletions benchmark/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
6 changes: 4 additions & 2 deletions benchmark/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
9 changes: 9 additions & 0 deletions clusterloader2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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** \
Expand Down Expand Up @@ -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

Expand Down
9 changes: 8 additions & 1 deletion clusterloader2/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
4 changes: 4 additions & 0 deletions clusterloader2/api/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))...)
}
Expand Down
28 changes: 28 additions & 0 deletions clusterloader2/api/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,41 @@ 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{
ReplicasPerNamespace: -10,
},
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{})
Expand Down
6 changes: 3 additions & 3 deletions clusterloader2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
)
13 changes: 8 additions & 5 deletions clusterloader2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
7 changes: 7 additions & 0 deletions clusterloader2/pkg/config/template_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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))
Expand Down
Loading

0 comments on commit 95959a1

Please sign in to comment.