Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark v1beta1 NetworkPolicy types as deprecated #56425

Merged
merged 2 commits into from Nov 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 8 additions & 5 deletions api/openapi-spec/swagger.json
Expand Up @@ -71243,7 +71243,7 @@
}
},
"io.k8s.api.extensions.v1beta1.IPBlock": {
"description": "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.",
"description": "DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.",
"required": [
"cidr"
],
Expand Down Expand Up @@ -71405,7 +71405,7 @@
}
},
"io.k8s.api.extensions.v1beta1.NetworkPolicy": {
"description": "NetworkPolicy describes what network traffic is allowed for a set of Pods",
"description": "DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources",
Expand Down Expand Up @@ -71433,7 +71433,7 @@
]
},
"io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule": {
"description": "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8",
"description": "DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8",
"properties": {
"ports": {
"description": "List of destination ports for outgoing traffic. 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.",
Expand All @@ -71452,7 +71452,7 @@
}
},
"io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule": {
"description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.",
"description": "DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.",
"properties": {
"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 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.",
Expand All @@ -71471,7 +71471,7 @@
}
},
"io.k8s.api.extensions.v1beta1.NetworkPolicyList": {
"description": "Network Policy List is a list of NetworkPolicy objects.",
"description": "DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. Network Policy List is a list of NetworkPolicy objects.",
"required": [
"items"
],
Expand Down Expand Up @@ -71505,6 +71505,7 @@
]
},
"io.k8s.api.extensions.v1beta1.NetworkPolicyPeer": {
"description": "DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.",
"properties": {
"ipBlock": {
"description": "IPBlock defines policy on a particular IPBlock",
Expand All @@ -71521,6 +71522,7 @@
}
},
"io.k8s.api.extensions.v1beta1.NetworkPolicyPort": {
"description": "DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.",
"properties": {
"port": {
"description": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.",
Expand All @@ -71533,6 +71535,7 @@
}
},
"io.k8s.api.extensions.v1beta1.NetworkPolicySpec": {
"description": "DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.",
"required": [
"podSelector"
],
Expand Down
13 changes: 8 additions & 5 deletions api/swagger-spec/extensions_v1beta1.json
Expand Up @@ -9881,7 +9881,7 @@
},
"v1beta1.NetworkPolicyList": {
"id": "v1beta1.NetworkPolicyList",
"description": "Network Policy List is a list of NetworkPolicy objects.",
"description": "DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. Network Policy List is a list of NetworkPolicy objects.",
"required": [
"items"
],
Expand Down Expand Up @@ -9909,7 +9909,7 @@
},
"v1beta1.NetworkPolicy": {
"id": "v1beta1.NetworkPolicy",
"description": "NetworkPolicy describes what network traffic is allowed for a set of Pods",
"description": "DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods",
"properties": {
"kind": {
"type": "string",
Expand All @@ -9931,6 +9931,7 @@
},
"v1beta1.NetworkPolicySpec": {
"id": "v1beta1.NetworkPolicySpec",
"description": "DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.",
"required": [
"podSelector"
],
Expand Down Expand Up @@ -9964,7 +9965,7 @@
},
"v1beta1.NetworkPolicyIngressRule": {
"id": "v1beta1.NetworkPolicyIngressRule",
"description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.",
"description": "DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.",
"properties": {
"ports": {
"type": "array",
Expand All @@ -9984,6 +9985,7 @@
},
"v1beta1.NetworkPolicyPort": {
"id": "v1beta1.NetworkPolicyPort",
"description": "DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.",
"properties": {
"protocol": {
"$ref": "v1.Protocol",
Expand All @@ -10001,6 +10003,7 @@
},
"v1beta1.NetworkPolicyPeer": {
"id": "v1beta1.NetworkPolicyPeer",
"description": "DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.",
"properties": {
"podSelector": {
"$ref": "v1.LabelSelector",
Expand All @@ -10018,7 +10021,7 @@
},
"v1beta1.IPBlock": {
"id": "v1beta1.IPBlock",
"description": "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.",
"description": "DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.",
"required": [
"cidr"
],
Expand All @@ -10038,7 +10041,7 @@
},
"v1beta1.NetworkPolicyEgressRule": {
"id": "v1beta1.NetworkPolicyEgressRule",
"description": "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8",
"description": "DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8",
"properties": {
"ports": {
"type": "array",
Expand Down
19 changes: 14 additions & 5 deletions docs/api-reference/extensions/v1beta1/definitions.html
Expand Up @@ -1388,7 +1388,7 @@ <h3 id="_v1beta1_replicasetcondition">v1beta1.ReplicaSetCondition</h3>
<div class="sect2">
<h3 id="_v1beta1_networkpolicylist">v1beta1.NetworkPolicyList</h3>
<div class="paragraph">
<p>Network Policy List is a list of NetworkPolicy objects.</p>
<p>DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. Network Policy List is a list of NetworkPolicy objects.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
Expand Down Expand Up @@ -3273,7 +3273,7 @@ <h3 id="_v1_envvarsource">v1.EnvVarSource</h3>
<div class="sect2">
<h3 id="_v1beta1_ipblock">v1beta1.IPBlock</h3>
<div class="paragraph">
<p>IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods matched by a NetworkPolicySpec&#8217;s podSelector. The except entry describes CIDRs that should not be included within this rule.</p>
<p>DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods matched by a NetworkPolicySpec&#8217;s podSelector. The except entry describes CIDRs that should not be included within this rule.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
Expand Down Expand Up @@ -5315,7 +5315,7 @@ <h3 id="_v1_scaleiovolumesource">v1.ScaleIOVolumeSource</h3>
<div class="sect2">
<h3 id="_v1beta1_networkpolicy">v1beta1.NetworkPolicy</h3>
<div class="paragraph">
<p>NetworkPolicy describes what network traffic is allowed for a set of Pods</p>
<p>DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
Expand Down Expand Up @@ -5549,6 +5549,9 @@ <h3 id="_v1beta1_scalestatus">v1beta1.ScaleStatus</h3>
</div>
<div class="sect2">
<h3 id="_v1beta1_networkpolicyspec">v1beta1.NetworkPolicySpec</h3>
<div class="paragraph">
<p>DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
Expand Down Expand Up @@ -6042,6 +6045,9 @@ <h3 id="_v1beta1_ingressrule">v1beta1.IngressRule</h3>
</div>
<div class="sect2">
<h3 id="_v1beta1_networkpolicypeer">v1beta1.NetworkPolicyPeer</h3>
<div class="paragraph">
<p>DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
Expand Down Expand Up @@ -6484,7 +6490,7 @@ <h3 id="_v1_podsecuritycontext">v1.PodSecurityContext</h3>
<div class="sect2">
<h3 id="_v1beta1_networkpolicyingressrule">v1beta1.NetworkPolicyIngressRule</h3>
<div class="paragraph">
<p>This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.</p>
<p>DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
Expand Down Expand Up @@ -6863,7 +6869,7 @@ <h3 id="_v1beta1_replicaset">v1beta1.ReplicaSet</h3>
<div class="sect2">
<h3 id="_v1beta1_networkpolicyegressrule">v1beta1.NetworkPolicyEgressRule</h3>
<div class="paragraph">
<p>NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec&#8217;s podSelector. The traffic must match both ports and to. This type is beta-level in 1.8</p>
<p>DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec&#8217;s podSelector. The traffic must match both ports and to. This type is beta-level in 1.8</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
Expand Down Expand Up @@ -7637,6 +7643,9 @@ <h3 id="_v1_nodeselector">v1.NodeSelector</h3>
</div>
<div class="sect2">
<h3 id="_v1beta1_networkpolicyport">v1beta1.NetworkPolicyPort</h3>
<div class="paragraph">
<p>DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
Expand Down
8 changes: 8 additions & 0 deletions staging/src/k8s.io/api/extensions/v1beta1/generated.proto

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

9 changes: 9 additions & 0 deletions staging/src/k8s.io/api/extensions/v1beta1/types.go
Expand Up @@ -1144,6 +1144,7 @@ type PodSecurityPolicyList struct {

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy.
// NetworkPolicy describes what network traffic is allowed for a set of Pods
type NetworkPolicy struct {
metav1.TypeMeta `json:",inline"`
Expand All @@ -1157,6 +1158,7 @@ type NetworkPolicy struct {
Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}

// DEPRECATED 1.9 - This group version of PolicyType is deprecated by networking/v1/PolicyType.
// Policy Type string describes the NetworkPolicy type
// This type is beta-level in 1.8
type PolicyType string
Expand All @@ -1168,6 +1170,7 @@ const (
PolicyTypeEgress PolicyType = "Egress"
)

// DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.
type NetworkPolicySpec struct {
// Selects the pods to which this NetworkPolicy object applies. The array of ingress rules
// is applied to any pods selected by this field. Multiple network policies can select the
Expand Down Expand Up @@ -1210,6 +1213,7 @@ type NetworkPolicySpec struct {
PolicyTypes []PolicyType `json:"policyTypes,omitempty" protobuf:"bytes,4,rep,name=policyTypes,casttype=PolicyType"`
}

// DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule.
// This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.
type NetworkPolicyIngressRule struct {
// List of ports which should be made accessible on the pods selected for this rule.
Expand All @@ -1229,6 +1233,7 @@ type NetworkPolicyIngressRule struct {
From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
}

// DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule.
// NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
// This type is beta-level in 1.8
Expand All @@ -1250,6 +1255,7 @@ type NetworkPolicyEgressRule struct {
To []NetworkPolicyPeer `json:"to,omitempty" protobuf:"bytes,2,rep,name=to"`
}

// DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.
type NetworkPolicyPort struct {
// Optional. The protocol (TCP or UDP) which traffic must match.
// If not specified, this field defaults to TCP.
Expand All @@ -1265,6 +1271,7 @@ type NetworkPolicyPort struct {
Port *intstr.IntOrString `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"`
}

// DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock.
// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods
// matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should
// not be included within this rule.
Expand All @@ -1279,6 +1286,7 @@ type IPBlock struct {
Except []string `json:"except,omitempty" protobuf:"bytes,2,rep,name=except"`
}

// DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.
type NetworkPolicyPeer struct {
// Exactly one of the following must be specified.

Expand All @@ -1302,6 +1310,7 @@ type NetworkPolicyPeer struct {

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList.
// Network Policy List is a list of NetworkPolicy objects.
type NetworkPolicyList struct {
metav1.TypeMeta `json:",inline"`
Expand Down