aboutsummaryrefslogtreecommitdiff
path: root/vendor/k8s.io/kubernetes/pkg/apis/networking
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/kubernetes/pkg/apis/networking')
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/register.go51
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/types.go191
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go282
4 files changed, 0 insertions, 543 deletions
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/doc.go
deleted file mode 100644
index 8b013e348..000000000
--- a/vendor/k8s.io/kubernetes/pkg/apis/networking/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package
-// +groupName=networking.k8s.io
-package networking // import "k8s.io/kubernetes/pkg/apis/networking"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/register.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/register.go
deleted file mode 100644
index 4d58a210d..000000000
--- a/vendor/k8s.io/kubernetes/pkg/apis/networking/register.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package networking
-
-import (
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "networking.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
-
-// Kind takes an unqualified kind and returns a Group qualified GroupKind
-func Kind(kind string) schema.GroupKind {
- return SchemeGroupVersion.WithKind(kind).GroupKind()
-}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- AddToScheme = SchemeBuilder.AddToScheme
-)
-
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &NetworkPolicy{},
- &NetworkPolicyList{},
- )
- return nil
-}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go
deleted file mode 100644
index ae37fcd5e..000000000
--- a/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
-Copyright 2017 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package networking
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/util/intstr"
- api "k8s.io/kubernetes/pkg/apis/core"
-)
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// NetworkPolicy describes what network traffic is allowed for a set of Pods
-type NetworkPolicy struct {
- metav1.TypeMeta
- // +optional
- metav1.ObjectMeta
-
- // Specification of the desired behavior for this NetworkPolicy.
- // +optional
- Spec NetworkPolicySpec
-}
-
-// Policy Type string describes the NetworkPolicy type
-// This type is beta-level in 1.8
-type PolicyType string
-
-const (
- // PolicyTypeIngress is a NetworkPolicy that affects ingress traffic on selected pods
- PolicyTypeIngress PolicyType = "Ingress"
- // PolicyTypeEgress is a NetworkPolicy that affects egress traffic on selected pods
- PolicyTypeEgress PolicyType = "Egress"
-)
-
-// NetworkPolicySpec provides the specification of a NetworkPolicy
-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 same set of pods. In this case, the ingress rules for
- // each are combined additively. This field is NOT optional and follows standard
- // label selector semantics. An empty podSelector matches all pods in this
- // namespace.
- PodSelector metav1.LabelSelector
-
- // List of ingress rules to be applied to the selected pods. Traffic is allowed to
- // a pod if there are no NetworkPolicies selecting the pod
- // (and cluster policy otherwise allows the traffic), OR if the traffic source is
- // the pod's local node, OR if the traffic matches at least one ingress rule
- // across all of the NetworkPolicy objects whose podSelector matches the pod. If
- // this field is empty then this NetworkPolicy does not allow any traffic (and serves
- // solely to ensure that the pods it selects are isolated by default)
- // +optional
- Ingress []NetworkPolicyIngressRule
-
- // List of egress rules to be applied to the selected pods. Outgoing traffic is
- // allowed if there are no NetworkPolicies selecting the pod (and cluster policy
- // otherwise allows the traffic), OR if the traffic matches at least one egress rule
- // across all of the NetworkPolicy objects whose podSelector matches the pod. If
- // this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
- // solely to ensure that the pods it selects are isolated by default).
- // This field is beta-level in 1.8
- // +optional
- Egress []NetworkPolicyEgressRule
-
- // List of rule types that the NetworkPolicy relates to.
- // Valid options are Ingress, Egress, or Ingress,Egress.
- // If this field is not specified, it will default based on the existence of Ingress or Egress rules;
- // policies that contain an Egress section are assumed to affect Egress, and all policies
- // (whether or not they contain an Ingress section) are assumed to affect Ingress.
- // If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
- // Likewise, if you want to write a policy that specifies that no egress is allowed,
- // you must specify a policyTypes value that include "Egress" (since such a policy would not include
- // an Egress section and would otherwise default to just [ "Ingress" ]).
- // This field is beta-level in 1.8
- // +optional
- PolicyTypes []PolicyType
-}
-
-// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
-// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
-type NetworkPolicyIngressRule struct {
- // 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.
- // +optional
- Ports []NetworkPolicyPort
-
- // 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.
- // +optional
- From []NetworkPolicyPeer
-}
-
-// 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
-type NetworkPolicyEgressRule struct {
- // 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.
- // +optional
- Ports []NetworkPolicyPort
-
- // List of destinations for outgoing traffic of 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 destinations (traffic not restricted by
- // destination). If this field is present and contains at least one item, this rule
- // allows traffic only if the traffic matches at least one item in the to list.
- // +optional
- To []NetworkPolicyPeer
-}
-
-// NetworkPolicyPort describes a port to allow traffic on
-type NetworkPolicyPort struct {
- // The protocol (TCP or UDP) which traffic must match. If not specified, this
- // field defaults to TCP.
- // +optional
- Protocol *api.Protocol
-
- // 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.
- // +optional
- Port *intstr.IntOrString
-}
-
-// 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.
-type IPBlock struct {
- // CIDR is a string representing the IP Block
- // Valid examples are "192.168.1.1/24"
- CIDR string
- // Except is a slice of CIDRs that should not be included within an IP Block
- // Valid examples are "192.168.1.1/24"
- // Except values will be rejected if they are outside the CIDR range
- // +optional
- Except []string
-}
-
-// NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields
-// must be specified.
-type NetworkPolicyPeer struct {
- // 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.
- // +optional
- PodSelector *metav1.LabelSelector
-
- // 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.
- // +optional
- NamespaceSelector *metav1.LabelSelector
-
- // IPBlock defines policy on a particular IPBlock
- // +optional
- IPBlock *IPBlock
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// NetworkPolicyList is a list of NetworkPolicy objects.
-type NetworkPolicyList struct {
- metav1.TypeMeta
- // +optional
- metav1.ListMeta
-
- Items []NetworkPolicy
-}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go
deleted file mode 100644
index 47121a572..000000000
--- a/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,282 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package networking
-
-import (
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- intstr "k8s.io/apimachinery/pkg/util/intstr"
- core "k8s.io/kubernetes/pkg/apis/core"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IPBlock) DeepCopyInto(out *IPBlock) {
- *out = *in
- if in.Except != nil {
- in, out := &in.Except, &out.Except
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPBlock.
-func (in *IPBlock) DeepCopy() *IPBlock {
- if in == nil {
- return nil
- }
- out := new(IPBlock)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicy) DeepCopyInto(out *NetworkPolicy) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicy.
-func (in *NetworkPolicy) DeepCopy() *NetworkPolicy {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *NetworkPolicy) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyEgressRule) DeepCopyInto(out *NetworkPolicyEgressRule) {
- *out = *in
- if in.Ports != nil {
- in, out := &in.Ports, &out.Ports
- *out = make([]NetworkPolicyPort, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.To != nil {
- in, out := &in.To, &out.To
- *out = make([]NetworkPolicyPeer, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyEgressRule.
-func (in *NetworkPolicyEgressRule) DeepCopy() *NetworkPolicyEgressRule {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyEgressRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyIngressRule) DeepCopyInto(out *NetworkPolicyIngressRule) {
- *out = *in
- if in.Ports != nil {
- in, out := &in.Ports, &out.Ports
- *out = make([]NetworkPolicyPort, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.From != nil {
- in, out := &in.From, &out.From
- *out = make([]NetworkPolicyPeer, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyIngressRule.
-func (in *NetworkPolicyIngressRule) DeepCopy() *NetworkPolicyIngressRule {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyIngressRule)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyList) DeepCopyInto(out *NetworkPolicyList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]NetworkPolicy, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyList.
-func (in *NetworkPolicyList) DeepCopy() *NetworkPolicyList {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *NetworkPolicyList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyPeer) DeepCopyInto(out *NetworkPolicyPeer) {
- *out = *in
- if in.PodSelector != nil {
- in, out := &in.PodSelector, &out.PodSelector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.NamespaceSelector != nil {
- in, out := &in.NamespaceSelector, &out.NamespaceSelector
- if *in == nil {
- *out = nil
- } else {
- *out = new(v1.LabelSelector)
- (*in).DeepCopyInto(*out)
- }
- }
- if in.IPBlock != nil {
- in, out := &in.IPBlock, &out.IPBlock
- if *in == nil {
- *out = nil
- } else {
- *out = new(IPBlock)
- (*in).DeepCopyInto(*out)
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyPeer.
-func (in *NetworkPolicyPeer) DeepCopy() *NetworkPolicyPeer {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyPeer)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicyPort) DeepCopyInto(out *NetworkPolicyPort) {
- *out = *in
- if in.Protocol != nil {
- in, out := &in.Protocol, &out.Protocol
- if *in == nil {
- *out = nil
- } else {
- *out = new(core.Protocol)
- **out = **in
- }
- }
- if in.Port != nil {
- in, out := &in.Port, &out.Port
- if *in == nil {
- *out = nil
- } else {
- *out = new(intstr.IntOrString)
- **out = **in
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyPort.
-func (in *NetworkPolicyPort) DeepCopy() *NetworkPolicyPort {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicyPort)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *NetworkPolicySpec) DeepCopyInto(out *NetworkPolicySpec) {
- *out = *in
- in.PodSelector.DeepCopyInto(&out.PodSelector)
- if in.Ingress != nil {
- in, out := &in.Ingress, &out.Ingress
- *out = make([]NetworkPolicyIngressRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.Egress != nil {
- in, out := &in.Egress, &out.Egress
- *out = make([]NetworkPolicyEgressRule, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.PolicyTypes != nil {
- in, out := &in.PolicyTypes, &out.PolicyTypes
- *out = make([]PolicyType, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicySpec.
-func (in *NetworkPolicySpec) DeepCopy() *NetworkPolicySpec {
- if in == nil {
- return nil
- }
- out := new(NetworkPolicySpec)
- in.DeepCopyInto(out)
- return out
-}