Skip to content

Commit

Permalink
Remove incorrect patch-merge directives.
Browse files Browse the repository at this point in the history
Directives were misplaced for the following types:

- MatchExpressions
- Taints
- Tolerations

Per the discussion in kubernetes#46547, we cannot fix these because it would cause
backwards-compatibility problems. Instead, remove the incorrect ones so
they don't mislead users. This has no impact on behavior.
  • Loading branch information
diegs committed Aug 16, 2017
1 parent 6bc0b29 commit 78e1c6f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 30 deletions.
12 changes: 3 additions & 9 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -57884,9 +57884,7 @@
"properties": {
"key": {
"description": "The label key that the selector applies to.",
"type": "string",
"x-kubernetes-patch-merge-key": "key",
"x-kubernetes-patch-strategy": "merge"
"type": "string"
},
"operator": {
"description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
Expand Down Expand Up @@ -60001,9 +59999,7 @@
},
"key": {
"description": "Required. The taint key to be applied to a node.",
"type": "string",
"x-kubernetes-patch-merge-key": "key",
"x-kubernetes-patch-strategy": "merge"
"type": "string"
},
"timeAdded": {
"description": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.",
Expand All @@ -60024,9 +60020,7 @@
},
"key": {
"description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.",
"type": "string",
"x-kubernetes-patch-merge-key": "key",
"x-kubernetes-patch-strategy": "merge"
"type": "string"
},
"operator": {
"description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.",
Expand Down
8 changes: 2 additions & 6 deletions federation/apis/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -10881,9 +10881,7 @@
"properties": {
"key": {
"description": "The label key that the selector applies to.",
"type": "string",
"x-kubernetes-patch-merge-key": "key",
"x-kubernetes-patch-strategy": "merge"
"type": "string"
},
"operator": {
"description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
Expand Down Expand Up @@ -11933,9 +11931,7 @@
},
"key": {
"description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.",
"type": "string",
"x-kubernetes-patch-merge-key": "key",
"x-kubernetes-patch-strategy": "merge"
"type": "string"
},
"operator": {
"description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.",
Expand Down
6 changes: 0 additions & 6 deletions staging/src/k8s.io/api/core/v1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions staging/src/k8s.io/api/core/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2114,9 +2114,7 @@ type NodeSelectorTerm struct {
// that relates the key and values.
type NodeSelectorRequirement struct {
// The label key that the selector applies to.
// +patchMergeKey=key
// +patchStrategy=merge
Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
Key string `json:"key" protobuf:"bytes,1,opt,name=key"`
// Represents a key's relationship to a set of values.
// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
Operator NodeSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=NodeSelectorOperator"`
Expand Down Expand Up @@ -2302,9 +2300,7 @@ type PreferredSchedulingTerm struct {
// any pod that does not tolerate the Taint.
type Taint struct {
// Required. The taint key to be applied to a node.
// +patchMergeKey=key
// +patchStrategy=merge
Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
Key string `json:"key" protobuf:"bytes,1,opt,name=key"`
// Required. The taint value corresponding to the taint key.
// +optional
Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
Expand Down Expand Up @@ -2346,9 +2342,7 @@ type Toleration struct {
// Key is the taint key that the toleration applies to. Empty means match all taint keys.
// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
// +optional
// +patchMergeKey=key
// +patchStrategy=merge
Key string `json:"key,omitempty" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
Key string `json:"key,omitempty" protobuf:"bytes,1,opt,name=key"`
// Operator represents a key's relationship to the value.
// Valid operators are Exists and Equal. Defaults to Equal.
// Exists is equivalent to wildcard for value, so that a pod can
Expand Down

0 comments on commit 78e1c6f

Please sign in to comment.