-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Which section(s) is the issue in?
Examples provided in Sample Policy Configurations section are incorrect.
- "labels": "region, zone" in the first example should be changed to "labels": ["region, zone"]
- In the example for "The following example defines three topological levels, region (affinity) → zone (affinity) → rack (anti-affinity) section "
"label": "region, zone" should be changed to "labels":["region, zone"] - In the example for "The following example defines a policy to only use nodes with the 'region' label defined and prefer nodes with the 'zone' label defined:" section
labelPreference under predicates should be changed to labelsPresence & "label":"region" should be changed to "labels":["region"] - In the example for "The following example combines both static and configurable predicates and also priorities: section"
"label": "region", for labelsPresence should be changed to "labels": ["region"]
What needs fixing?
Above said examples provided should be changed .
Below are the issues i have encountered when using the examples as is which are provided in the document.
W0127 13:44:46.456231 1 configmap_cafile_content.go:102] unable to load initial CA bundle for: "client-ca::kube-system::extension-apiserver-authentication::client-ca-file" due to: configmap "extension-apiserver-authentication" not found
W0127 13:44:46.456361 1 configmap_cafile_content.go:102] unable to load initial CA bundle for: "client-ca::kube-system::extension-apiserver-authentication::requestheader-client-ca-file" due to: configmap "extension-apiserver-authentication" not found
I0127 13:44:46.482174 1 server.go:169] Starting Kubernetes Scheduler version v1.17.1
invalid policy: v1.Policy.Predicates: []v1.PredicatePolicy: v1.PredicatePolicy.Argument: v1.PredicateArgument.ServiceAffinity: v1.ServiceAffinity.Labels: []string: decode slice: expect [ or n, but found ", error found in #10 byte of ...|labels": "region, zo|..., bigger context ...| "serviceAffinity": {
"labels": "region, zone"
}
}
}
],|...
- check region affinity, affinity & anti-affinity
W0127 13:51:44.217924 1 configmap_cafile_content.go:102] unable to load initial CA bundle for: "client-ca::kube-system::extension-apiserver-authentication::client-ca-file" due to: configmap "extension-apiserver-authentication" not found
W0127 13:51:44.218024 1 configmap_cafile_content.go:102] unable to load initial CA bundle for: "client-ca::kube-system::extension-apiserver-authentication::requestheader-client-ca-file" due to: configmap "extension-apiserver-authentication" not found
I0127 13:51:44.241991 1 server.go:169] Starting Kubernetes Scheduler version v1.17.1
invalid policy: strict decoder error for {
"kind": "Policy",
"apiVersion": "v1",
"predicates": [
{
"name": "RegionZoneAffinity",
"argument": {
"serviceAffinity": {
"label": "region, zone"
}
}
}
],
"priorities": [
{
"name":"RackSpread",
"weight" : 1,
"argument": {
"serviceAntiAffinity": {
"label": "rack"
}
}
}
]
}
: v1.Policy.Priorities: []v1.PriorityPolicy: Predicates: []v1.PredicatePolicy: v1.PredicatePolicy.Name: Argument: v1.PredicateArgument.ServiceAffinity: v1.ServiceAffinity.ReadObject: found unknown field: label, error found in #10 byte of ...|":{"label":"region, |..., bigger context ...|edicates":[{"argument":{"serviceAffinity":{"label":"region, zone"}},"name":"RegionZoneAffinity"}],"p|...
- where ever labelspresence is present, label should be with in []
: v1.Policy.Predicates: []v1.PredicatePolicy: v1.PredicatePolicy.v1.PredicatePolicy.Name: Argument: v1.PredicateArgument.ServiceAffinity: v1.ServiceAffinity.ReadObject: found unknown field: label, error found in #10 byte of ...|":{"label":"region"}|..., bigger context ...|edicates":[{"argument":{"serviceAffinity":{"label":"region"}},"name":"RegionAffinity"},{"argument":{|...
- There is no such thing called labelPreference in predicates
invalid policy: strict decoder error for {
"kind": "Policy",
"apiVersion": "v1",
"predicates": [
{
"name": "RequireRegion",
"argument": {
"labelPreference": {
"label": "region",
"presence": true
}
}
}
],
"priorities": [
{
"name":"ZonePreferred",
"weight" : 1,
"argument": {
"labelPreference": {
"label": "zone",
"presence": true
}
}
}
]
}
: v1.Policy.Predicates: []v1.PredicatePolicy: v1.PredicatePolicy.Argument: v1.PredicateArgument.ReadObject: found unknown field: labelPreference, error found in #10 byte of ...|reference":{"label":|..., bigger context ...|licy","predicates":[{"argument":{"labelPreference":{"label":"region","presence":true}},"name":"Requi|...