From 26bd052ce2fec5c3c1b47ed96e1ff91ec669df37 Mon Sep 17 00:00:00 2001 From: Cao Shufeng Date: Fri, 24 Nov 2017 11:42:05 +0800 Subject: [PATCH] fix comment about PodAffinityTerm in api --- pkg/apis/core/types.go | 2 +- staging/src/k8s.io/api/core/v1/generated.proto | 1 + staging/src/k8s.io/api/core/v1/types.go | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/apis/core/types.go b/pkg/apis/core/types.go index 032e6d84c40..c452e1b7dfa 100644 --- a/pkg/apis/core/types.go +++ b/pkg/apis/core/types.go @@ -2338,13 +2338,13 @@ type PodAffinityTerm struct { LabelSelector *metav1.LabelSelector // namespaces specifies which namespaces the labelSelector applies to (matches against); // null or empty list means "this pod's namespace" + // +optional Namespaces []string // 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 // whose value of the label with key topologyKey matches that of any node on which any of the // selected pods is running. // Empty topologyKey is not allowed. - // +optional TopologyKey string } diff --git a/staging/src/k8s.io/api/core/v1/generated.proto b/staging/src/k8s.io/api/core/v1/generated.proto index 4f00a69e077..3fa5e2618db 100644 --- a/staging/src/k8s.io/api/core/v1/generated.proto +++ b/staging/src/k8s.io/api/core/v1/generated.proto @@ -2620,6 +2620,7 @@ message PodAffinityTerm { // namespaces specifies which namespaces the labelSelector applies to (matches against); // null or empty list means "this pod's namespace" + // +optional repeated string namespaces = 2; // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index bb5a5a104f4..a805ee85469 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -2587,6 +2587,7 @@ type PodAffinityTerm struct { LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"` // namespaces specifies which namespaces the labelSelector applies to (matches against); // null or empty list means "this pod's namespace" + // +optional 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 // the labelSelector in the specified namespaces, where co-located is defined as running on a node