mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 21:21:14 +00:00
Merge pull request #43271 from liggitt/affinity-namespace
Automatic merge from submit-queue (batch tested with PRs 43313, 43257, 43271, 43307) Remove 'all namespaces' meaning of empty list in PodAffinityTerm Removes the distinction between `null` and `[]` for the PodAffinityTerm#namespaces field (option 4 discussed in https://github.com/kubernetes/kubernetes/issues/43203#issuecomment-287237992), since we can't distinguish between them in protobuf (and it's a less than ideal API) Leaves the door open to reintroducing "all namespaces" function via a dedicated field or a dedicated token in the list of namespaces Wanted to get a PR open and tests green in case we went with this option. Not sure what doc/release-note is needed if the "all namespaces" function is not present in 1.6
This commit is contained in:
@@ -39818,16 +39818,13 @@
|
||||
},
|
||||
"io.k8s.kubernetes.pkg.api.v1.PodAffinityTerm": {
|
||||
"description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e tches that of any node on which a pod of the set of pods is running",
|
||||
"required": [
|
||||
"namespaces"
|
||||
],
|
||||
"properties": {
|
||||
"labelSelector": {
|
||||
"description": "A label query over a set of resources, in this case pods.",
|
||||
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
|
||||
},
|
||||
"namespaces": {
|
||||
"description": "namespaces specifies which namespaces the labelSelector applies to (matches against); nil list means \"this pod's namespace,\" empty list means \"all namespaces\" The json tag here is not \"omitempty\" since we need to distinguish nil and empty. See https://golang.org/pkg/encoding/json/#Marshal for more details.",
|
||||
"description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
|
Reference in New Issue
Block a user