Skip to content

Commit

Permalink
Merge pull request kubernetes#30511 from danwinship/network-policy-docs
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Remove incorrect docs about unset fields in NetworkPolicyPeer

While hammering out the semantics of not-present vs present-but-empty, we appear to have added incorrect clarifications to NetworkPolicyPeer, where the semantics of PodSelector not being present is supposed to be "do what NamespaceSelector" says, not "select no pods", and likewise with NamespaceSelector not being present.

I think it's clearest if we just don't say anything, since we already said "Exactly one of the following must be specified" above. Alternatively we could be redundant and say "(If not provided, then NamespaceSelector must be set.)" or something like that.

@caseydavenport @thockin
  • Loading branch information
Kubernetes Submit Queue authored Aug 18, 2016
2 parents c9cf5c4 + c3f4f85 commit 60b7f14
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions docs/proposals/network-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,12 @@ type NetworkPolicyPeer struct {

// This is a label selector which selects Pods in this namespace.
// This field follows standard unversioned.LabelSelector semantics.
// If not provided, this selector selects no pods.
// If present but empty, this selector selects all pods in this namespace.
PodSelector *unversioned.LabelSelector `json:"podSelector,omitempty"`
// Selects Namespaces using cluster scoped-labels. This
// matches all pods in all namespaces selected by this label selector.
// This field follows standard unversioned.LabelSelector semantics.
// If omited, this selector selects no namespaces.
// If present but empty, this selector selects all namespaces.
NamespaceSelector *unversioned.LabelSelector `json:"namespaceSelector,omitempty"`
}
Expand Down

0 comments on commit 60b7f14

Please sign in to comment.