Regenerate files

pull/6/head
Dan Winship 2017-04-05 16:54:56 -04:00
parent 1940941dbb
commit 11471e965d
11 changed files with 33 additions and 58 deletions

View File

@ -44203,14 +44203,14 @@
"description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", "description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.",
"properties": { "properties": {
"from": { "from": {
"description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.", "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyPeer" "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyPeer"
} }
}, },
"ports": { "ports": {
"description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyPort" "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyPort"
@ -44255,11 +44255,11 @@
"io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyPeer": { "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyPeer": {
"properties": { "properties": {
"namespaceSelector": { "namespaceSelector": {
"description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces.", "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
}, },
"podSelector": { "podSelector": {
"description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace.", "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
} }
} }

View File

@ -9417,14 +9417,14 @@
"items": { "items": {
"$ref": "v1beta1.NetworkPolicyPort" "$ref": "v1beta1.NetworkPolicyPort"
}, },
"description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list." "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list."
}, },
"from": { "from": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "v1beta1.NetworkPolicyPeer" "$ref": "v1beta1.NetworkPolicyPeer"
}, },
"description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list." "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list."
} }
} }
}, },
@ -9450,11 +9450,11 @@
"properties": { "properties": {
"podSelector": { "podSelector": {
"$ref": "v1.LabelSelector", "$ref": "v1.LabelSelector",
"description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace." "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace."
}, },
"namespaceSelector": { "namespaceSelector": {
"$ref": "v1.LabelSelector", "$ref": "v1.LabelSelector",
"description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces." "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces."
} }
} }
}, },

View File

@ -5870,14 +5870,14 @@ Both these may change in the future. Incoming requests are matched against the h
<tbody> <tbody>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">podSelector</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">podSelector</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace.</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_labelselector">v1.LabelSelector</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_labelselector">v1.LabelSelector</a></p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">namespaceSelector</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">namespaceSelector</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces.</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_labelselector">v1.LabelSelector</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_labelselector">v1.LabelSelector</a></p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
@ -6300,14 +6300,14 @@ Both these may change in the future. Incoming requests are matched against the h
<tbody> <tbody>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">ports</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">ports</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta1_networkpolicyport">v1beta1.NetworkPolicyPort</a> array</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta1_networkpolicyport">v1beta1.NetworkPolicyPort</a> array</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">from</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">from</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta1_networkpolicypeer">v1beta1.NetworkPolicyPeer</a> array</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta1_networkpolicypeer">v1beta1.NetworkPolicyPeer</a> array</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
@ -7938,7 +7938,7 @@ Both these may change in the future. Incoming requests are matched against the h
</div> </div>
<div id="footer"> <div id="footer">
<div id="footer-text"> <div id="footer-text">
Last updated 2017-04-05 12:45:25 UTC Last updated 2017-04-10 13:00:01 UTC
</div> </div>
</div> </div>
</body> </body>

View File

@ -541,21 +541,17 @@ message NetworkPolicy {
message NetworkPolicyIngressRule { message NetworkPolicyIngressRule {
// List of ports which should be made accessible on the pods selected for this rule. // List of ports which should be made accessible on the pods selected for this rule.
// Each item in this list is combined using a logical OR. // Each item in this list is combined using a logical OR.
// If this field is not provided, this rule matches all ports (traffic not restricted by port). // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
// If this field is empty, this rule matches no ports (no traffic matches).
// If this field is present and contains at least one item, then this rule allows traffic // If this field is present and contains at least one item, then this rule allows traffic
// only if the traffic matches at least one port in the list. // only if the traffic matches at least one port in the list.
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
// +optional // +optional
repeated NetworkPolicyPort ports = 1; repeated NetworkPolicyPort ports = 1;
// List of sources which should be able to access the pods selected for this rule. // List of sources which should be able to access the pods selected for this rule.
// Items in this list are combined using a logical OR operation. // Items in this list are combined using a logical OR operation.
// If this field is not provided, this rule matches all sources (traffic not restricted by source). // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
// If this field is empty, this rule matches no sources (no traffic matches).
// If this field is present and contains at least on item, this rule allows traffic only if the // If this field is present and contains at least on item, this rule allows traffic only if the
// traffic matches at least one item in the from list. // traffic matches at least one item in the from list.
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
// +optional // +optional
repeated NetworkPolicyPeer from = 2; repeated NetworkPolicyPeer from = 2;
} }
@ -574,7 +570,6 @@ message NetworkPolicyList {
message NetworkPolicyPeer { message NetworkPolicyPeer {
// This is a label selector which selects Pods in this namespace. // This is a label selector which selects Pods in this namespace.
// This field follows standard label selector semantics. // This field follows standard label selector semantics.
// If not provided, this selector selects no pods.
// If present but empty, this selector selects all pods in this namespace. // If present but empty, this selector selects all pods in this namespace.
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
@ -582,7 +577,6 @@ message NetworkPolicyPeer {
// Selects Namespaces using cluster scoped-labels. This // Selects Namespaces using cluster scoped-labels. This
// matches all pods in all namespaces selected by this label selector. // matches all pods in all namespaces selected by this label selector.
// This field follows standard label selector semantics. // This field follows standard label selector semantics.
// If omitted, this selector selects no namespaces.
// If present but empty, this selector selects all namespaces. // If present but empty, this selector selects all namespaces.
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2;

View File

@ -340,8 +340,8 @@ func (NetworkPolicy) SwaggerDoc() map[string]string {
var map_NetworkPolicyIngressRule = map[string]string{ var map_NetworkPolicyIngressRule = map[string]string{
"": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", "": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.",
"ports": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", "ports": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
"from": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.", "from": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.",
} }
func (NetworkPolicyIngressRule) SwaggerDoc() map[string]string { func (NetworkPolicyIngressRule) SwaggerDoc() map[string]string {
@ -359,8 +359,8 @@ func (NetworkPolicyList) SwaggerDoc() map[string]string {
} }
var map_NetworkPolicyPeer = map[string]string{ var map_NetworkPolicyPeer = map[string]string{
"podSelector": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace.", "podSelector": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.",
"namespaceSelector": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces.", "namespaceSelector": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.",
} }
func (NetworkPolicyPeer) SwaggerDoc() map[string]string { func (NetworkPolicyPeer) SwaggerDoc() map[string]string {

View File

@ -15274,7 +15274,7 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope
Properties: map[string]spec.Schema{ Properties: map[string]spec.Schema{
"ports": { "ports": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", Description: "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
Type: []string{"array"}, Type: []string{"array"},
Items: &spec.SchemaOrArray{ Items: &spec.SchemaOrArray{
Schema: &spec.Schema{ Schema: &spec.Schema{
@ -15287,7 +15287,7 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope
}, },
"from": { "from": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.", Description: "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.",
Type: []string{"array"}, Type: []string{"array"},
Items: &spec.SchemaOrArray{ Items: &spec.SchemaOrArray{
Schema: &spec.Schema{ Schema: &spec.Schema{
@ -15355,13 +15355,13 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope
Properties: map[string]spec.Schema{ Properties: map[string]spec.Schema{
"podSelector": { "podSelector": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace.", Description: "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.",
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"),
}, },
}, },
"namespaceSelector": { "namespaceSelector": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces.", Description: "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.",
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"),
}, },
}, },

View File

@ -1061,21 +1061,17 @@ type NetworkPolicySpec struct {
type NetworkPolicyIngressRule struct { type NetworkPolicyIngressRule struct {
// List of ports which should be made accessible on the pods selected for this rule. // List of ports which should be made accessible on the pods selected for this rule.
// Each item in this list is combined using a logical OR. // Each item in this list is combined using a logical OR.
// If this field is not provided, this rule matches all ports (traffic not restricted by port). // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
// If this field is empty, this rule matches no ports (no traffic matches).
// If this field is present and contains at least one item, then this rule allows traffic // If this field is present and contains at least one item, then this rule allows traffic
// only if the traffic matches at least one port in the list. // only if the traffic matches at least one port in the list.
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
// +optional // +optional
Ports []NetworkPolicyPort Ports []NetworkPolicyPort
// List of sources which should be able to access the pods selected for this rule. // List of sources which should be able to access the pods selected for this rule.
// Items in this list are combined using a logical OR operation. // Items in this list are combined using a logical OR operation.
// If this field is not provided, this rule matches all sources (traffic not restricted by source). // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
// If this field is empty, this rule matches no sources (no traffic matches).
// If this field is present and contains at least on item, this rule allows traffic only if the // If this field is present and contains at least on item, this rule allows traffic only if the
// traffic matches at least one item in the from list. // traffic matches at least one item in the from list.
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
// +optional // +optional
From []NetworkPolicyPeer From []NetworkPolicyPeer
} }
@ -1100,7 +1096,6 @@ type NetworkPolicyPeer struct {
// This is a label selector which selects Pods in this namespace. // This is a label selector which selects Pods in this namespace.
// This field follows standard label selector semantics. // This field follows standard label selector semantics.
// If not provided, this selector selects no pods.
// If present but empty, this selector selects all pods in this namespace. // If present but empty, this selector selects all pods in this namespace.
// +optional // +optional
PodSelector *metav1.LabelSelector PodSelector *metav1.LabelSelector
@ -1108,7 +1103,6 @@ type NetworkPolicyPeer struct {
// Selects Namespaces using cluster scoped-labels. This // Selects Namespaces using cluster scoped-labels. This
// matches all pods in all namespaces selected by this label selector. // matches all pods in all namespaces selected by this label selector.
// This field follows standard label selector semantics. // This field follows standard label selector semantics.
// If omitted, this selector selects no namespaces.
// If present but empty, this selector selects all namespaces. // If present but empty, this selector selects all namespaces.
// +optional // +optional
NamespaceSelector *metav1.LabelSelector NamespaceSelector *metav1.LabelSelector

View File

@ -127,7 +127,6 @@ func SetDefaults_ReplicaSet(obj *ReplicaSet) {
func SetDefaults_NetworkPolicy(obj *NetworkPolicy) { func SetDefaults_NetworkPolicy(obj *NetworkPolicy) {
// Default any undefined Protocol fields to TCP. // Default any undefined Protocol fields to TCP.
for _, i := range obj.Spec.Ingress { for _, i := range obj.Spec.Ingress {
// TODO: Update Ports to be a pointer to slice as soon as auto-generation supports it.
for _, p := range i.Ports { for _, p := range i.Ports {
if p.Protocol == nil { if p.Protocol == nil {
proto := v1.ProtocolTCP proto := v1.ProtocolTCP

View File

@ -541,21 +541,17 @@ message NetworkPolicy {
message NetworkPolicyIngressRule { message NetworkPolicyIngressRule {
// List of ports which should be made accessible on the pods selected for this rule. // List of ports which should be made accessible on the pods selected for this rule.
// Each item in this list is combined using a logical OR. // Each item in this list is combined using a logical OR.
// If this field is not provided, this rule matches all ports (traffic not restricted by port). // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
// If this field is empty, this rule matches no ports (no traffic matches).
// If this field is present and contains at least one item, then this rule allows traffic // If this field is present and contains at least one item, then this rule allows traffic
// only if the traffic matches at least one port in the list. // only if the traffic matches at least one port in the list.
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
// +optional // +optional
repeated NetworkPolicyPort ports = 1; repeated NetworkPolicyPort ports = 1;
// List of sources which should be able to access the pods selected for this rule. // List of sources which should be able to access the pods selected for this rule.
// Items in this list are combined using a logical OR operation. // Items in this list are combined using a logical OR operation.
// If this field is not provided, this rule matches all sources (traffic not restricted by source). // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
// If this field is empty, this rule matches no sources (no traffic matches).
// If this field is present and contains at least on item, this rule allows traffic only if the // If this field is present and contains at least on item, this rule allows traffic only if the
// traffic matches at least one item in the from list. // traffic matches at least one item in the from list.
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
// +optional // +optional
repeated NetworkPolicyPeer from = 2; repeated NetworkPolicyPeer from = 2;
} }
@ -574,7 +570,6 @@ message NetworkPolicyList {
message NetworkPolicyPeer { message NetworkPolicyPeer {
// This is a label selector which selects Pods in this namespace. // This is a label selector which selects Pods in this namespace.
// This field follows standard label selector semantics. // This field follows standard label selector semantics.
// If not provided, this selector selects no pods.
// If present but empty, this selector selects all pods in this namespace. // If present but empty, this selector selects all pods in this namespace.
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
@ -582,7 +577,6 @@ message NetworkPolicyPeer {
// Selects Namespaces using cluster scoped-labels. This // Selects Namespaces using cluster scoped-labels. This
// matches all pods in all namespaces selected by this label selector. // matches all pods in all namespaces selected by this label selector.
// This field follows standard label selector semantics. // This field follows standard label selector semantics.
// If omitted, this selector selects no namespaces.
// If present but empty, this selector selects all namespaces. // If present but empty, this selector selects all namespaces.
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2;

View File

@ -1085,21 +1085,17 @@ type NetworkPolicySpec struct {
type NetworkPolicyIngressRule struct { type NetworkPolicyIngressRule struct {
// List of ports which should be made accessible on the pods selected for this rule. // List of ports which should be made accessible on the pods selected for this rule.
// Each item in this list is combined using a logical OR. // Each item in this list is combined using a logical OR.
// If this field is not provided, this rule matches all ports (traffic not restricted by port). // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
// If this field is empty, this rule matches no ports (no traffic matches).
// If this field is present and contains at least one item, then this rule allows traffic // If this field is present and contains at least one item, then this rule allows traffic
// only if the traffic matches at least one port in the list. // only if the traffic matches at least one port in the list.
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
// +optional // +optional
Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"` Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
// List of sources which should be able to access the pods selected for this rule. // List of sources which should be able to access the pods selected for this rule.
// Items in this list are combined using a logical OR operation. // Items in this list are combined using a logical OR operation.
// If this field is not provided, this rule matches all sources (traffic not restricted by source). // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
// If this field is empty, this rule matches no sources (no traffic matches).
// If this field is present and contains at least on item, this rule allows traffic only if the // If this field is present and contains at least on item, this rule allows traffic only if the
// traffic matches at least one item in the from list. // traffic matches at least one item in the from list.
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
// +optional // +optional
From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"` From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
} }
@ -1124,7 +1120,6 @@ type NetworkPolicyPeer struct {
// This is a label selector which selects Pods in this namespace. // This is a label selector which selects Pods in this namespace.
// This field follows standard label selector semantics. // This field follows standard label selector semantics.
// If not provided, this selector selects no pods.
// If present but empty, this selector selects all pods in this namespace. // If present but empty, this selector selects all pods in this namespace.
// +optional // +optional
PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"` PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"`
@ -1132,7 +1127,6 @@ type NetworkPolicyPeer struct {
// Selects Namespaces using cluster scoped-labels. This // Selects Namespaces using cluster scoped-labels. This
// matches all pods in all namespaces selected by this label selector. // matches all pods in all namespaces selected by this label selector.
// This field follows standard label selector semantics. // This field follows standard label selector semantics.
// If omitted, this selector selects no namespaces.
// If present but empty, this selector selects all namespaces. // If present but empty, this selector selects all namespaces.
// +optional // +optional
NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"` NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"`

View File

@ -340,8 +340,8 @@ func (NetworkPolicy) SwaggerDoc() map[string]string {
var map_NetworkPolicyIngressRule = map[string]string{ var map_NetworkPolicyIngressRule = map[string]string{
"": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", "": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.",
"ports": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", "ports": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
"from": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.", "from": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.",
} }
func (NetworkPolicyIngressRule) SwaggerDoc() map[string]string { func (NetworkPolicyIngressRule) SwaggerDoc() map[string]string {
@ -359,8 +359,8 @@ func (NetworkPolicyList) SwaggerDoc() map[string]string {
} }
var map_NetworkPolicyPeer = map[string]string{ var map_NetworkPolicyPeer = map[string]string{
"podSelector": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace.", "podSelector": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.",
"namespaceSelector": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces.", "namespaceSelector": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.",
} }
func (NetworkPolicyPeer) SwaggerDoc() map[string]string { func (NetworkPolicyPeer) SwaggerDoc() map[string]string {