(feat) Add auto-discovery in k8s | Adarsh
This commit is contained in:
22
vendor/k8s.io/api/networking/v1/doc.go
generated
vendored
Normal file
22
vendor/k8s.io/api/networking/v1/doc.go
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
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
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
// +groupName=networking.k8s.io
|
||||
|
||||
package v1 // import "k8s.io/api/networking/v1"
|
1854
vendor/k8s.io/api/networking/v1/generated.pb.go
generated
vendored
Normal file
1854
vendor/k8s.io/api/networking/v1/generated.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
195
vendor/k8s.io/api/networking/v1/generated.proto
generated
vendored
Normal file
195
vendor/k8s.io/api/networking/v1/generated.proto
generated
vendored
Normal file
@ -0,0 +1,195 @@
|
||||
/*
|
||||
Copyright 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.
|
||||
*/
|
||||
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = 'proto2';
|
||||
|
||||
package k8s.io.api.networking.v1;
|
||||
|
||||
import "k8s.io/api/core/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1";
|
||||
|
||||
// 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.
|
||||
message IPBlock {
|
||||
// CIDR is a string representing the IP Block
|
||||
// Valid examples are "192.168.1.1/24"
|
||||
optional string cidr = 1;
|
||||
|
||||
// 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
|
||||
repeated string except = 2;
|
||||
}
|
||||
|
||||
// NetworkPolicy describes what network traffic is allowed for a set of Pods
|
||||
message NetworkPolicy {
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Specification of the desired behavior for this NetworkPolicy.
|
||||
// +optional
|
||||
optional NetworkPolicySpec spec = 2;
|
||||
}
|
||||
|
||||
// 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
|
||||
message NetworkPolicyEgressRule {
|
||||
// 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
|
||||
repeated NetworkPolicyPort ports = 1;
|
||||
|
||||
// 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
|
||||
repeated NetworkPolicyPeer to = 2;
|
||||
}
|
||||
|
||||
// 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.
|
||||
message NetworkPolicyIngressRule {
|
||||
// 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
|
||||
repeated NetworkPolicyPort ports = 1;
|
||||
|
||||
// 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
|
||||
repeated NetworkPolicyPeer from = 2;
|
||||
}
|
||||
|
||||
// NetworkPolicyList is a list of NetworkPolicy objects.
|
||||
message NetworkPolicyList {
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is a list of schema objects.
|
||||
repeated NetworkPolicy items = 2;
|
||||
}
|
||||
|
||||
// NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of
|
||||
// fields are allowed
|
||||
message NetworkPolicyPeer {
|
||||
// This is a label selector which selects Pods. This field follows standard label
|
||||
// selector semantics; if present but empty, it selects all pods.
|
||||
//
|
||||
// If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
|
||||
// the Pods matching PodSelector in the Namespaces selected by NamespaceSelector.
|
||||
// Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
|
||||
|
||||
// Selects Namespaces using cluster-scoped labels. This field follows standard label
|
||||
// selector semantics; if present but empty, it selects all namespaces.
|
||||
//
|
||||
// If PodSelector is also set, then the NetworkPolicyPeer as a whole selects
|
||||
// the Pods matching PodSelector in the Namespaces selected by NamespaceSelector.
|
||||
// Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2;
|
||||
|
||||
// IPBlock defines policy on a particular IPBlock. If this field is set then
|
||||
// neither of the other fields can be.
|
||||
// +optional
|
||||
optional IPBlock ipBlock = 3;
|
||||
}
|
||||
|
||||
// NetworkPolicyPort describes a port to allow traffic on
|
||||
message NetworkPolicyPort {
|
||||
// The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this
|
||||
// field defaults to TCP.
|
||||
// +optional
|
||||
optional string protocol = 1;
|
||||
|
||||
// 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
|
||||
optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
|
||||
}
|
||||
|
||||
// NetworkPolicySpec provides the specification of a NetworkPolicy
|
||||
message NetworkPolicySpec {
|
||||
// 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.
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
|
||||
|
||||
// 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
|
||||
repeated NetworkPolicyIngressRule ingress = 2;
|
||||
|
||||
// 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
|
||||
repeated NetworkPolicyEgressRule egress = 3;
|
||||
|
||||
// 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
|
||||
repeated string policyTypes = 4;
|
||||
}
|
||||
|
53
vendor/k8s.io/api/networking/v1/register.go
generated
vendored
Normal file
53
vendor/k8s.io/api/networking/v1/register.go
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
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 v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"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: "v1"}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
var (
|
||||
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
|
||||
// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
localSchemeBuilder = &SchemeBuilder
|
||||
AddToScheme = localSchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// Adds the list of known types to the given scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&NetworkPolicy{},
|
||||
&NetworkPolicyList{},
|
||||
)
|
||||
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
203
vendor/k8s.io/api/networking/v1/types.go
generated
vendored
Normal file
203
vendor/k8s.io/api/networking/v1/types.go
generated
vendored
Normal file
@ -0,0 +1,203 @@
|
||||
/*
|
||||
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 v1
|
||||
|
||||
import (
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
)
|
||||
|
||||
// +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 `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Specification of the desired behavior for this NetworkPolicy.
|
||||
// +optional
|
||||
Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||
}
|
||||
|
||||
// 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 `json:"podSelector" protobuf:"bytes,1,opt,name=podSelector"`
|
||||
|
||||
// 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 `json:"ingress,omitempty" protobuf:"bytes,2,rep,name=ingress"`
|
||||
|
||||
// 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 `json:"egress,omitempty" protobuf:"bytes,3,rep,name=egress"`
|
||||
|
||||
// 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 `json:"policyTypes,omitempty" protobuf:"bytes,4,rep,name=policyTypes,casttype=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 `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
|
||||
|
||||
// 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 `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
|
||||
}
|
||||
|
||||
// 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 `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
|
||||
|
||||
// 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 `json:"to,omitempty" protobuf:"bytes,2,rep,name=to"`
|
||||
}
|
||||
|
||||
// NetworkPolicyPort describes a port to allow traffic on
|
||||
type NetworkPolicyPort struct {
|
||||
// The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this
|
||||
// field defaults to TCP.
|
||||
// +optional
|
||||
Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,1,opt,name=protocol,casttype=k8s.io/api/core/v1.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 `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"`
|
||||
}
|
||||
|
||||
// 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 `json:"cidr" protobuf:"bytes,1,name=cidr"`
|
||||
// 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 `json:"except,omitempty" protobuf:"bytes,2,rep,name=except"`
|
||||
}
|
||||
|
||||
// NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of
|
||||
// fields are allowed
|
||||
type NetworkPolicyPeer struct {
|
||||
// This is a label selector which selects Pods. This field follows standard label
|
||||
// selector semantics; if present but empty, it selects all pods.
|
||||
//
|
||||
// If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects
|
||||
// the Pods matching PodSelector in the Namespaces selected by NamespaceSelector.
|
||||
// Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
|
||||
// +optional
|
||||
PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"`
|
||||
|
||||
// Selects Namespaces using cluster-scoped labels. This field follows standard label
|
||||
// selector semantics; if present but empty, it selects all namespaces.
|
||||
//
|
||||
// If PodSelector is also set, then the NetworkPolicyPeer as a whole selects
|
||||
// the Pods matching PodSelector in the Namespaces selected by NamespaceSelector.
|
||||
// Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
|
||||
// +optional
|
||||
NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"`
|
||||
|
||||
// IPBlock defines policy on a particular IPBlock. If this field is set then
|
||||
// neither of the other fields can be.
|
||||
// +optional
|
||||
IPBlock *IPBlock `json:"ipBlock,omitempty" protobuf:"bytes,3,rep,name=ipBlock"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// NetworkPolicyList is a list of NetworkPolicy objects.
|
||||
type NetworkPolicyList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is a list of schema objects.
|
||||
Items []NetworkPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
113
vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go
generated
vendored
Normal file
113
vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go
generated
vendored
Normal file
@ -0,0 +1,113 @@
|
||||
/*
|
||||
Copyright 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 v1
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||
var map_IPBlock = map[string]string{
|
||||
"": "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.",
|
||||
"cidr": "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\"",
|
||||
"except": "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",
|
||||
}
|
||||
|
||||
func (IPBlock) SwaggerDoc() map[string]string {
|
||||
return map_IPBlock
|
||||
}
|
||||
|
||||
var map_NetworkPolicy = map[string]string{
|
||||
"": "NetworkPolicy describes what network traffic is allowed for a set of Pods",
|
||||
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
|
||||
"spec": "Specification of the desired behavior for this NetworkPolicy.",
|
||||
}
|
||||
|
||||
func (NetworkPolicy) SwaggerDoc() map[string]string {
|
||||
return map_NetworkPolicy
|
||||
}
|
||||
|
||||
var map_NetworkPolicyEgressRule = map[string]string{
|
||||
"": "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",
|
||||
"ports": "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.",
|
||||
"to": "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.",
|
||||
}
|
||||
|
||||
func (NetworkPolicyEgressRule) SwaggerDoc() map[string]string {
|
||||
return map_NetworkPolicyEgressRule
|
||||
}
|
||||
|
||||
var map_NetworkPolicyIngressRule = map[string]string{
|
||||
"": "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.",
|
||||
"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 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 {
|
||||
return map_NetworkPolicyIngressRule
|
||||
}
|
||||
|
||||
var map_NetworkPolicyList = map[string]string{
|
||||
"": "NetworkPolicyList is a list of NetworkPolicy objects.",
|
||||
"metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
|
||||
"items": "Items is a list of schema objects.",
|
||||
}
|
||||
|
||||
func (NetworkPolicyList) SwaggerDoc() map[string]string {
|
||||
return map_NetworkPolicyList
|
||||
}
|
||||
|
||||
var map_NetworkPolicyPeer = map[string]string{
|
||||
"": "NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed",
|
||||
"podSelector": "This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.",
|
||||
"namespaceSelector": "Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.",
|
||||
"ipBlock": "IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.",
|
||||
}
|
||||
|
||||
func (NetworkPolicyPeer) SwaggerDoc() map[string]string {
|
||||
return map_NetworkPolicyPeer
|
||||
}
|
||||
|
||||
var map_NetworkPolicyPort = map[string]string{
|
||||
"": "NetworkPolicyPort describes a port to allow traffic on",
|
||||
"protocol": "The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.",
|
||||
"port": "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.",
|
||||
}
|
||||
|
||||
func (NetworkPolicyPort) SwaggerDoc() map[string]string {
|
||||
return map_NetworkPolicyPort
|
||||
}
|
||||
|
||||
var map_NetworkPolicySpec = map[string]string{
|
||||
"": "NetworkPolicySpec provides the specification of a NetworkPolicy",
|
||||
"podSelector": "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.",
|
||||
"ingress": "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)",
|
||||
"egress": "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",
|
||||
"policyTypes": "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",
|
||||
}
|
||||
|
||||
func (NetworkPolicySpec) SwaggerDoc() map[string]string {
|
||||
return map_NetworkPolicySpec
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
262
vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go
generated
vendored
Normal file
262
vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go
generated
vendored
Normal file
@ -0,0 +1,262 @@
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 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 v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
intstr "k8s.io/apimachinery/pkg/util/intstr"
|
||||
)
|
||||
|
||||
// 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
|
||||
*out = new(metav1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.NamespaceSelector != nil {
|
||||
in, out := &in.NamespaceSelector, &out.NamespaceSelector
|
||||
*out = new(metav1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.IPBlock != nil {
|
||||
in, out := &in.IPBlock, &out.IPBlock
|
||||
*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
|
||||
*out = new(corev1.Protocol)
|
||||
**out = **in
|
||||
}
|
||||
if in.Port != nil {
|
||||
in, out := &in.Port, &out.Port
|
||||
*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
|
||||
}
|
22
vendor/k8s.io/api/networking/v1beta1/doc.go
generated
vendored
Normal file
22
vendor/k8s.io/api/networking/v1beta1/doc.go
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
Copyright 2019 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
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
// +groupName=networking.k8s.io
|
||||
|
||||
package v1beta1 // import "k8s.io/api/networking/v1beta1"
|
1958
vendor/k8s.io/api/networking/v1beta1/generated.pb.go
generated
vendored
Normal file
1958
vendor/k8s.io/api/networking/v1beta1/generated.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
186
vendor/k8s.io/api/networking/v1beta1/generated.proto
generated
vendored
Normal file
186
vendor/k8s.io/api/networking/v1beta1/generated.proto
generated
vendored
Normal file
@ -0,0 +1,186 @@
|
||||
/*
|
||||
Copyright 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.
|
||||
*/
|
||||
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = 'proto2';
|
||||
|
||||
package k8s.io.api.networking.v1beta1;
|
||||
|
||||
import "k8s.io/api/core/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1beta1";
|
||||
|
||||
// HTTPIngressPath associates a path regex with a backend. Incoming urls matching
|
||||
// the path are forwarded to the backend.
|
||||
message HTTPIngressPath {
|
||||
// Path is an extended POSIX regex as defined by IEEE Std 1003.1,
|
||||
// (i.e this follows the egrep/unix syntax, not the perl syntax)
|
||||
// matched against the path of an incoming request. Currently it can
|
||||
// contain characters disallowed from the conventional "path"
|
||||
// part of a URL as defined by RFC 3986. Paths must begin with
|
||||
// a '/'. If unspecified, the path defaults to a catch all sending
|
||||
// traffic to the backend.
|
||||
// +optional
|
||||
optional string path = 1;
|
||||
|
||||
// Backend defines the referenced service endpoint to which the traffic
|
||||
// will be forwarded to.
|
||||
optional IngressBackend backend = 2;
|
||||
}
|
||||
|
||||
// HTTPIngressRuleValue is a list of http selectors pointing to backends.
|
||||
// In the example: http://<host>/<path>?<searchpart> -> backend where
|
||||
// where parts of the url correspond to RFC 3986, this resource will be used
|
||||
// to match against everything after the last '/' and before the first '?'
|
||||
// or '#'.
|
||||
message HTTPIngressRuleValue {
|
||||
// A collection of paths that map requests to backends.
|
||||
repeated HTTPIngressPath paths = 1;
|
||||
}
|
||||
|
||||
// Ingress is a collection of rules that allow inbound connections to reach the
|
||||
// endpoints defined by a backend. An Ingress can be configured to give services
|
||||
// externally-reachable urls, load balance traffic, terminate SSL, offer name
|
||||
// based virtual hosting etc.
|
||||
message Ingress {
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec is the desired state of the Ingress.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
optional IngressSpec spec = 2;
|
||||
|
||||
// Status is the current state of the Ingress.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
optional IngressStatus status = 3;
|
||||
}
|
||||
|
||||
// IngressBackend describes all endpoints for a given service and port.
|
||||
message IngressBackend {
|
||||
// Specifies the name of the referenced service.
|
||||
optional string serviceName = 1;
|
||||
|
||||
// Specifies the port of the referenced service.
|
||||
optional k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2;
|
||||
}
|
||||
|
||||
// IngressList is a collection of Ingress.
|
||||
message IngressList {
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of Ingress.
|
||||
repeated Ingress items = 2;
|
||||
}
|
||||
|
||||
// IngressRule represents the rules mapping the paths under a specified host to
|
||||
// the related backend services. Incoming requests are first evaluated for a host
|
||||
// match, then routed to the backend associated with the matching IngressRuleValue.
|
||||
message IngressRule {
|
||||
// Host is the fully qualified domain name of a network host, as defined
|
||||
// by RFC 3986. Note the following deviations from the "host" part of the
|
||||
// URI as defined in the RFC:
|
||||
// 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
|
||||
// IP in the Spec of the parent Ingress.
|
||||
// 2. The `:` delimiter is not respected because ports are not allowed.
|
||||
// Currently the port of an Ingress is implicitly :80 for http and
|
||||
// :443 for https.
|
||||
// Both these may change in the future.
|
||||
// Incoming requests are matched against the host before the IngressRuleValue.
|
||||
// If the host is unspecified, the Ingress routes all traffic based on the
|
||||
// specified IngressRuleValue.
|
||||
// +optional
|
||||
optional string host = 1;
|
||||
|
||||
// IngressRuleValue represents a rule to route requests for this IngressRule.
|
||||
// If unspecified, the rule defaults to a http catch-all. Whether that sends
|
||||
// just traffic matching the host to the default backend or all traffic to the
|
||||
// default backend, is left to the controller fulfilling the Ingress. Http is
|
||||
// currently the only supported IngressRuleValue.
|
||||
// +optional
|
||||
optional IngressRuleValue ingressRuleValue = 2;
|
||||
}
|
||||
|
||||
// IngressRuleValue represents a rule to apply against incoming requests. If the
|
||||
// rule is satisfied, the request is routed to the specified backend. Currently
|
||||
// mixing different types of rules in a single Ingress is disallowed, so exactly
|
||||
// one of the following must be set.
|
||||
message IngressRuleValue {
|
||||
// +optional
|
||||
optional HTTPIngressRuleValue http = 1;
|
||||
}
|
||||
|
||||
// IngressSpec describes the Ingress the user wishes to exist.
|
||||
message IngressSpec {
|
||||
// A default backend capable of servicing requests that don't match any
|
||||
// rule. At least one of 'backend' or 'rules' must be specified. This field
|
||||
// is optional to allow the loadbalancer controller or defaulting logic to
|
||||
// specify a global default.
|
||||
// +optional
|
||||
optional IngressBackend backend = 1;
|
||||
|
||||
// TLS configuration. Currently the Ingress only supports a single TLS
|
||||
// port, 443. If multiple members of this list specify different hosts, they
|
||||
// will be multiplexed on the same port according to the hostname specified
|
||||
// through the SNI TLS extension, if the ingress controller fulfilling the
|
||||
// ingress supports SNI.
|
||||
// +optional
|
||||
repeated IngressTLS tls = 2;
|
||||
|
||||
// A list of host rules used to configure the Ingress. If unspecified, or
|
||||
// no rule matches, all traffic is sent to the default backend.
|
||||
// +optional
|
||||
repeated IngressRule rules = 3;
|
||||
}
|
||||
|
||||
// IngressStatus describe the current state of the Ingress.
|
||||
message IngressStatus {
|
||||
// LoadBalancer contains the current status of the load-balancer.
|
||||
// +optional
|
||||
optional k8s.io.api.core.v1.LoadBalancerStatus loadBalancer = 1;
|
||||
}
|
||||
|
||||
// IngressTLS describes the transport layer security associated with an Ingress.
|
||||
message IngressTLS {
|
||||
// Hosts are a list of hosts included in the TLS certificate. The values in
|
||||
// this list must match the name/s used in the tlsSecret. Defaults to the
|
||||
// wildcard host setting for the loadbalancer controller fulfilling this
|
||||
// Ingress, if left unspecified.
|
||||
// +optional
|
||||
repeated string hosts = 1;
|
||||
|
||||
// SecretName is the name of the secret used to terminate SSL traffic on 443.
|
||||
// Field is left optional to allow SSL routing based on SNI hostname alone.
|
||||
// If the SNI host in a listener conflicts with the "Host" header field used
|
||||
// by an IngressRule, the SNI host is used for termination and value of the
|
||||
// Host header is used for routing.
|
||||
// +optional
|
||||
optional string secretName = 2;
|
||||
}
|
||||
|
56
vendor/k8s.io/api/networking/v1beta1/register.go
generated
vendored
Normal file
56
vendor/k8s.io/api/networking/v1beta1/register.go
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
Copyright 2019 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 v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"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: "v1beta1"}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
var (
|
||||
// SchemeBuilder holds functions that add things to a scheme
|
||||
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
|
||||
// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
localSchemeBuilder = &SchemeBuilder
|
||||
|
||||
// AddToScheme adds the types of this group into the given scheme.
|
||||
AddToScheme = localSchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// Adds the list of known types to the given scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&Ingress{},
|
||||
&IngressList{},
|
||||
)
|
||||
// Add the watch version that applies
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
192
vendor/k8s.io/api/networking/v1beta1/types.go
generated
vendored
Normal file
192
vendor/k8s.io/api/networking/v1beta1/types.go
generated
vendored
Normal file
@ -0,0 +1,192 @@
|
||||
/*
|
||||
Copyright 2019 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 v1beta1
|
||||
|
||||
import (
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Ingress is a collection of rules that allow inbound connections to reach the
|
||||
// endpoints defined by a backend. An Ingress can be configured to give services
|
||||
// externally-reachable urls, load balance traffic, terminate SSL, offer name
|
||||
// based virtual hosting etc.
|
||||
type Ingress struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec is the desired state of the Ingress.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Spec IngressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||
|
||||
// Status is the current state of the Ingress.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Status IngressStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// IngressList is a collection of Ingress.
|
||||
type IngressList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of Ingress.
|
||||
Items []Ingress `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// IngressSpec describes the Ingress the user wishes to exist.
|
||||
type IngressSpec struct {
|
||||
// A default backend capable of servicing requests that don't match any
|
||||
// rule. At least one of 'backend' or 'rules' must be specified. This field
|
||||
// is optional to allow the loadbalancer controller or defaulting logic to
|
||||
// specify a global default.
|
||||
// +optional
|
||||
Backend *IngressBackend `json:"backend,omitempty" protobuf:"bytes,1,opt,name=backend"`
|
||||
|
||||
// TLS configuration. Currently the Ingress only supports a single TLS
|
||||
// port, 443. If multiple members of this list specify different hosts, they
|
||||
// will be multiplexed on the same port according to the hostname specified
|
||||
// through the SNI TLS extension, if the ingress controller fulfilling the
|
||||
// ingress supports SNI.
|
||||
// +optional
|
||||
TLS []IngressTLS `json:"tls,omitempty" protobuf:"bytes,2,rep,name=tls"`
|
||||
|
||||
// A list of host rules used to configure the Ingress. If unspecified, or
|
||||
// no rule matches, all traffic is sent to the default backend.
|
||||
// +optional
|
||||
Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"`
|
||||
// TODO: Add the ability to specify load-balancer IP through claims
|
||||
}
|
||||
|
||||
// IngressTLS describes the transport layer security associated with an Ingress.
|
||||
type IngressTLS struct {
|
||||
// Hosts are a list of hosts included in the TLS certificate. The values in
|
||||
// this list must match the name/s used in the tlsSecret. Defaults to the
|
||||
// wildcard host setting for the loadbalancer controller fulfilling this
|
||||
// Ingress, if left unspecified.
|
||||
// +optional
|
||||
Hosts []string `json:"hosts,omitempty" protobuf:"bytes,1,rep,name=hosts"`
|
||||
// SecretName is the name of the secret used to terminate SSL traffic on 443.
|
||||
// Field is left optional to allow SSL routing based on SNI hostname alone.
|
||||
// If the SNI host in a listener conflicts with the "Host" header field used
|
||||
// by an IngressRule, the SNI host is used for termination and value of the
|
||||
// Host header is used for routing.
|
||||
// +optional
|
||||
SecretName string `json:"secretName,omitempty" protobuf:"bytes,2,opt,name=secretName"`
|
||||
// TODO: Consider specifying different modes of termination, protocols etc.
|
||||
}
|
||||
|
||||
// IngressStatus describe the current state of the Ingress.
|
||||
type IngressStatus struct {
|
||||
// LoadBalancer contains the current status of the load-balancer.
|
||||
// +optional
|
||||
LoadBalancer v1.LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"`
|
||||
}
|
||||
|
||||
// IngressRule represents the rules mapping the paths under a specified host to
|
||||
// the related backend services. Incoming requests are first evaluated for a host
|
||||
// match, then routed to the backend associated with the matching IngressRuleValue.
|
||||
type IngressRule struct {
|
||||
// Host is the fully qualified domain name of a network host, as defined
|
||||
// by RFC 3986. Note the following deviations from the "host" part of the
|
||||
// URI as defined in the RFC:
|
||||
// 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
|
||||
// IP in the Spec of the parent Ingress.
|
||||
// 2. The `:` delimiter is not respected because ports are not allowed.
|
||||
// Currently the port of an Ingress is implicitly :80 for http and
|
||||
// :443 for https.
|
||||
// Both these may change in the future.
|
||||
// Incoming requests are matched against the host before the IngressRuleValue.
|
||||
// If the host is unspecified, the Ingress routes all traffic based on the
|
||||
// specified IngressRuleValue.
|
||||
// +optional
|
||||
Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"`
|
||||
// IngressRuleValue represents a rule to route requests for this IngressRule.
|
||||
// If unspecified, the rule defaults to a http catch-all. Whether that sends
|
||||
// just traffic matching the host to the default backend or all traffic to the
|
||||
// default backend, is left to the controller fulfilling the Ingress. Http is
|
||||
// currently the only supported IngressRuleValue.
|
||||
// +optional
|
||||
IngressRuleValue `json:",inline,omitempty" protobuf:"bytes,2,opt,name=ingressRuleValue"`
|
||||
}
|
||||
|
||||
// IngressRuleValue represents a rule to apply against incoming requests. If the
|
||||
// rule is satisfied, the request is routed to the specified backend. Currently
|
||||
// mixing different types of rules in a single Ingress is disallowed, so exactly
|
||||
// one of the following must be set.
|
||||
type IngressRuleValue struct {
|
||||
//TODO:
|
||||
// 1. Consider renaming this resource and the associated rules so they
|
||||
// aren't tied to Ingress. They can be used to route intra-cluster traffic.
|
||||
// 2. Consider adding fields for ingress-type specific global options
|
||||
// usable by a loadbalancer, like http keep-alive.
|
||||
|
||||
// +optional
|
||||
HTTP *HTTPIngressRuleValue `json:"http,omitempty" protobuf:"bytes,1,opt,name=http"`
|
||||
}
|
||||
|
||||
// HTTPIngressRuleValue is a list of http selectors pointing to backends.
|
||||
// In the example: http://<host>/<path>?<searchpart> -> backend where
|
||||
// where parts of the url correspond to RFC 3986, this resource will be used
|
||||
// to match against everything after the last '/' and before the first '?'
|
||||
// or '#'.
|
||||
type HTTPIngressRuleValue struct {
|
||||
// A collection of paths that map requests to backends.
|
||||
Paths []HTTPIngressPath `json:"paths" protobuf:"bytes,1,rep,name=paths"`
|
||||
// TODO: Consider adding fields for ingress-type specific global
|
||||
// options usable by a loadbalancer, like http keep-alive.
|
||||
}
|
||||
|
||||
// HTTPIngressPath associates a path regex with a backend. Incoming urls matching
|
||||
// the path are forwarded to the backend.
|
||||
type HTTPIngressPath struct {
|
||||
// Path is an extended POSIX regex as defined by IEEE Std 1003.1,
|
||||
// (i.e this follows the egrep/unix syntax, not the perl syntax)
|
||||
// matched against the path of an incoming request. Currently it can
|
||||
// contain characters disallowed from the conventional "path"
|
||||
// part of a URL as defined by RFC 3986. Paths must begin with
|
||||
// a '/'. If unspecified, the path defaults to a catch all sending
|
||||
// traffic to the backend.
|
||||
// +optional
|
||||
Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
|
||||
|
||||
// Backend defines the referenced service endpoint to which the traffic
|
||||
// will be forwarded to.
|
||||
Backend IngressBackend `json:"backend" protobuf:"bytes,2,opt,name=backend"`
|
||||
}
|
||||
|
||||
// IngressBackend describes all endpoints for a given service and port.
|
||||
type IngressBackend struct {
|
||||
// Specifies the name of the referenced service.
|
||||
ServiceName string `json:"serviceName" protobuf:"bytes,1,opt,name=serviceName"`
|
||||
|
||||
// Specifies the port of the referenced service.
|
||||
ServicePort intstr.IntOrString `json:"servicePort" protobuf:"bytes,2,opt,name=servicePort"`
|
||||
}
|
127
vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go
generated
vendored
Normal file
127
vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go
generated
vendored
Normal file
@ -0,0 +1,127 @@
|
||||
/*
|
||||
Copyright 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 v1beta1
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||
var map_HTTPIngressPath = map[string]string{
|
||||
"": "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.",
|
||||
"path": "Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.",
|
||||
"backend": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.",
|
||||
}
|
||||
|
||||
func (HTTPIngressPath) SwaggerDoc() map[string]string {
|
||||
return map_HTTPIngressPath
|
||||
}
|
||||
|
||||
var map_HTTPIngressRuleValue = map[string]string{
|
||||
"": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://<host>/<path>?<searchpart> -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.",
|
||||
"paths": "A collection of paths that map requests to backends.",
|
||||
}
|
||||
|
||||
func (HTTPIngressRuleValue) SwaggerDoc() map[string]string {
|
||||
return map_HTTPIngressRuleValue
|
||||
}
|
||||
|
||||
var map_Ingress = map[string]string{
|
||||
"": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.",
|
||||
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"spec": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
|
||||
"status": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
|
||||
}
|
||||
|
||||
func (Ingress) SwaggerDoc() map[string]string {
|
||||
return map_Ingress
|
||||
}
|
||||
|
||||
var map_IngressBackend = map[string]string{
|
||||
"": "IngressBackend describes all endpoints for a given service and port.",
|
||||
"serviceName": "Specifies the name of the referenced service.",
|
||||
"servicePort": "Specifies the port of the referenced service.",
|
||||
}
|
||||
|
||||
func (IngressBackend) SwaggerDoc() map[string]string {
|
||||
return map_IngressBackend
|
||||
}
|
||||
|
||||
var map_IngressList = map[string]string{
|
||||
"": "IngressList is a collection of Ingress.",
|
||||
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"items": "Items is the list of Ingress.",
|
||||
}
|
||||
|
||||
func (IngressList) SwaggerDoc() map[string]string {
|
||||
return map_IngressList
|
||||
}
|
||||
|
||||
var map_IngressRule = map[string]string{
|
||||
"": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.",
|
||||
"host": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the\n\t IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.",
|
||||
}
|
||||
|
||||
func (IngressRule) SwaggerDoc() map[string]string {
|
||||
return map_IngressRule
|
||||
}
|
||||
|
||||
var map_IngressRuleValue = map[string]string{
|
||||
"": "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.",
|
||||
}
|
||||
|
||||
func (IngressRuleValue) SwaggerDoc() map[string]string {
|
||||
return map_IngressRuleValue
|
||||
}
|
||||
|
||||
var map_IngressSpec = map[string]string{
|
||||
"": "IngressSpec describes the Ingress the user wishes to exist.",
|
||||
"backend": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.",
|
||||
"tls": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.",
|
||||
"rules": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.",
|
||||
}
|
||||
|
||||
func (IngressSpec) SwaggerDoc() map[string]string {
|
||||
return map_IngressSpec
|
||||
}
|
||||
|
||||
var map_IngressStatus = map[string]string{
|
||||
"": "IngressStatus describe the current state of the Ingress.",
|
||||
"loadBalancer": "LoadBalancer contains the current status of the load-balancer.",
|
||||
}
|
||||
|
||||
func (IngressStatus) SwaggerDoc() map[string]string {
|
||||
return map_IngressStatus
|
||||
}
|
||||
|
||||
var map_IngressTLS = map[string]string{
|
||||
"": "IngressTLS describes the transport layer security associated with an Ingress.",
|
||||
"hosts": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.",
|
||||
"secretName": "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.",
|
||||
}
|
||||
|
||||
func (IngressTLS) SwaggerDoc() map[string]string {
|
||||
return map_IngressTLS
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
252
vendor/k8s.io/api/networking/v1beta1/zz_generated.deepcopy.go
generated
vendored
Normal file
252
vendor/k8s.io/api/networking/v1beta1/zz_generated.deepcopy.go
generated
vendored
Normal file
@ -0,0 +1,252 @@
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 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 v1beta1
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *HTTPIngressPath) DeepCopyInto(out *HTTPIngressPath) {
|
||||
*out = *in
|
||||
out.Backend = in.Backend
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPIngressPath.
|
||||
func (in *HTTPIngressPath) DeepCopy() *HTTPIngressPath {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(HTTPIngressPath)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *HTTPIngressRuleValue) DeepCopyInto(out *HTTPIngressRuleValue) {
|
||||
*out = *in
|
||||
if in.Paths != nil {
|
||||
in, out := &in.Paths, &out.Paths
|
||||
*out = make([]HTTPIngressPath, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPIngressRuleValue.
|
||||
func (in *HTTPIngressRuleValue) DeepCopy() *HTTPIngressRuleValue {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(HTTPIngressRuleValue)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Ingress) DeepCopyInto(out *Ingress) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ingress.
|
||||
func (in *Ingress) DeepCopy() *Ingress {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Ingress)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Ingress) 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 *IngressBackend) DeepCopyInto(out *IngressBackend) {
|
||||
*out = *in
|
||||
out.ServicePort = in.ServicePort
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressBackend.
|
||||
func (in *IngressBackend) DeepCopy() *IngressBackend {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IngressBackend)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IngressList) DeepCopyInto(out *IngressList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Ingress, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressList.
|
||||
func (in *IngressList) DeepCopy() *IngressList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IngressList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *IngressList) 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 *IngressRule) DeepCopyInto(out *IngressRule) {
|
||||
*out = *in
|
||||
in.IngressRuleValue.DeepCopyInto(&out.IngressRuleValue)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRule.
|
||||
func (in *IngressRule) DeepCopy() *IngressRule {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IngressRule)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IngressRuleValue) DeepCopyInto(out *IngressRuleValue) {
|
||||
*out = *in
|
||||
if in.HTTP != nil {
|
||||
in, out := &in.HTTP, &out.HTTP
|
||||
*out = new(HTTPIngressRuleValue)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRuleValue.
|
||||
func (in *IngressRuleValue) DeepCopy() *IngressRuleValue {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IngressRuleValue)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IngressSpec) DeepCopyInto(out *IngressSpec) {
|
||||
*out = *in
|
||||
if in.Backend != nil {
|
||||
in, out := &in.Backend, &out.Backend
|
||||
*out = new(IngressBackend)
|
||||
**out = **in
|
||||
}
|
||||
if in.TLS != nil {
|
||||
in, out := &in.TLS, &out.TLS
|
||||
*out = make([]IngressTLS, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]IngressRule, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressSpec.
|
||||
func (in *IngressSpec) DeepCopy() *IngressSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IngressSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IngressStatus) DeepCopyInto(out *IngressStatus) {
|
||||
*out = *in
|
||||
in.LoadBalancer.DeepCopyInto(&out.LoadBalancer)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressStatus.
|
||||
func (in *IngressStatus) DeepCopy() *IngressStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IngressStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IngressTLS) DeepCopyInto(out *IngressTLS) {
|
||||
*out = *in
|
||||
if in.Hosts != nil {
|
||||
in, out := &in.Hosts, &out.Hosts
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressTLS.
|
||||
func (in *IngressTLS) DeepCopy() *IngressTLS {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IngressTLS)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
Reference in New Issue
Block a user