Skip to content

Commit

Permalink
Merge pull request #180 from Huang-Wei/automated-cherry-pick-of-#156-#…
Browse files Browse the repository at this point in the history
…143-#170-upstream-release-1.19

Automated cherry pick of #156: added LoadVariationRiskBalancing plugin (apis + docs) #143: NUMA aware scheduling #170: Add default value to pg status
  • Loading branch information
k8s-ci-robot authored Apr 6, 2021
2 parents 593952e + da71be0 commit 896444c
Show file tree
Hide file tree
Showing 39 changed files with 3,891 additions and 73 deletions.
4 changes: 4 additions & 0 deletions cmd/scheduler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ import (
"sigs.k8s.io/scheduler-plugins/pkg/coscheduling"
"sigs.k8s.io/scheduler-plugins/pkg/crossnodepreemption"
"sigs.k8s.io/scheduler-plugins/pkg/noderesources"
"sigs.k8s.io/scheduler-plugins/pkg/noderesourcetopology"
"sigs.k8s.io/scheduler-plugins/pkg/podstate"
"sigs.k8s.io/scheduler-plugins/pkg/qos"
"sigs.k8s.io/scheduler-plugins/pkg/trimaran/loadvariationriskbalancing"
"sigs.k8s.io/scheduler-plugins/pkg/trimaran/targetloadpacking"
// Ensure scheme package is initialized.
_ "sigs.k8s.io/scheduler-plugins/pkg/apis/config/scheme"
Expand All @@ -44,7 +46,9 @@ func main() {
command := app.NewSchedulerCommand(
app.WithPlugin(capacityscheduling.Name, capacityscheduling.New),
app.WithPlugin(coscheduling.Name, coscheduling.New),
app.WithPlugin(loadvariationriskbalancing.Name, loadvariationriskbalancing.New),
app.WithPlugin(noderesources.AllocatableName, noderesources.NewAllocatable),
app.WithPlugin(noderesourcetopology.Name, noderesourcetopology.New),
app.WithPlugin(targetloadpacking.Name, targetloadpacking.New),
// Sample plugins below.
app.WithPlugin(crossnodepreemption.Name, crossnodepreemption.New),
Expand Down
46 changes: 46 additions & 0 deletions cmd/scheduler/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"sigs.k8s.io/scheduler-plugins/pkg/coscheduling"
"sigs.k8s.io/scheduler-plugins/pkg/noderesources"
"sigs.k8s.io/scheduler-plugins/pkg/qos"
"sigs.k8s.io/scheduler-plugins/pkg/trimaran/loadvariationriskbalancing"
"sigs.k8s.io/scheduler-plugins/pkg/trimaran/targetloadpacking"
)

Expand Down Expand Up @@ -333,6 +334,33 @@ profiles:
t.Fatal(err)
}

// LoadVariationRiskBalancing plugin config with arguments
loadVariationRiskBalancingConfigWithArgsFile := filepath.Join(tmpDir, "loadVariationRiskBalancing-with-args.yaml")
if err := ioutil.WriteFile(loadVariationRiskBalancingConfigWithArgsFile, []byte(fmt.Sprintf(`
apiVersion: kubescheduler.config.k8s.io/v1beta1
kind: KubeSchedulerConfiguration
clientConnection:
kubeconfig: "%s"
profiles:
- plugins:
score:
enabled:
- name: LoadVariationRiskBalancing
disabled:
- name: "*"
pluginConfig:
- name: LoadVariationRiskBalancing
args:
metricProvider:
type: Prometheus
address: http://prometheus-k8s.monitoring.svc.cluster.local:9090
safeVarianceMargin: 1
safeVarianceSensitivity: 2.5
watcherAddress: http://deadbeef:2020
`, configKubeconfig)), os.FileMode(0600)); err != nil {
t.Fatal(err)
}

// multiple profiles config
multiProfilesConfig := filepath.Join(tmpDir, "multi-profiles.yaml")
if err := ioutil.WriteFile(multiProfilesConfig, []byte(fmt.Sprintf(`
Expand Down Expand Up @@ -533,6 +561,24 @@ profiles:
},
},
},
{
name: "single profile config - LoadVariationRiskBalancing with args",
flags: []string{"--config", loadVariationRiskBalancingConfigWithArgsFile},
registryOptions: []app.Option{app.WithPlugin(loadvariationriskbalancing.Name, loadvariationriskbalancing.New)},
wantPlugins: map[string]map[string][]kubeschedulerconfig.Plugin{
"default-scheduler": {
"BindPlugin": {{Name: "DefaultBinder"}},
"FilterPlugin": defaultPlugins["FilterPlugin"],
"PostFilterPlugin": {{Name: "DefaultPreemption"}},
"PreBindPlugin": {{Name: "VolumeBinding"}},
"PreFilterPlugin": defaultPlugins["PreFilterPlugin"],
"PreScorePlugin": defaultPlugins["PreScorePlugin"],
"QueueSortPlugin": defaultPlugins["QueueSortPlugin"],
"ReservePlugin": {{Name: "VolumeBinding"}},
"ScorePlugin": {{Name: loadvariationriskbalancing.Name, Weight: 1}},
},
},
},
// TODO: add a multi profile test.
// Ref: test "plugin config with multiple profiles" in
// https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-scheduler/app/server_test.go
Expand Down
61 changes: 31 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,46 @@ go 1.15
require (
github.com/google/go-cmp v0.5.2
github.com/google/uuid v1.1.1
github.com/k8stopologyawareschedwg/noderesourcetopology-api v0.0.8
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/paypal/load-watcher v0.1.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.5.1
k8s.io/api v0.19.8
k8s.io/api v0.19.9
k8s.io/apiextensions-apiserver v0.0.0
k8s.io/apimachinery v0.19.8
k8s.io/apiserver v0.19.8
k8s.io/client-go v0.19.8
k8s.io/code-generator v0.19.8
k8s.io/component-base v0.19.8
k8s.io/apimachinery v0.19.9
k8s.io/apiserver v0.19.9
k8s.io/client-go v0.19.9
k8s.io/code-generator v0.19.9
k8s.io/component-base v0.19.9
k8s.io/klog/v2 v2.2.0
k8s.io/kube-aggregator v0.0.0
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6
k8s.io/kube-scheduler v0.19.8
k8s.io/kubernetes v1.19.8
k8s.io/kube-scheduler v0.19.9
k8s.io/kubernetes v1.19.9
)

replace (
k8s.io/api => k8s.io/api v0.19.8
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.19.8
k8s.io/apimachinery => k8s.io/apimachinery v0.19.8
k8s.io/apiserver => k8s.io/apiserver v0.19.8
k8s.io/cli-runtime => k8s.io/cli-runtime v0.19.8
k8s.io/client-go => k8s.io/client-go v0.19.8
k8s.io/cloud-provider => k8s.io/cloud-provider v0.19.8
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.19.8
k8s.io/code-generator => k8s.io/code-generator v0.19.8
k8s.io/component-base => k8s.io/component-base v0.19.8
k8s.io/cri-api => k8s.io/cri-api v0.19.8
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.19.8
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.19.8
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.19.8
k8s.io/kube-proxy => k8s.io/kube-proxy v0.19.8
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.19.8
k8s.io/kubectl => k8s.io/kubectl v0.19.8
k8s.io/kubelet => k8s.io/kubelet v0.19.8
k8s.io/kubernetes => k8s.io/kubernetes v1.19.8
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.19.8
k8s.io/metrics => k8s.io/metrics v0.19.8
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.19.8
k8s.io/api => k8s.io/api v0.19.9
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.19.9
k8s.io/apimachinery => k8s.io/apimachinery v0.19.9
k8s.io/apiserver => k8s.io/apiserver v0.19.9
k8s.io/cli-runtime => k8s.io/cli-runtime v0.19.9
k8s.io/client-go => k8s.io/client-go v0.19.9
k8s.io/cloud-provider => k8s.io/cloud-provider v0.19.9
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.19.9
k8s.io/code-generator => k8s.io/code-generator v0.19.9
k8s.io/component-base => k8s.io/component-base v0.19.9
k8s.io/cri-api => k8s.io/cri-api v0.19.9
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.19.9
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.19.9
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.19.9
k8s.io/kube-proxy => k8s.io/kube-proxy v0.19.9
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.19.9
k8s.io/kubectl => k8s.io/kubectl v0.19.9
k8s.io/kubelet => k8s.io/kubelet v0.19.9
k8s.io/kubernetes => k8s.io/kubernetes v1.19.9
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.19.9
k8s.io/metrics => k8s.io/metrics v0.19.9
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.19.9
)
84 changes: 43 additions & 41 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/cadvisor v0.37.4/go.mod h1:BalYQhwl2UV8lpB3oFssiaW8Uj6sqfFDxw5nEs9sBgU=
github.com/google/cadvisor v0.37.5/go.mod h1:BalYQhwl2UV8lpB3oFssiaW8Uj6sqfFDxw5nEs9sBgU=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
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=
Expand Down Expand Up @@ -437,6 +437,8 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/k8stopologyawareschedwg/noderesourcetopology-api v0.0.8 h1:couInomNumuAT43qsHT1qHkdTApfYw+tVrx5v8EO+8o=
github.com/k8stopologyawareschedwg/noderesourcetopology-api v0.0.8/go.mod h1:zRoCNg6LjSQewUwnpORw1VT9mP0rGNQlYy4WYaGWvHo=
github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
Expand Down Expand Up @@ -1087,53 +1089,53 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
k8s.io/api v0.19.8 h1:U50vBUCb5kc2J483mnITLKfdyoITaC7PnaOJwT7oRRM=
k8s.io/api v0.19.8/go.mod h1:9TMGoKoidvicOK0LSqj+Mj98pugQycbViPKyZHqutBc=
k8s.io/apiextensions-apiserver v0.19.8 h1:3Vb4N/QUoUmD5l+qB/N4rS1q+miNBOyFGf2U1iNuas0=
k8s.io/apiextensions-apiserver v0.19.8/go.mod h1:NX3bMN7hJgtV2ViTgEySaZElHdrqyF9vw8EpkQTmqD0=
k8s.io/apimachinery v0.19.8 h1:MaehcNcx8brsgvMsqspcI0bi22E1np/DACnjf2mhJ5A=
k8s.io/apimachinery v0.19.8/go.mod h1:6sRbGRAVY5DOCuZwB5XkqguBqpqLU6q/kOaOdk29z6Q=
k8s.io/apiserver v0.19.8 h1:otz7fC3AUcQiXjSyjjnaJw+v53iJUYlgA56m7NgM06s=
k8s.io/apiserver v0.19.8/go.mod h1:+OJE9rJCT99Qr9DYITQDCKDLxFLVi5zA8nI9KqjGshk=
k8s.io/cli-runtime v0.19.8/go.mod h1:6EzBytEa7v/Y8mzWBN3l/RbXAOYjp8RSDypWPTwrR+U=
k8s.io/client-go v0.19.8 h1:rcb2BrXb1HUBiBCoP3m/9Q2VZIMWhZUAmH49EmAyRUA=
k8s.io/client-go v0.19.8/go.mod h1:5Op2bSbK+COBz8mwH62rrRgqhA9wOcORkWZ03+GL0Ow=
k8s.io/cloud-provider v0.19.8 h1:xrVJrjqjIApSIBqVim629dAhrS8aXxEdMqKmlnAmIoA=
k8s.io/cloud-provider v0.19.8/go.mod h1:yv5SSo+sVG8ZSZtKRl+H96fXCSH4Tk6MTPQi3D4F5QA=
k8s.io/cluster-bootstrap v0.19.8 h1:ptk1ccfqgDgiiPFct6qKeBEZR0CrgzYBQH8aq9X7VxE=
k8s.io/cluster-bootstrap v0.19.8/go.mod h1:L0ZIRyH1YC+qcS6QuZTkM7MFpNUswvrfOhEpZj6lmL0=
k8s.io/code-generator v0.19.8 h1:uxctqO1/3jnMDWB4imT8unRvgCXVPX2NTm/cMFCyigY=
k8s.io/code-generator v0.19.8/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0=
k8s.io/component-base v0.19.8 h1:z5NvhzEjdjTwXWF2qMdozKXbUCEm9HXGGNp51buf4HA=
k8s.io/component-base v0.19.8/go.mod h1:cvHAT4oGxKsfcnnm0hMp3JkEMxAt5s6le943V796FXM=
k8s.io/cri-api v0.19.8/go.mod h1:PE0eMB8nJJvRigJuZEyqgYvRqL8mBowlvw0g8F/L1LY=
k8s.io/csi-translation-lib v0.19.8 h1:Ys3HH5pNoy+BffhczIrQm4IcQyNBEFk5OA9g2UnjTaM=
k8s.io/csi-translation-lib v0.19.8/go.mod h1:eaCx9SdRwTjVETWjlVCoDMli5wek46THyy7rMgSa/Ng=
k8s.io/api v0.19.9 h1:Bs6ihik0V+4WDO9eFWrCNwhSUg7dW/Y+HflDCpOfNGk=
k8s.io/api v0.19.9/go.mod h1:RcFj+riKQ1fAITdmtA6InI3LVEeKi+9LuvU7GVMeXJI=
k8s.io/apiextensions-apiserver v0.19.9 h1:0y++UDtHnHYI+mcE1pa283mRM8wjimwp7qidhz4W/Yw=
k8s.io/apiextensions-apiserver v0.19.9/go.mod h1:guuV2OxCNFYOFWW4087BTGOzwuoy3TnvhicJb7DJE5U=
k8s.io/apimachinery v0.19.9 h1:ToBt9RaKt5BYD2uHNgom2O0MqvfXnEYimcxqCzZIkXA=
k8s.io/apimachinery v0.19.9/go.mod h1:6sRbGRAVY5DOCuZwB5XkqguBqpqLU6q/kOaOdk29z6Q=
k8s.io/apiserver v0.19.9 h1:OhY9DtSdeZocqOcJ4q3SmReal7ZWcLZGjmejWn0Vvug=
k8s.io/apiserver v0.19.9/go.mod h1:g6zpD+kcZFlO73pktPWRvL0tUGqj7/KaOowmRk8EpGg=
k8s.io/cli-runtime v0.19.9/go.mod h1:07LOB3fgVkeTNkfvVjQcpi7scFpRLrnJ2Gxdcm8yECQ=
k8s.io/client-go v0.19.9 h1:Bs0ZnQOWnRYvOlAsT7tDro1j1B6ZaVX/O3C/k6EoaGE=
k8s.io/client-go v0.19.9/go.mod h1:8GArfSmN7MwTidMGcLGM3QTYa7uekI/B6IOrM0s1XPs=
k8s.io/cloud-provider v0.19.9 h1:5rBLgFE5vFL0BtHHIqUo/fO9TAR118+uR9DsXrBpig8=
k8s.io/cloud-provider v0.19.9/go.mod h1:pqrCcex7oV1JMiX/agLD6hnSwb6S5PiMnNnp7ibpfCw=
k8s.io/cluster-bootstrap v0.19.9 h1:SPqDne92zArbUjAw5fEmCpQaZGpFtpvaoeKvn0LEPw8=
k8s.io/cluster-bootstrap v0.19.9/go.mod h1:JWNQvbF/QL3xMcUQEfrP/gHgmZ4ht+t06EIIfdiUlGQ=
k8s.io/code-generator v0.19.9 h1:nj1gVb/4P4C53hnBtdTaxZDlJ1jEkrQnAy+n4BYGVHs=
k8s.io/code-generator v0.19.9/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0=
k8s.io/component-base v0.19.9 h1:GOjvFCDgTRfLz6v3xshO0QbqWJN5nAkJzypc2BIfxOw=
k8s.io/component-base v0.19.9/go.mod h1:x9UmpImvXgVry1s9/hINgLz6iGBYUGvy3Xm7KZh1nnI=
k8s.io/cri-api v0.19.9/go.mod h1:PE0eMB8nJJvRigJuZEyqgYvRqL8mBowlvw0g8F/L1LY=
k8s.io/csi-translation-lib v0.19.9 h1:seNG7UUFlE+F8CeZthQbOzL62+IfOVRjxZ5K1woZe60=
k8s.io/csi-translation-lib v0.19.9/go.mod h1:0/r8tlgREii0RYyF9rXCOPdoWYbv7HP8MRajib73zks=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14 h1:t4L10Qfx/p7ASH3gXCdIUtPbbIuegCoUJf3TMSFekjw=
k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM=
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A=
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
k8s.io/kube-aggregator v0.19.8 h1:baFlZWZIK1LHI2yyz/nec/umrUp4a4vTDVaoWxxRQLw=
k8s.io/kube-aggregator v0.19.8/go.mod h1:OB0LNZHEkyxtfqnUD1CNwdXWoxnFK1SPRNfsuZK5rrM=
k8s.io/kube-controller-manager v0.19.8/go.mod h1:1MIpEJvnqruutQJryTtwGbSbCLyGpQHJEjjv7TfZjuw=
k8s.io/kube-aggregator v0.19.9 h1:f6iSxF5mXPYnaHTGrXVfhAVHM01b/c8lCUu79Ew9k0w=
k8s.io/kube-aggregator v0.19.9/go.mod h1:gkzzTwkaUVeTgtOpa3rv07FY+P9gL05+oj/9/JWRYB4=
k8s.io/kube-controller-manager v0.19.9/go.mod h1:4l0JFNcaYiQhQvUsqH9HxzmQwAUTUE0nKHRKcqH+Mvg=
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ=
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o=
k8s.io/kube-proxy v0.19.8/go.mod h1:x6nlHp/eCML9ikhuBNA8hLQVKxjj7i3QgFO+6TRdDEM=
k8s.io/kube-scheduler v0.19.8 h1:x7T1JD99VliZAfamg8czAiiN8Shq4vfbOk6UUlVCNDM=
k8s.io/kube-scheduler v0.19.8/go.mod h1:u851EkWByPQltqa0II+YC04C2VlWMxUPb+pE6TR8YZ4=
k8s.io/kubectl v0.19.8 h1:mN2nePnFGFrT4Tr/rDnG0gWCM1eVyYVCmzonKjyCt7w=
k8s.io/kubectl v0.19.8/go.mod h1:RQHMLHBnSksyWZ4VOgRbfXFO9aY8sDm0lbzT9z61FsU=
k8s.io/kubelet v0.19.8/go.mod h1:gpKSJ4oQtolPf+bQ2qIAqc0DExqqBiq+hNNoN/X+9Ik=
k8s.io/kubernetes v1.19.8 h1:tE/DyH5Dtn3RDfKAgvyTypIbInWFLeWET4yQdS85+tI=
k8s.io/kubernetes v1.19.8/go.mod h1:6R5K7prywmLDOVGBGd50Ig6lKkgGYaiUT7/r3GZXhsM=
k8s.io/legacy-cloud-providers v0.19.8 h1:FJ+Yy+AoK8c7n5TqK8W2ic9H1/v3ph9yYqSBo6PZoTU=
k8s.io/legacy-cloud-providers v0.19.8/go.mod h1:H0Ektscfn89IxWfFgtG5ZP9SPLMPd3RMSJVGK1ZzLXU=
k8s.io/metrics v0.19.8 h1:xvXqL3DDlXKkYy1m78ENVfYBCMX/KmnqcIhUL35fW8E=
k8s.io/metrics v0.19.8/go.mod h1:fCUndpkzeiquAa4FCZd5ir2UBqs0sHEljVc+3Gmc0BQ=
k8s.io/sample-apiserver v0.19.8/go.mod h1:1dK09G4B9HELehE1/vj+xnxj4YZVdxYoSKHz0db9vZs=
k8s.io/kube-proxy v0.19.9/go.mod h1:2t1Cmkz+hGC9e2Z1vugNN98h/x3SVd000Gr5JnQH8tw=
k8s.io/kube-scheduler v0.19.9 h1:3X9Lq3Sx/oEOPzD+lhqq78nN44Oc/3oOjn9S5gf/Pz0=
k8s.io/kube-scheduler v0.19.9/go.mod h1:e704tQ5x6FeGkJWoBDibyq87adlWxFZSCBOjhodrS08=
k8s.io/kubectl v0.19.9 h1:EMZBy+JrY40dq/4RBR0KN2VZ/akRwvF4UNdkgzFVVVE=
k8s.io/kubectl v0.19.9/go.mod h1:0wmGV957E0Ql2D9AH+3GzuPwsPz9rS8qFVs/mYxLnw8=
k8s.io/kubelet v0.19.9/go.mod h1:5zNe1cRdshzpKmg8Ig4CAcqcQMvKCuzZxe5voQM1i4w=
k8s.io/kubernetes v1.19.9 h1:P+54dH6wdW6axpc2fC3s9MZmX11SO3/hEvQP0rNA6Os=
k8s.io/kubernetes v1.19.9/go.mod h1:rb3bmBEps/XmoUkNbE3H5vsMihMy+Rt5IA1K9KLK4DM=
k8s.io/legacy-cloud-providers v0.19.9 h1:A41oKjQkLF+ua8ru9WNMv4NhYTn6GzewbK0ZlhXJTaE=
k8s.io/legacy-cloud-providers v0.19.9/go.mod h1:ze8lk2d21ZBzNQiKVajiSLyP4praAaFDTuH3oiclwwU=
k8s.io/metrics v0.19.9 h1:RZepXOnj4gYC8DGoxt1tqNJz9E02x+GVrp00+veA/So=
k8s.io/metrics v0.19.9/go.mod h1:xhSkzVBl7kxiHnIyhi7yuxX22+hYsPV2e50ZM3N5dW0=
k8s.io/sample-apiserver v0.19.9/go.mod h1:HvifKA/cRE85AyPH5jtbrFzRchXqy3HYdxegTDD4Cls=
k8s.io/system-validators v1.1.2/go.mod h1:bPldcLgkIUK22ALflnsXk8pvkTEndYdNuaHH6gRrl0Q=
k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg=
Expand All @@ -1145,8 +1147,8 @@ modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs
modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9 h1:rusRLrDhjBp6aYtl9sGEvQJr6faoHoDLd0YcUBTZguI=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15 h1:4uqm9Mv+w2MmBYD+F4qf/v6tDFUdPOk29C095RbU5mY=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA=
sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
Expand Down
4 changes: 4 additions & 0 deletions manifests/coscheduling/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ spec:
type: string
scheduled:
type: integer
default: 0
running:
type: integer
default: 0
succeeded:
type: integer
default: 0
failed:
type: integer
default: 0
scheduleStartTime:
type: string
format: date-time
Expand Down
78 changes: 78 additions & 0 deletions manifests/noderesourcetopology/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: topo-aware-scheduler
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: noderesourcetoplogy-handler
rules:
- apiGroups: ["topology.node.k8s.io"]
resources: ["noderesourcetopologies"]
verbs: ["*"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "patch"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get","list","watch","update"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["*"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: topo-aware-scheduler-as-kube-scheduler
subjects:
- kind: ServiceAccount
name: topo-aware-scheduler
namespace: kube-system
roleRef:
kind: ClusterRole
name: noderesourcetoplogy-handler
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: my-scheduler-as-volume-scheduler
subjects:
- kind: ServiceAccount
name: my-scheduler
namespace: kube-system
roleRef:
kind: ClusterRole
name: system:volume-scheduler
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: topo-aware-scheduler-as-kube-scheduler
namespace: kube-system
subjects:
- kind: ServiceAccount
name: topo-aware-scheduler
namespace: kube-system
roleRef:
kind: Role
name: extension-apiserver-authentication-reader
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: noderesourcetoplogy
namespace: kube-system
subjects:
- kind: User
name: system:kube-scheduler
namespace: kube-system
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: noderesourcetoplogy-handler
apiGroup: rbac.authorization.k8s.io
Loading

0 comments on commit 896444c

Please sign in to comment.