Merge pull request #56324 from CaoShuFeng/optional
Automatic merge from submit-queue (batch tested with PRs 56161, 56324, 55685, 56409, 55296). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix comment about PodAffinityTerm in api **Release note**: ```release-note NONE ```
This commit is contained in:
		@@ -2338,13 +2338,13 @@ type PodAffinityTerm struct {
 | 
				
			|||||||
	LabelSelector *metav1.LabelSelector
 | 
						LabelSelector *metav1.LabelSelector
 | 
				
			||||||
	// namespaces specifies which namespaces the labelSelector applies to (matches against);
 | 
						// namespaces specifies which namespaces the labelSelector applies to (matches against);
 | 
				
			||||||
	// null or empty list means "this pod's namespace"
 | 
						// null or empty list means "this pod's namespace"
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
	Namespaces []string
 | 
						Namespaces []string
 | 
				
			||||||
	// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
 | 
						// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
 | 
				
			||||||
	// the labelSelector in the specified namespaces, where co-located is defined as running on a node
 | 
						// the labelSelector in the specified namespaces, where co-located is defined as running on a node
 | 
				
			||||||
	// whose value of the label with key topologyKey matches that of any node on which any of the
 | 
						// whose value of the label with key topologyKey matches that of any node on which any of the
 | 
				
			||||||
	// selected pods is running.
 | 
						// selected pods is running.
 | 
				
			||||||
	// Empty topologyKey is not allowed.
 | 
						// Empty topologyKey is not allowed.
 | 
				
			||||||
	// +optional
 | 
					 | 
				
			||||||
	TopologyKey string
 | 
						TopologyKey string
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2619,6 +2619,7 @@ message PodAffinityTerm {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  // namespaces specifies which namespaces the labelSelector applies to (matches against);
 | 
					  // namespaces specifies which namespaces the labelSelector applies to (matches against);
 | 
				
			||||||
  // null or empty list means "this pod's namespace"
 | 
					  // null or empty list means "this pod's namespace"
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
  repeated string namespaces = 2;
 | 
					  repeated string namespaces = 2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
 | 
					  // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2585,6 +2585,7 @@ type PodAffinityTerm struct {
 | 
				
			|||||||
	LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"`
 | 
						LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"`
 | 
				
			||||||
	// namespaces specifies which namespaces the labelSelector applies to (matches against);
 | 
						// namespaces specifies which namespaces the labelSelector applies to (matches against);
 | 
				
			||||||
	// null or empty list means "this pod's namespace"
 | 
						// null or empty list means "this pod's namespace"
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
	Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,2,rep,name=namespaces"`
 | 
						Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,2,rep,name=namespaces"`
 | 
				
			||||||
	// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
 | 
						// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
 | 
				
			||||||
	// the labelSelector in the specified namespaces, where co-located is defined as running on a node
 | 
						// the labelSelector in the specified namespaces, where co-located is defined as running on a node
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user