Update go dependencies
This commit is contained in:
parent
3c1a5c5fc2
commit
6c33bee8fd
620 changed files with 29782 additions and 15901 deletions
99
vendor/k8s.io/kubernetes/pkg/apis/OWNERS
generated
vendored
99
vendor/k8s.io/kubernetes/pkg/apis/OWNERS
generated
vendored
|
|
@ -1,44 +1,55 @@
|
|||
approvers:
|
||||
- erictune
|
||||
- lavalamp
|
||||
- smarterclayton
|
||||
- thockin
|
||||
- liggitt
|
||||
# - bgrant0607 # manual escalations only
|
||||
reviewers:
|
||||
- lavalamp
|
||||
- smarterclayton
|
||||
- wojtek-t
|
||||
- deads2k
|
||||
- yujuhong
|
||||
- brendandburns
|
||||
- derekwaynecarr
|
||||
- caesarxuchao
|
||||
- vishh
|
||||
- mikedanese
|
||||
- liggitt
|
||||
- nikhiljindal
|
||||
- gmarek
|
||||
- erictune
|
||||
- pmorie
|
||||
- sttts
|
||||
- dchen1107
|
||||
- saad-ali
|
||||
- luxas
|
||||
- janetkuo
|
||||
- justinsb
|
||||
- pwittrock
|
||||
- ncdc
|
||||
- tallclair
|
||||
- yifan-gu
|
||||
- eparis
|
||||
- mwielgus
|
||||
- feiskyer
|
||||
- soltysh
|
||||
- piosz
|
||||
- dims
|
||||
- errordeveloper
|
||||
- madhusudancs
|
||||
- krousey
|
||||
- rootfs
|
||||
- jszczepkowski
|
||||
# See the OWNERS docs at https://go.k8s.io/owners
|
||||
|
||||
filters:
|
||||
".*":
|
||||
approvers:
|
||||
- erictune
|
||||
- lavalamp
|
||||
- smarterclayton
|
||||
- thockin
|
||||
- liggitt
|
||||
# - bgrant0607 # manual escalations only
|
||||
reviewers:
|
||||
- lavalamp
|
||||
- smarterclayton
|
||||
- wojtek-t
|
||||
- deads2k
|
||||
- yujuhong
|
||||
- brendandburns
|
||||
- derekwaynecarr
|
||||
- caesarxuchao
|
||||
- vishh
|
||||
- mikedanese
|
||||
- liggitt
|
||||
- nikhiljindal
|
||||
- gmarek
|
||||
- erictune
|
||||
- pmorie
|
||||
- sttts
|
||||
- dchen1107
|
||||
- saad-ali
|
||||
- luxas
|
||||
- janetkuo
|
||||
- justinsb
|
||||
- pwittrock
|
||||
- ncdc
|
||||
- tallclair
|
||||
- yifan-gu
|
||||
- eparis
|
||||
- mwielgus
|
||||
- feiskyer
|
||||
- soltysh
|
||||
- piosz
|
||||
- dims
|
||||
- errordeveloper
|
||||
- madhusudancs
|
||||
- krousey
|
||||
- rootfs
|
||||
- jszczepkowski
|
||||
|
||||
# examples:
|
||||
# pkg/apis/*/types.go
|
||||
# pkg/apis/*/*/types.go
|
||||
"[^/]+/([^/]+/)?(register|types)\\.go$":
|
||||
labels:
|
||||
- kind/api-change
|
||||
|
|
|
|||
9
vendor/k8s.io/kubernetes/pkg/apis/autoscaling/BUILD
generated
vendored
9
vendor/k8s.io/kubernetes/pkg/apis/autoscaling/BUILD
generated
vendored
|
|
@ -17,10 +17,10 @@ go_library(
|
|||
importpath = "k8s.io/kubernetes/pkg/apis/autoscaling",
|
||||
deps = [
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -39,6 +39,7 @@ filegroup(
|
|||
"//pkg/apis/autoscaling/install:all-srcs",
|
||||
"//pkg/apis/autoscaling/v1:all-srcs",
|
||||
"//pkg/apis/autoscaling/v2beta1:all-srcs",
|
||||
"//pkg/apis/autoscaling/v2beta2:all-srcs",
|
||||
"//pkg/apis/autoscaling/validation:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
|
|
|
|||
138
vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go
generated
vendored
138
vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go
generated
vendored
|
|
@ -154,13 +154,9 @@ type MetricSpec struct {
|
|||
// ObjectMetricSource indicates how to scale on a metric describing a
|
||||
// kubernetes object (for example, hits-per-second on an Ingress object).
|
||||
type ObjectMetricSource struct {
|
||||
// Target is the described Kubernetes object.
|
||||
Target CrossVersionObjectReference
|
||||
|
||||
// MetricName is the name of the metric in question.
|
||||
MetricName string
|
||||
// TargetValue is the target value of the metric (as a quantity).
|
||||
TargetValue resource.Quantity
|
||||
DescribedObject CrossVersionObjectReference
|
||||
Target MetricTarget
|
||||
Metric MetricIdentifier
|
||||
}
|
||||
|
||||
// PodsMetricSource indicates how to scale on a metric describing each pod in
|
||||
|
|
@ -168,11 +164,10 @@ type ObjectMetricSource struct {
|
|||
// The values will be averaged together before being compared to the target
|
||||
// value.
|
||||
type PodsMetricSource struct {
|
||||
// MetricName is the name of the metric in question
|
||||
MetricName string
|
||||
// TargetAverageValue is the target value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
TargetAverageValue resource.Quantity
|
||||
// metric identifies the target metric by name and selector
|
||||
Metric MetricIdentifier
|
||||
// target specifies the target value for the given metric
|
||||
Target MetricTarget
|
||||
}
|
||||
|
||||
// ResourceMetricSource indicates how to scale on a resource metric known to
|
||||
|
|
@ -185,38 +180,57 @@ type PodsMetricSource struct {
|
|||
type ResourceMetricSource struct {
|
||||
// Name is the name of the resource in question.
|
||||
Name api.ResourceName
|
||||
// TargetAverageUtilization is the target value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods.
|
||||
// +optional
|
||||
TargetAverageUtilization *int32
|
||||
// TargetAverageValue is the target value of the average of the
|
||||
// resource metric across all relevant pods, as a raw value (instead of as
|
||||
// a percentage of the request), similar to the "pods" metric source type.
|
||||
// +optional
|
||||
TargetAverageValue *resource.Quantity
|
||||
// Target specifies the target value for the given metric
|
||||
Target MetricTarget
|
||||
}
|
||||
|
||||
// ExternalMetricSource indicates how to scale on a metric not associated with
|
||||
// any Kubernetes object (for example length of queue in cloud
|
||||
// messaging service, or QPS from loadbalancer running outside of cluster).
|
||||
type ExternalMetricSource struct {
|
||||
// metricName is the name of the metric in question.
|
||||
MetricName string
|
||||
// MetricSelector is used to identify a specific time series
|
||||
// within a given metric.
|
||||
// +optional
|
||||
MetricSelector *metav1.LabelSelector
|
||||
// TargetValue is the target value of the metric (as a quantity).
|
||||
// Mutually exclusive with TargetAverageValue.
|
||||
// +optional
|
||||
TargetValue *resource.Quantity
|
||||
// TargetAverageValue is the target per-pod value of global metric (as a quantity).
|
||||
// Mutually exclusive with TargetValue.
|
||||
// +optional
|
||||
TargetAverageValue *resource.Quantity
|
||||
// Metric identifies the target metric by name and selector
|
||||
Metric MetricIdentifier
|
||||
// Target specifies the target value for the given metric
|
||||
Target MetricTarget
|
||||
}
|
||||
|
||||
// MetricIdentifier defines the name and optionally selector for a metric
|
||||
type MetricIdentifier struct {
|
||||
// Name is the name of the given metric
|
||||
Name string
|
||||
// Selector is the selector for the given metric
|
||||
// it is the string-encoded form of a standard kubernetes label selector
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector
|
||||
}
|
||||
|
||||
// MetricTarget defines the target value, average value, or average utilization of a specific metric
|
||||
type MetricTarget struct {
|
||||
// Type represents whether the metric type is Utilization, Value, or AverageValue
|
||||
Type MetricTargetType
|
||||
// Value is the target value of the metric (as a quantity).
|
||||
Value *resource.Quantity
|
||||
// TargetAverageValue is the target value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
AverageValue *resource.Quantity
|
||||
|
||||
// AverageUtilization is the target value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods.
|
||||
// Currently only valid for Resource metric source type
|
||||
AverageUtilization *int32
|
||||
}
|
||||
|
||||
// MetricTargetType specifies the type of metric being targeted, and should be either
|
||||
// "Value", "AverageValue", or "Utilization"
|
||||
type MetricTargetType string
|
||||
|
||||
var (
|
||||
UtilizationMetricType MetricTargetType = "Utilization"
|
||||
ValueMetricType MetricTargetType = "Value"
|
||||
AverageValueMetricType MetricTargetType = "AverageValue"
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
|
||||
type HorizontalPodAutoscalerStatus struct {
|
||||
// ObservedGeneration is the most recent generation observed by this autoscaler.
|
||||
|
|
@ -237,6 +251,7 @@ type HorizontalPodAutoscalerStatus struct {
|
|||
DesiredReplicas int32
|
||||
|
||||
// CurrentMetrics is the last read state of the metrics used by this autoscaler.
|
||||
// +optional
|
||||
CurrentMetrics []MetricStatus
|
||||
|
||||
// Conditions is the set of conditions required for this autoscaler to scale its target,
|
||||
|
|
@ -327,23 +342,17 @@ type MetricStatus struct {
|
|||
// ObjectMetricStatus indicates the current value of a metric describing a
|
||||
// kubernetes object (for example, hits-per-second on an Ingress object).
|
||||
type ObjectMetricStatus struct {
|
||||
// Target is the described Kubernetes object.
|
||||
Target CrossVersionObjectReference
|
||||
Metric MetricIdentifier
|
||||
Current MetricValueStatus
|
||||
|
||||
// MetricName is the name of the metric in question.
|
||||
MetricName string
|
||||
// CurrentValue is the current value of the metric (as a quantity).
|
||||
CurrentValue resource.Quantity
|
||||
DescribedObject CrossVersionObjectReference
|
||||
}
|
||||
|
||||
// PodsMetricStatus indicates the current value of a metric describing each pod in
|
||||
// the current scale target (for example, transactions-processed-per-second).
|
||||
type PodsMetricStatus struct {
|
||||
// MetricName is the name of the metric in question
|
||||
MetricName string
|
||||
// CurrentAverageValue is the current value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
CurrentAverageValue resource.Quantity
|
||||
Metric MetricIdentifier
|
||||
Current MetricValueStatus
|
||||
}
|
||||
|
||||
// ResourceMetricStatus indicates the current value of a resource metric known to
|
||||
|
|
@ -353,36 +362,21 @@ type PodsMetricStatus struct {
|
|||
// normal per-pod metrics using the "pods" source.
|
||||
type ResourceMetricStatus struct {
|
||||
// Name is the name of the resource in question.
|
||||
Name api.ResourceName
|
||||
// CurrentAverageUtilization is the current value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods. It will only be
|
||||
// present if `targetAverageValue` was set in the corresponding metric
|
||||
// specification.
|
||||
// +optional
|
||||
CurrentAverageUtilization *int32
|
||||
// CurrentAverageValue is the current value of the average of the
|
||||
// resource metric across all relevant pods, as a raw value (instead of as
|
||||
// a percentage of the request), similar to the "pods" metric source type.
|
||||
// It will always be set, regardless of the corresponding metric specification.
|
||||
CurrentAverageValue resource.Quantity
|
||||
Name api.ResourceName
|
||||
Current MetricValueStatus
|
||||
}
|
||||
|
||||
// ExternalMetricStatus indicates the current value of a global metric
|
||||
// not associated with any Kubernetes object.
|
||||
type ExternalMetricStatus struct {
|
||||
// MetricName is the name of a metric used for autoscaling in
|
||||
// metric system.
|
||||
MetricName string
|
||||
// MetricSelector is used to identify a specific time series
|
||||
// within a given metric.
|
||||
// +optional
|
||||
MetricSelector *metav1.LabelSelector
|
||||
// CurrentValue is the current value of the metric (as a quantity)
|
||||
CurrentValue resource.Quantity
|
||||
// CurrentAverageValue is the current value of metric averaged over autoscaled pods.
|
||||
// +optional
|
||||
CurrentAverageValue *resource.Quantity
|
||||
Metric MetricIdentifier
|
||||
Current MetricValueStatus
|
||||
}
|
||||
|
||||
type MetricValueStatus struct {
|
||||
Value *resource.Quantity
|
||||
AverageValue *resource.Quantity
|
||||
AverageUtilization *int32
|
||||
}
|
||||
|
||||
// +genclient
|
||||
|
|
|
|||
265
vendor/k8s.io/kubernetes/pkg/apis/autoscaling/zz_generated.deepcopy.go
generated
vendored
265
vendor/k8s.io/kubernetes/pkg/apis/autoscaling/zz_generated.deepcopy.go
generated
vendored
|
|
@ -44,33 +44,8 @@ func (in *CrossVersionObjectReference) DeepCopy() *CrossVersionObjectReference {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ExternalMetricSource) DeepCopyInto(out *ExternalMetricSource) {
|
||||
*out = *in
|
||||
if in.MetricSelector != nil {
|
||||
in, out := &in.MetricSelector, &out.MetricSelector
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.TargetValue != nil {
|
||||
in, out := &in.TargetValue, &out.TargetValue
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
}
|
||||
if in.TargetAverageValue != nil {
|
||||
in, out := &in.TargetAverageValue, &out.TargetAverageValue
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
}
|
||||
in.Metric.DeepCopyInto(&out.Metric)
|
||||
in.Target.DeepCopyInto(&out.Target)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -87,25 +62,8 @@ func (in *ExternalMetricSource) DeepCopy() *ExternalMetricSource {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ExternalMetricStatus) DeepCopyInto(out *ExternalMetricStatus) {
|
||||
*out = *in
|
||||
if in.MetricSelector != nil {
|
||||
in, out := &in.MetricSelector, &out.MetricSelector
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
out.CurrentValue = in.CurrentValue.DeepCopy()
|
||||
if in.CurrentAverageValue != nil {
|
||||
in, out := &in.CurrentAverageValue, &out.CurrentAverageValue
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
}
|
||||
in.Metric.DeepCopyInto(&out.Metric)
|
||||
in.Current.DeepCopyInto(&out.Current)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -203,12 +161,8 @@ func (in *HorizontalPodAutoscalerSpec) DeepCopyInto(out *HorizontalPodAutoscaler
|
|||
out.ScaleTargetRef = in.ScaleTargetRef
|
||||
if in.MinReplicas != nil {
|
||||
in, out := &in.MinReplicas, &out.MinReplicas
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
if in.Metrics != nil {
|
||||
in, out := &in.Metrics, &out.Metrics
|
||||
|
|
@ -235,20 +189,12 @@ func (in *HorizontalPodAutoscalerStatus) DeepCopyInto(out *HorizontalPodAutoscal
|
|||
*out = *in
|
||||
if in.ObservedGeneration != nil {
|
||||
in, out := &in.ObservedGeneration, &out.ObservedGeneration
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
if in.LastScaleTime != nil {
|
||||
in, out := &in.LastScaleTime, &out.LastScaleTime
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
if in.CurrentMetrics != nil {
|
||||
in, out := &in.CurrentMetrics, &out.CurrentMetrics
|
||||
|
|
@ -277,44 +223,49 @@ func (in *HorizontalPodAutoscalerStatus) DeepCopy() *HorizontalPodAutoscalerStat
|
|||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MetricIdentifier) DeepCopyInto(out *MetricIdentifier) {
|
||||
*out = *in
|
||||
if in.Selector != nil {
|
||||
in, out := &in.Selector, &out.Selector
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricIdentifier.
|
||||
func (in *MetricIdentifier) DeepCopy() *MetricIdentifier {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(MetricIdentifier)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MetricSpec) DeepCopyInto(out *MetricSpec) {
|
||||
*out = *in
|
||||
if in.Object != nil {
|
||||
in, out := &in.Object, &out.Object
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(ObjectMetricSource)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(ObjectMetricSource)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Pods != nil {
|
||||
in, out := &in.Pods, &out.Pods
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(PodsMetricSource)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(PodsMetricSource)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Resource != nil {
|
||||
in, out := &in.Resource, &out.Resource
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(ResourceMetricSource)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(ResourceMetricSource)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.External != nil {
|
||||
in, out := &in.External, &out.External
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(ExternalMetricSource)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(ExternalMetricSource)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -334,39 +285,23 @@ func (in *MetricStatus) DeepCopyInto(out *MetricStatus) {
|
|||
*out = *in
|
||||
if in.Object != nil {
|
||||
in, out := &in.Object, &out.Object
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(ObjectMetricStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(ObjectMetricStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Pods != nil {
|
||||
in, out := &in.Pods, &out.Pods
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(PodsMetricStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(PodsMetricStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Resource != nil {
|
||||
in, out := &in.Resource, &out.Resource
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(ResourceMetricStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(ResourceMetricStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.External != nil {
|
||||
in, out := &in.External, &out.External
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(ExternalMetricStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(ExternalMetricStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -381,11 +316,74 @@ func (in *MetricStatus) DeepCopy() *MetricStatus {
|
|||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MetricTarget) DeepCopyInto(out *MetricTarget) {
|
||||
*out = *in
|
||||
if in.Value != nil {
|
||||
in, out := &in.Value, &out.Value
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.AverageValue != nil {
|
||||
in, out := &in.AverageValue, &out.AverageValue
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.AverageUtilization != nil {
|
||||
in, out := &in.AverageUtilization, &out.AverageUtilization
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricTarget.
|
||||
func (in *MetricTarget) DeepCopy() *MetricTarget {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(MetricTarget)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MetricValueStatus) DeepCopyInto(out *MetricValueStatus) {
|
||||
*out = *in
|
||||
if in.Value != nil {
|
||||
in, out := &in.Value, &out.Value
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.AverageValue != nil {
|
||||
in, out := &in.AverageValue, &out.AverageValue
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.AverageUtilization != nil {
|
||||
in, out := &in.AverageUtilization, &out.AverageUtilization
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricValueStatus.
|
||||
func (in *MetricValueStatus) DeepCopy() *MetricValueStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(MetricValueStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ObjectMetricSource) DeepCopyInto(out *ObjectMetricSource) {
|
||||
*out = *in
|
||||
out.Target = in.Target
|
||||
out.TargetValue = in.TargetValue.DeepCopy()
|
||||
out.DescribedObject = in.DescribedObject
|
||||
in.Target.DeepCopyInto(&out.Target)
|
||||
in.Metric.DeepCopyInto(&out.Metric)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -402,8 +400,9 @@ func (in *ObjectMetricSource) DeepCopy() *ObjectMetricSource {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ObjectMetricStatus) DeepCopyInto(out *ObjectMetricStatus) {
|
||||
*out = *in
|
||||
out.Target = in.Target
|
||||
out.CurrentValue = in.CurrentValue.DeepCopy()
|
||||
in.Metric.DeepCopyInto(&out.Metric)
|
||||
in.Current.DeepCopyInto(&out.Current)
|
||||
out.DescribedObject = in.DescribedObject
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -420,7 +419,8 @@ func (in *ObjectMetricStatus) DeepCopy() *ObjectMetricStatus {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodsMetricSource) DeepCopyInto(out *PodsMetricSource) {
|
||||
*out = *in
|
||||
out.TargetAverageValue = in.TargetAverageValue.DeepCopy()
|
||||
in.Metric.DeepCopyInto(&out.Metric)
|
||||
in.Target.DeepCopyInto(&out.Target)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -437,7 +437,8 @@ func (in *PodsMetricSource) DeepCopy() *PodsMetricSource {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodsMetricStatus) DeepCopyInto(out *PodsMetricStatus) {
|
||||
*out = *in
|
||||
out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
|
||||
in.Metric.DeepCopyInto(&out.Metric)
|
||||
in.Current.DeepCopyInto(&out.Current)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -454,24 +455,7 @@ func (in *PodsMetricStatus) DeepCopy() *PodsMetricStatus {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceMetricSource) DeepCopyInto(out *ResourceMetricSource) {
|
||||
*out = *in
|
||||
if in.TargetAverageUtilization != nil {
|
||||
in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
if in.TargetAverageValue != nil {
|
||||
in, out := &in.TargetAverageValue, &out.TargetAverageValue
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
}
|
||||
in.Target.DeepCopyInto(&out.Target)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -488,16 +472,7 @@ func (in *ResourceMetricSource) DeepCopy() *ResourceMetricSource {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceMetricStatus) DeepCopyInto(out *ResourceMetricStatus) {
|
||||
*out = *in
|
||||
if in.CurrentAverageUtilization != nil {
|
||||
in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
|
||||
in.Current.DeepCopyInto(&out.Current)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
14
vendor/k8s.io/kubernetes/pkg/apis/core/BUILD
generated
vendored
14
vendor/k8s.io/kubernetes/pkg/apis/core/BUILD
generated
vendored
|
|
@ -18,13 +18,13 @@ go_library(
|
|||
importpath = "k8s.io/kubernetes/pkg/apis/core",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
2
vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS
generated
vendored
|
|
@ -41,3 +41,5 @@ reviewers:
|
|||
- piosz
|
||||
- jsafrane
|
||||
- jbeda
|
||||
labels:
|
||||
- sig/apps
|
||||
|
|
|
|||
20
vendor/k8s.io/kubernetes/pkg/apis/core/helper/BUILD
generated
vendored
20
vendor/k8s.io/kubernetes/pkg/apis/core/helper/BUILD
generated
vendored
|
|
@ -12,8 +12,8 @@ go_test(
|
|||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -23,14 +23,14 @@ go_library(
|
|||
importpath = "k8s.io/kubernetes/pkg/apis/core/helper",
|
||||
deps = [
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/fields:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/selection:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/selection:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
2
vendor/k8s.io/kubernetes/pkg/apis/core/helper/helpers.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/apis/core/helper/helpers.go
generated
vendored
|
|
@ -56,7 +56,7 @@ func HugePageResourceName(pageSize resource.Quantity) core.ResourceName {
|
|||
// an error is returned.
|
||||
func HugePageSizeFromResourceName(name core.ResourceName) (resource.Quantity, error) {
|
||||
if !IsHugePageResourceName(name) {
|
||||
return resource.Quantity{}, fmt.Errorf("resource name: %s is not valid hugepage name", name)
|
||||
return resource.Quantity{}, fmt.Errorf("resource name: %s is an invalid hugepage name", name)
|
||||
}
|
||||
pageSize := strings.TrimPrefix(string(name), core.ResourceHugePagesPrefix)
|
||||
return resource.ParseQuantity(pageSize)
|
||||
|
|
|
|||
12
vendor/k8s.io/kubernetes/pkg/apis/core/install/BUILD
generated
vendored
12
vendor/k8s.io/kubernetes/pkg/apis/core/install/BUILD
generated
vendored
|
|
@ -14,8 +14,8 @@ go_library(
|
|||
"//pkg/api/legacyscheme:go_default_library",
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//pkg/apis/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -26,10 +26,10 @@ go_test(
|
|||
deps = [
|
||||
"//pkg/api/legacyscheme:go_default_library",
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
78
vendor/k8s.io/kubernetes/pkg/apis/core/types.go
generated
vendored
78
vendor/k8s.io/kubernetes/pkg/apis/core/types.go
generated
vendored
|
|
@ -35,6 +35,8 @@ const (
|
|||
NamespaceSystem string = "kube-system"
|
||||
// NamespacePublic is the namespace where we place public info (ConfigMaps)
|
||||
NamespacePublic string = "kube-public"
|
||||
// NamespaceNodeLease is the namespace where we place node lease objects (used for node heartbeats)
|
||||
NamespaceNodeLease string = "kube-node-lease"
|
||||
// TerminationMessagePathDefault means the default path to capture the application termination message running in a container
|
||||
TerminationMessagePathDefault string = "/dev/termination-log"
|
||||
)
|
||||
|
|
@ -411,6 +413,16 @@ type PersistentVolumeClaimSpec struct {
|
|||
// This is an alpha feature and may change in the future.
|
||||
// +optional
|
||||
VolumeMode *PersistentVolumeMode
|
||||
// This field requires the VolumeSnapshotDataSource alpha feature gate to be
|
||||
// enabled and currently VolumeSnapshot is the only supported data source.
|
||||
// If the provisioner can support VolumeSnapshot data source, it will create
|
||||
// a new volume and data will be restored to the volume at the same time.
|
||||
// If the provisioner does not support VolumeSnapshot data source, volume will
|
||||
// not be created and the failure will be reported as an event.
|
||||
// In the future, we plan to support more data source types and the behavior
|
||||
// of the provisioner may change.
|
||||
// +optional
|
||||
DataSource *TypedLocalObjectReference
|
||||
}
|
||||
|
||||
type PersistentVolumeClaimConditionType string
|
||||
|
|
@ -562,6 +574,8 @@ const (
|
|||
ProtocolTCP Protocol = "TCP"
|
||||
// ProtocolUDP is the UDP protocol.
|
||||
ProtocolUDP Protocol = "UDP"
|
||||
// ProtocolSCTP is the SCTP protocol.
|
||||
ProtocolSCTP Protocol = "SCTP"
|
||||
)
|
||||
|
||||
// Represents a Persistent Disk resource in Google Compute Engine.
|
||||
|
|
@ -1264,6 +1278,7 @@ type ScaleIOVolumeSource struct {
|
|||
// +optional
|
||||
StoragePool string
|
||||
// Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
|
||||
// Default is ThinProvisioned.
|
||||
// +optional
|
||||
StorageMode string
|
||||
// The name of a volume already created in the ScaleIO system
|
||||
|
|
@ -1271,7 +1286,8 @@ type ScaleIOVolumeSource struct {
|
|||
VolumeName string
|
||||
// Filesystem type to mount.
|
||||
// Must be a filesystem type supported by the host operating system.
|
||||
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
|
||||
// Ex. "ext4", "xfs", "ntfs".
|
||||
// Default is "xfs".
|
||||
// +optional
|
||||
FSType string
|
||||
// Defaults to false (read/write). ReadOnly here will force
|
||||
|
|
@ -1300,6 +1316,7 @@ type ScaleIOPersistentVolumeSource struct {
|
|||
// +optional
|
||||
StoragePool string
|
||||
// Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
|
||||
// Default is ThinProvisioned.
|
||||
// +optional
|
||||
StorageMode string
|
||||
// The name of a volume created in the ScaleIO system
|
||||
|
|
@ -1307,7 +1324,8 @@ type ScaleIOPersistentVolumeSource struct {
|
|||
VolumeName string
|
||||
// Filesystem type to mount.
|
||||
// Must be a filesystem type supported by the host operating system.
|
||||
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
|
||||
// Ex. "ext4", "xfs", "ntfs".
|
||||
// Default is "xfs".
|
||||
// +optional
|
||||
FSType string
|
||||
// Defaults to false (read/write). ReadOnly here will force
|
||||
|
|
@ -1495,10 +1513,14 @@ type KeyToPath struct {
|
|||
type LocalVolumeSource struct {
|
||||
// The full path to the volume on the node.
|
||||
// It can be either a directory or block device (disk, partition, ...).
|
||||
// Directories can be represented only by PersistentVolume with VolumeMode=Filesystem.
|
||||
// Block devices can be represented only by VolumeMode=Block, which also requires the
|
||||
// BlockVolume alpha feature gate to be enabled.
|
||||
Path string
|
||||
|
||||
// Filesystem type to mount.
|
||||
// It applies only when the Path is a block device.
|
||||
// Must be a filesystem type supported by the host operating system.
|
||||
// Ex. "ext4", "xfs", "ntfs". The default value is to auto-select a fileystem if unspecified.
|
||||
// +optional
|
||||
FSType *string
|
||||
}
|
||||
|
||||
// Represents storage that is managed by an external CSI volume driver (Beta feature)
|
||||
|
|
@ -1564,7 +1586,7 @@ type ContainerPort struct {
|
|||
HostPort int32
|
||||
// Required: This must be a valid port number, 0 < x < 65536.
|
||||
ContainerPort int32
|
||||
// Required: Supports "TCP" and "UDP".
|
||||
// Required: Supports "TCP", "UDP" and "SCTP"
|
||||
// +optional
|
||||
Protocol Protocol
|
||||
// Optional: What host IP to bind the external port to.
|
||||
|
|
@ -2567,6 +2589,14 @@ type PodSpec struct {
|
|||
// More info: https://github.com/kubernetes/community/blob/master/keps/sig-network/0007-pod-ready%2B%2B.md
|
||||
// +optional
|
||||
ReadinessGates []PodReadinessGate
|
||||
// RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used
|
||||
// to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run.
|
||||
// If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an
|
||||
// empty definition that uses the default runtime handler.
|
||||
// More info: https://github.com/kubernetes/community/blob/master/keps/sig-node/0014-runtime-class.md
|
||||
// This is an alpha feature and may change in the future.
|
||||
// +optional
|
||||
RuntimeClassName *string
|
||||
}
|
||||
|
||||
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
||||
|
|
@ -2609,7 +2639,7 @@ type PodSecurityContext struct {
|
|||
// in the same pod, and the first process in each container will not be assigned PID 1.
|
||||
// HostPID and ShareProcessNamespace cannot both be set.
|
||||
// Optional: Default to false.
|
||||
// This field is alpha-level and is honored only by servers that enable the PodShareProcessNamespace feature.
|
||||
// This field is beta-level and may be disabled with the PodShareProcessNamespace feature.
|
||||
// +k8s:conversion-gen=false
|
||||
// +optional
|
||||
ShareProcessNamespace *bool
|
||||
|
|
@ -3161,7 +3191,7 @@ type ServicePort struct {
|
|||
// the 'Name' field in EndpointPort objects.
|
||||
Name string
|
||||
|
||||
// The IP protocol for this port. Supports "TCP" and "UDP".
|
||||
// The IP protocol for this port. Supports "TCP", "UDP", and "SCTP".
|
||||
Protocol Protocol
|
||||
|
||||
// The port that will be exposed on the service.
|
||||
|
|
@ -3944,6 +3974,19 @@ type LocalObjectReference struct {
|
|||
Name string
|
||||
}
|
||||
|
||||
// TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.
|
||||
type TypedLocalObjectReference struct {
|
||||
// APIGroup is the group for the resource being referenced.
|
||||
// If APIGroup is not specified, the specified Kind must be in the core API group.
|
||||
// For any other third-party types, APIGroup is required.
|
||||
// +optional
|
||||
APIGroup *string
|
||||
// Kind is the type of resource being referenced
|
||||
Kind string
|
||||
// Name is the name of resource being referenced
|
||||
Name string
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
type SerializedReference struct {
|
||||
|
|
@ -4580,8 +4623,27 @@ type SecurityContext struct {
|
|||
// the no_new_privs flag will be set on the container process.
|
||||
// +optional
|
||||
AllowPrivilegeEscalation *bool
|
||||
// ProcMount denotes the type of proc mount to use for the containers.
|
||||
// The default is DefaultProcMount which uses the container runtime defaults for
|
||||
// readonly paths and masked paths.
|
||||
// +optional
|
||||
ProcMount *ProcMountType
|
||||
}
|
||||
|
||||
type ProcMountType string
|
||||
|
||||
const (
|
||||
// DefaultProcMount uses the container runtime defaults for readonly and masked
|
||||
// paths for /proc. Most container runtimes mask certain paths in /proc to avoid
|
||||
// accidental security exposure of special devices or information.
|
||||
DefaultProcMount ProcMountType = "Default"
|
||||
|
||||
// UnmaskedProcMount bypasses the default masking behavior of the container
|
||||
// runtime and ensures the newly created /proc the container stays intact with
|
||||
// no modifications.
|
||||
UnmaskedProcMount ProcMountType = "Unmasked"
|
||||
)
|
||||
|
||||
// SELinuxOptions are the labels to be applied to the container.
|
||||
type SELinuxOptions struct {
|
||||
// SELinux user label
|
||||
|
|
|
|||
50
vendor/k8s.io/kubernetes/pkg/apis/core/v1/BUILD
generated
vendored
50
vendor/k8s.io/kubernetes/pkg/apis/core/v1/BUILD
generated
vendored
|
|
@ -17,45 +17,45 @@ go_library(
|
|||
"//pkg/apis/extensions:go_default_library",
|
||||
"//pkg/features:go_default_library",
|
||||
"//pkg/util/parsers:go_default_library",
|
||||
"//pkg/util/pointer:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
|
||||
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
||||
"//vendor/k8s.io/utils/pointer:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "go_default_xtest",
|
||||
name = "go_default_test",
|
||||
srcs = [
|
||||
"conversion_test.go",
|
||||
"defaults_test.go",
|
||||
],
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
":go_default_library",
|
||||
"//pkg/api/legacyscheme:go_default_library",
|
||||
"//pkg/api/testapi:go_default_library",
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//pkg/apis/core/fuzzer:go_default_library",
|
||||
"//pkg/apis/extensions:go_default_library",
|
||||
"//pkg/util/pointer:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/api/extensions/v1beta1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/testing/fuzzer:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/fuzzer:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/extensions/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/apitesting/fuzzer:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
||||
"//vendor/k8s.io/utils/pointer:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
153
vendor/k8s.io/kubernetes/pkg/apis/core/v1/conversion.go
generated
vendored
153
vendor/k8s.io/kubernetes/pkg/apis/core/v1/conversion.go
generated
vendored
|
|
@ -30,105 +30,6 @@ import (
|
|||
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||
)
|
||||
|
||||
// This is a "fast-path" that avoids reflection for common types. It focuses on the objects that are
|
||||
// converted the most in the cluster.
|
||||
// TODO: generate one of these for every external API group - this is to prove the impact
|
||||
func addFastPathConversionFuncs(scheme *runtime.Scheme) error {
|
||||
scheme.AddGenericConversionFunc(func(objA, objB interface{}, s conversion.Scope) (bool, error) {
|
||||
switch a := objA.(type) {
|
||||
case *v1.Pod:
|
||||
switch b := objB.(type) {
|
||||
case *core.Pod:
|
||||
return true, Convert_v1_Pod_To_core_Pod(a, b, s)
|
||||
}
|
||||
case *core.Pod:
|
||||
switch b := objB.(type) {
|
||||
case *v1.Pod:
|
||||
return true, Convert_core_Pod_To_v1_Pod(a, b, s)
|
||||
}
|
||||
|
||||
case *v1.Event:
|
||||
switch b := objB.(type) {
|
||||
case *core.Event:
|
||||
return true, Convert_v1_Event_To_core_Event(a, b, s)
|
||||
}
|
||||
case *core.Event:
|
||||
switch b := objB.(type) {
|
||||
case *v1.Event:
|
||||
return true, Convert_core_Event_To_v1_Event(a, b, s)
|
||||
}
|
||||
|
||||
case *v1.ReplicationController:
|
||||
switch b := objB.(type) {
|
||||
case *core.ReplicationController:
|
||||
return true, Convert_v1_ReplicationController_To_core_ReplicationController(a, b, s)
|
||||
}
|
||||
case *core.ReplicationController:
|
||||
switch b := objB.(type) {
|
||||
case *v1.ReplicationController:
|
||||
return true, Convert_core_ReplicationController_To_v1_ReplicationController(a, b, s)
|
||||
}
|
||||
|
||||
case *v1.Node:
|
||||
switch b := objB.(type) {
|
||||
case *core.Node:
|
||||
return true, Convert_v1_Node_To_core_Node(a, b, s)
|
||||
}
|
||||
case *core.Node:
|
||||
switch b := objB.(type) {
|
||||
case *v1.Node:
|
||||
return true, Convert_core_Node_To_v1_Node(a, b, s)
|
||||
}
|
||||
|
||||
case *v1.Namespace:
|
||||
switch b := objB.(type) {
|
||||
case *core.Namespace:
|
||||
return true, Convert_v1_Namespace_To_core_Namespace(a, b, s)
|
||||
}
|
||||
case *core.Namespace:
|
||||
switch b := objB.(type) {
|
||||
case *v1.Namespace:
|
||||
return true, Convert_core_Namespace_To_v1_Namespace(a, b, s)
|
||||
}
|
||||
|
||||
case *v1.Service:
|
||||
switch b := objB.(type) {
|
||||
case *core.Service:
|
||||
return true, Convert_v1_Service_To_core_Service(a, b, s)
|
||||
}
|
||||
case *core.Service:
|
||||
switch b := objB.(type) {
|
||||
case *v1.Service:
|
||||
return true, Convert_core_Service_To_v1_Service(a, b, s)
|
||||
}
|
||||
|
||||
case *v1.Endpoints:
|
||||
switch b := objB.(type) {
|
||||
case *core.Endpoints:
|
||||
return true, Convert_v1_Endpoints_To_core_Endpoints(a, b, s)
|
||||
}
|
||||
case *core.Endpoints:
|
||||
switch b := objB.(type) {
|
||||
case *v1.Endpoints:
|
||||
return true, Convert_core_Endpoints_To_v1_Endpoints(a, b, s)
|
||||
}
|
||||
|
||||
case *metav1.WatchEvent:
|
||||
switch b := objB.(type) {
|
||||
case *metav1.InternalEvent:
|
||||
return true, metav1.Convert_versioned_Event_to_versioned_InternalEvent(a, b, s)
|
||||
}
|
||||
case *metav1.InternalEvent:
|
||||
switch b := objB.(type) {
|
||||
case *metav1.WatchEvent:
|
||||
return true, metav1.Convert_versioned_InternalEvent_to_versioned_Event(a, b, s)
|
||||
}
|
||||
}
|
||||
return false, nil
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
func addConversionFuncs(scheme *runtime.Scheme) error {
|
||||
// Add non-generated conversion functions
|
||||
err := scheme.AddConversionFuncs(
|
||||
|
|
@ -142,19 +43,19 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
|||
Convert_v1_Secret_To_core_Secret,
|
||||
Convert_v1_ServiceSpec_To_core_ServiceSpec,
|
||||
Convert_v1_ResourceList_To_core_ResourceList,
|
||||
Convert_v1_ReplicationController_to_extensions_ReplicaSet,
|
||||
Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec,
|
||||
Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus,
|
||||
Convert_extensions_ReplicaSet_to_v1_ReplicationController,
|
||||
Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec,
|
||||
Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus,
|
||||
Convert_v1_ReplicationController_To_extensions_ReplicaSet,
|
||||
Convert_v1_ReplicationControllerSpec_To_extensions_ReplicaSetSpec,
|
||||
Convert_v1_ReplicationControllerStatus_To_extensions_ReplicaSetStatus,
|
||||
Convert_extensions_ReplicaSet_To_v1_ReplicationController,
|
||||
Convert_extensions_ReplicaSetSpec_To_v1_ReplicationControllerSpec,
|
||||
Convert_extensions_ReplicaSetStatus_To_v1_ReplicationControllerStatus,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Add field conversion funcs.
|
||||
err = scheme.AddFieldLabelConversionFunc("v1", "Pod",
|
||||
err = scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("Pod"),
|
||||
func(label, value string) (string, string, error) {
|
||||
switch label {
|
||||
case "metadata.name",
|
||||
|
|
@ -162,6 +63,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
|||
"spec.nodeName",
|
||||
"spec.restartPolicy",
|
||||
"spec.schedulerName",
|
||||
"spec.serviceAccountName",
|
||||
"status.phase",
|
||||
"status.podIP",
|
||||
"status.nominatedNodeName":
|
||||
|
|
@ -177,7 +79,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = scheme.AddFieldLabelConversionFunc("v1", "Node",
|
||||
err = scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("Node"),
|
||||
func(label, value string) (string, string, error) {
|
||||
switch label {
|
||||
case "metadata.name":
|
||||
|
|
@ -192,7 +94,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = scheme.AddFieldLabelConversionFunc("v1", "ReplicationController",
|
||||
err = scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("ReplicationController"),
|
||||
func(label, value string) (string, string, error) {
|
||||
switch label {
|
||||
case "metadata.name",
|
||||
|
|
@ -218,23 +120,23 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_ReplicationController_to_extensions_ReplicaSet(in *v1.ReplicationController, out *extensions.ReplicaSet, s conversion.Scope) error {
|
||||
func Convert_v1_ReplicationController_To_extensions_ReplicaSet(in *v1.ReplicationController, out *extensions.ReplicaSet, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
if err := Convert_v1_ReplicationControllerSpec_To_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus(&in.Status, &out.Status, s); err != nil {
|
||||
if err := Convert_v1_ReplicationControllerStatus_To_extensions_ReplicaSetStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(in *v1.ReplicationControllerSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error {
|
||||
func Convert_v1_ReplicationControllerSpec_To_extensions_ReplicaSetSpec(in *v1.ReplicationControllerSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error {
|
||||
out.Replicas = *in.Replicas
|
||||
out.MinReadySeconds = in.MinReadySeconds
|
||||
if in.Selector != nil {
|
||||
out.Selector = new(metav1.LabelSelector)
|
||||
metav1.Convert_map_to_unversioned_LabelSelector(&in.Selector, out.Selector, s)
|
||||
metav1.Convert_Map_string_To_string_To_v1_LabelSelector(&in.Selector, out.Selector, s)
|
||||
}
|
||||
if in.Template != nil {
|
||||
if err := Convert_v1_PodTemplateSpec_To_core_PodTemplateSpec(in.Template, &out.Template, s); err != nil {
|
||||
|
|
@ -244,7 +146,7 @@ func Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(in *v1.Re
|
|||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus(in *v1.ReplicationControllerStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error {
|
||||
func Convert_v1_ReplicationControllerStatus_To_extensions_ReplicaSetStatus(in *v1.ReplicationControllerStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error {
|
||||
out.Replicas = in.Replicas
|
||||
out.FullyLabeledReplicas = in.FullyLabeledReplicas
|
||||
out.ReadyReplicas = in.ReadyReplicas
|
||||
|
|
@ -262,9 +164,9 @@ func Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus(in *v
|
|||
return nil
|
||||
}
|
||||
|
||||
func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.ReplicaSet, out *v1.ReplicationController, s conversion.Scope) error {
|
||||
func Convert_extensions_ReplicaSet_To_v1_ReplicationController(in *extensions.ReplicaSet, out *v1.ReplicationController, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
if err := Convert_extensions_ReplicaSetSpec_To_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
fieldErr, ok := err.(*field.Error)
|
||||
if !ok {
|
||||
return err
|
||||
|
|
@ -274,19 +176,19 @@ func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.Re
|
|||
}
|
||||
out.Annotations[v1.NonConvertibleAnnotationPrefix+"/"+fieldErr.Field] = reflect.ValueOf(fieldErr.BadValue).String()
|
||||
}
|
||||
if err := Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil {
|
||||
if err := Convert_extensions_ReplicaSetStatus_To_v1_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(in *extensions.ReplicaSetSpec, out *v1.ReplicationControllerSpec, s conversion.Scope) error {
|
||||
func Convert_extensions_ReplicaSetSpec_To_v1_ReplicationControllerSpec(in *extensions.ReplicaSetSpec, out *v1.ReplicationControllerSpec, s conversion.Scope) error {
|
||||
out.Replicas = new(int32)
|
||||
*out.Replicas = in.Replicas
|
||||
out.MinReadySeconds = in.MinReadySeconds
|
||||
var invalidErr error
|
||||
if in.Selector != nil {
|
||||
invalidErr = metav1.Convert_unversioned_LabelSelector_to_map(in.Selector, &out.Selector, s)
|
||||
invalidErr = metav1.Convert_v1_LabelSelector_To_Map_string_To_string(in.Selector, &out.Selector, s)
|
||||
}
|
||||
out.Template = new(v1.PodTemplateSpec)
|
||||
if err := Convert_core_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, out.Template, s); err != nil {
|
||||
|
|
@ -295,7 +197,7 @@ func Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(in *exten
|
|||
return invalidErr
|
||||
}
|
||||
|
||||
func Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(in *extensions.ReplicaSetStatus, out *v1.ReplicationControllerStatus, s conversion.Scope) error {
|
||||
func Convert_extensions_ReplicaSetStatus_To_v1_ReplicationControllerStatus(in *extensions.ReplicaSetStatus, out *v1.ReplicationControllerStatus, s conversion.Scope) error {
|
||||
out.Replicas = in.Replicas
|
||||
out.FullyLabeledReplicas = in.FullyLabeledReplicas
|
||||
out.ReadyReplicas = in.ReadyReplicas
|
||||
|
|
@ -478,6 +380,11 @@ func Convert_core_SecurityContext_To_v1_SecurityContext(in *core.SecurityContext
|
|||
out.RunAsNonRoot = in.RunAsNonRoot
|
||||
out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
|
||||
out.AllowPrivilegeEscalation = in.AllowPrivilegeEscalation
|
||||
if in.ProcMount != nil {
|
||||
pm := string(*in.ProcMount)
|
||||
pmt := v1.ProcMountType(pm)
|
||||
out.ProcMount = &pmt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -553,7 +460,7 @@ func Convert_v1_ResourceList_To_core_ResourceList(in *v1.ResourceList, out *core
|
|||
}
|
||||
|
||||
func AddFieldLabelConversionsForEvent(scheme *runtime.Scheme) error {
|
||||
return scheme.AddFieldLabelConversionFunc("v1", "Event",
|
||||
return scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("Event"),
|
||||
func(label, value string) (string, string, error) {
|
||||
switch label {
|
||||
case "involvedObject.kind",
|
||||
|
|
@ -576,7 +483,7 @@ func AddFieldLabelConversionsForEvent(scheme *runtime.Scheme) error {
|
|||
}
|
||||
|
||||
func AddFieldLabelConversionsForNamespace(scheme *runtime.Scheme) error {
|
||||
return scheme.AddFieldLabelConversionFunc("v1", "Namespace",
|
||||
return scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("Namespace"),
|
||||
func(label, value string) (string, string, error) {
|
||||
switch label {
|
||||
case "status.phase",
|
||||
|
|
@ -589,7 +496,7 @@ func AddFieldLabelConversionsForNamespace(scheme *runtime.Scheme) error {
|
|||
}
|
||||
|
||||
func AddFieldLabelConversionsForSecret(scheme *runtime.Scheme) error {
|
||||
return scheme.AddFieldLabelConversionFunc("v1", "Secret",
|
||||
return scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("Secret"),
|
||||
func(label, value string) (string, string, error) {
|
||||
switch label {
|
||||
case "type",
|
||||
|
|
|
|||
3
vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go
generated
vendored
3
vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go
generated
vendored
|
|
@ -25,7 +25,7 @@ import (
|
|||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/kubernetes/pkg/features"
|
||||
"k8s.io/kubernetes/pkg/util/parsers"
|
||||
utilpointer "k8s.io/kubernetes/pkg/util/pointer"
|
||||
utilpointer "k8s.io/utils/pointer"
|
||||
)
|
||||
|
||||
func addDefaultingFuncs(scheme *runtime.Scheme) error {
|
||||
|
|
@ -93,6 +93,7 @@ func SetDefaults_Container(obj *v1.Container) {
|
|||
obj.TerminationMessagePolicy = v1.TerminationMessageReadFile
|
||||
}
|
||||
}
|
||||
|
||||
func SetDefaults_Service(obj *v1.Service) {
|
||||
if obj.Spec.SessionAffinity == "" {
|
||||
obj.Spec.SessionAffinity = v1.ServiceAffinityNone
|
||||
|
|
|
|||
24
vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/BUILD
generated
vendored
24
vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/BUILD
generated
vendored
|
|
@ -11,12 +11,12 @@ go_test(
|
|||
srcs = ["helpers_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/fields:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -26,12 +26,12 @@ go_library(
|
|||
importpath = "k8s.io/kubernetes/pkg/apis/core/v1/helper",
|
||||
deps = [
|
||||
"//pkg/apis/core/helper:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/fields:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/selection:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/selection:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
16
vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/helpers.go
generated
vendored
16
vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/helpers.go
generated
vendored
|
|
@ -79,7 +79,7 @@ func HugePageResourceName(pageSize resource.Quantity) v1.ResourceName {
|
|||
// an error is returned.
|
||||
func HugePageSizeFromResourceName(name v1.ResourceName) (resource.Quantity, error) {
|
||||
if !IsHugePageResourceName(name) {
|
||||
return resource.Quantity{}, fmt.Errorf("resource name: %s is not valid hugepage name", name)
|
||||
return resource.Quantity{}, fmt.Errorf("resource name: %s is an invalid hugepage name", name)
|
||||
}
|
||||
pageSize := strings.TrimPrefix(string(name), v1.ResourceHugePagesPrefix)
|
||||
return resource.ParseQuantity(pageSize)
|
||||
|
|
@ -283,6 +283,20 @@ func NodeSelectorRequirementsAsFieldSelector(nsm []v1.NodeSelectorRequirement) (
|
|||
return fields.AndSelectors(selectors...), nil
|
||||
}
|
||||
|
||||
// NodeSelectorRequirementKeysExistInNodeSelectorTerms checks if a NodeSelectorTerm with key is already specified in terms
|
||||
func NodeSelectorRequirementKeysExistInNodeSelectorTerms(reqs []v1.NodeSelectorRequirement, terms []v1.NodeSelectorTerm) bool {
|
||||
for _, req := range reqs {
|
||||
for _, term := range terms {
|
||||
for _, r := range term.MatchExpressions {
|
||||
if r.Key == req.Key {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// MatchNodeSelectorTerms checks whether the node labels and fields match node selector terms in ORed;
|
||||
// nil or empty term matches no objects.
|
||||
func MatchNodeSelectorTerms(
|
||||
|
|
|
|||
2
vendor/k8s.io/kubernetes/pkg/apis/core/v1/register.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/apis/core/v1/register.go
generated
vendored
|
|
@ -30,7 +30,7 @@ func init() {
|
|||
// We only register manually written functions here. The registration of the
|
||||
// generated functions takes place in the generated files. The separation
|
||||
// makes the code compile even when the generated files are missing.
|
||||
localSchemeBuilder.Register(addDefaultingFuncs, addConversionFuncs, addFastPathConversionFuncs)
|
||||
localSchemeBuilder.Register(addDefaultingFuncs, addConversionFuncs)
|
||||
}
|
||||
|
||||
// TODO: remove these global varialbes
|
||||
|
|
|
|||
2505
vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go
generated
vendored
2505
vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go
generated
vendored
File diff suppressed because it is too large
Load diff
45
vendor/k8s.io/kubernetes/pkg/apis/core/validation/BUILD
generated
vendored
45
vendor/k8s.io/kubernetes/pkg/apis/core/validation/BUILD
generated
vendored
|
|
@ -25,20 +25,21 @@ go_library(
|
|||
"//pkg/fieldpath:go_default_library",
|
||||
"//pkg/master/ports:go_default_library",
|
||||
"//pkg/security/apparmor:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/validation:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
|
||||
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/validation:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -55,15 +56,15 @@ go_test(
|
|||
"//pkg/capabilities:go_default_library",
|
||||
"//pkg/features:go_default_library",
|
||||
"//pkg/security/apparmor:go_default_library",
|
||||
"//pkg/util/pointer:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/util/feature/testing:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
|
||||
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
||||
"//staging/src/k8s.io/apiserver/pkg/util/feature/testing:go_default_library",
|
||||
"//vendor/k8s.io/utils/pointer:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
199
vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go
generated
vendored
199
vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go
generated
vendored
|
|
@ -36,6 +36,7 @@ import (
|
|||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
unversionedvalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/util/diff"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
|
|
@ -195,23 +196,23 @@ type ValidateNameFunc apimachineryvalidation.ValidateNameFunc
|
|||
// ValidatePodName can be used to check whether the given pod name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
// trailing dashes are allowed.
|
||||
var ValidatePodName = NameIsDNSSubdomain
|
||||
var ValidatePodName = apimachineryvalidation.NameIsDNSSubdomain
|
||||
|
||||
// ValidateReplicationControllerName can be used to check whether the given replication
|
||||
// controller name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
// trailing dashes are allowed.
|
||||
var ValidateReplicationControllerName = NameIsDNSSubdomain
|
||||
var ValidateReplicationControllerName = apimachineryvalidation.NameIsDNSSubdomain
|
||||
|
||||
// ValidateServiceName can be used to check whether the given service name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
// trailing dashes are allowed.
|
||||
var ValidateServiceName = NameIsDNS1035Label
|
||||
var ValidateServiceName = apimachineryvalidation.NameIsDNS1035Label
|
||||
|
||||
// ValidateNodeName can be used to check whether the given node name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
// trailing dashes are allowed.
|
||||
var ValidateNodeName = NameIsDNSSubdomain
|
||||
var ValidateNodeName = apimachineryvalidation.NameIsDNSSubdomain
|
||||
|
||||
// ValidateNamespaceName can be used to check whether the given namespace name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
|
|
@ -221,18 +222,18 @@ var ValidateNamespaceName = apimachineryvalidation.ValidateNamespaceName
|
|||
// ValidateLimitRangeName can be used to check whether the given limit range name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
// trailing dashes are allowed.
|
||||
var ValidateLimitRangeName = NameIsDNSSubdomain
|
||||
var ValidateLimitRangeName = apimachineryvalidation.NameIsDNSSubdomain
|
||||
|
||||
// ValidateResourceQuotaName can be used to check whether the given
|
||||
// resource quota name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
// trailing dashes are allowed.
|
||||
var ValidateResourceQuotaName = NameIsDNSSubdomain
|
||||
var ValidateResourceQuotaName = apimachineryvalidation.NameIsDNSSubdomain
|
||||
|
||||
// ValidateSecretName can be used to check whether the given secret name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
// trailing dashes are allowed.
|
||||
var ValidateSecretName = NameIsDNSSubdomain
|
||||
var ValidateSecretName = apimachineryvalidation.NameIsDNSSubdomain
|
||||
|
||||
// ValidateServiceAccountName can be used to check whether the given service account name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
|
|
@ -242,7 +243,7 @@ var ValidateServiceAccountName = apimachineryvalidation.ValidateServiceAccountNa
|
|||
// ValidateEndpointsName can be used to check whether the given endpoints name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
// trailing dashes are allowed.
|
||||
var ValidateEndpointsName = NameIsDNSSubdomain
|
||||
var ValidateEndpointsName = apimachineryvalidation.NameIsDNSSubdomain
|
||||
|
||||
// ValidateClusterName can be used to check whether the given cluster name is valid.
|
||||
var ValidateClusterName = apimachineryvalidation.ValidateClusterName
|
||||
|
|
@ -250,21 +251,21 @@ var ValidateClusterName = apimachineryvalidation.ValidateClusterName
|
|||
// ValidateClassName can be used to check whether the given class name is valid.
|
||||
// It is defined here to avoid import cycle between pkg/apis/storage/validation
|
||||
// (where it should be) and this file.
|
||||
var ValidateClassName = NameIsDNSSubdomain
|
||||
var ValidateClassName = apimachineryvalidation.NameIsDNSSubdomain
|
||||
|
||||
// ValidatePiorityClassName can be used to check whether the given priority
|
||||
// class name is valid.
|
||||
var ValidatePriorityClassName = NameIsDNSSubdomain
|
||||
var ValidatePriorityClassName = apimachineryvalidation.NameIsDNSSubdomain
|
||||
|
||||
// TODO update all references to these functions to point to the apimachineryvalidation ones
|
||||
// NameIsDNSSubdomain is a ValidateNameFunc for names that must be a DNS subdomain.
|
||||
func NameIsDNSSubdomain(name string, prefix bool) []string {
|
||||
return apimachineryvalidation.NameIsDNSSubdomain(name, prefix)
|
||||
}
|
||||
|
||||
// NameIsDNS1035Label is a ValidateNameFunc for names that must be a DNS 952 label.
|
||||
func NameIsDNS1035Label(name string, prefix bool) []string {
|
||||
return apimachineryvalidation.NameIsDNS1035Label(name, prefix)
|
||||
// ValidateRuntimeClassName can be used to check whether the given RuntimeClass name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
// trailing dashes are allowed.
|
||||
func ValidateRuntimeClassName(name string, fldPath *field.Path) field.ErrorList {
|
||||
var allErrs field.ErrorList
|
||||
for _, msg := range apimachineryvalidation.NameIsDNSSubdomain(name, false) {
|
||||
allErrs = append(allErrs, field.Invalid(fldPath, name, msg))
|
||||
}
|
||||
return allErrs
|
||||
}
|
||||
|
||||
// Validates that given value is not negative.
|
||||
|
|
@ -1022,7 +1023,7 @@ func validateProjectionSources(projection *core.ProjectedVolumeSource, projectio
|
|||
}
|
||||
}
|
||||
}
|
||||
if projPath := fldPath.Child("serviceAccountToken"); source.ServiceAccountToken != nil {
|
||||
if projPath := srcPath.Child("serviceAccountToken"); source.ServiceAccountToken != nil {
|
||||
numSources++
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(features.TokenRequestProjection) {
|
||||
allErrs = append(allErrs, field.Forbidden(projPath, "TokenRequestProjection feature is not enabled"))
|
||||
|
|
@ -1493,7 +1494,7 @@ func validateCSIPersistentVolumeSource(csi *core.CSIPersistentVolumeSource, fldP
|
|||
|
||||
// ValidatePersistentVolumeName checks that a name is appropriate for a
|
||||
// PersistentVolumeName object.
|
||||
var ValidatePersistentVolumeName = NameIsDNSSubdomain
|
||||
var ValidatePersistentVolumeName = apimachineryvalidation.NameIsDNSSubdomain
|
||||
|
||||
var supportedAccessModes = sets.NewString(string(core.ReadWriteOnce), string(core.ReadOnlyMany), string(core.ReadWriteMany))
|
||||
|
||||
|
|
@ -1501,6 +1502,10 @@ var supportedReclaimPolicy = sets.NewString(string(core.PersistentVolumeReclaimD
|
|||
|
||||
var supportedVolumeModes = sets.NewString(string(core.PersistentVolumeBlock), string(core.PersistentVolumeFilesystem))
|
||||
|
||||
var supportedDataSourceAPIGroupKinds = map[schema.GroupKind]bool{
|
||||
{Group: "snapshot.storage.k8s.io", Kind: "VolumeSnapshot"}: true,
|
||||
}
|
||||
|
||||
func ValidatePersistentVolume(pv *core.PersistentVolume) field.ErrorList {
|
||||
metaPath := field.NewPath("metadata")
|
||||
allErrs := ValidateObjectMeta(&pv.ObjectMeta, false, ValidatePersistentVolumeName, metaPath)
|
||||
|
|
@ -1824,6 +1829,27 @@ func ValidatePersistentVolumeClaimSpec(spec *core.PersistentVolumeClaimSpec, fld
|
|||
} else if spec.VolumeMode != nil && !supportedVolumeModes.Has(string(*spec.VolumeMode)) {
|
||||
allErrs = append(allErrs, field.NotSupported(fldPath.Child("volumeMode"), *spec.VolumeMode, supportedVolumeModes.List()))
|
||||
}
|
||||
|
||||
if spec.DataSource != nil && !utilfeature.DefaultFeatureGate.Enabled(features.VolumeSnapshotDataSource) {
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("dataSource"), "VolumeSnapshotDataSource is disabled by feature-gate"))
|
||||
} else if spec.DataSource != nil {
|
||||
if len(spec.DataSource.Name) == 0 {
|
||||
allErrs = append(allErrs, field.Required(fldPath.Child("dataSource", "name"), ""))
|
||||
}
|
||||
|
||||
groupKind := schema.GroupKind{Group: "", Kind: spec.DataSource.Kind}
|
||||
if spec.DataSource.APIGroup != nil {
|
||||
groupKind.Group = string(*spec.DataSource.APIGroup)
|
||||
}
|
||||
groupKindList := make([]string, 0, len(supportedDataSourceAPIGroupKinds))
|
||||
for grp := range supportedDataSourceAPIGroupKinds {
|
||||
groupKindList = append(groupKindList, grp.String())
|
||||
}
|
||||
if !supportedDataSourceAPIGroupKinds[groupKind] {
|
||||
allErrs = append(allErrs, field.NotSupported(fldPath.Child("dataSource"), groupKind.String(), groupKindList))
|
||||
}
|
||||
}
|
||||
|
||||
return allErrs
|
||||
}
|
||||
|
||||
|
|
@ -1918,7 +1944,7 @@ func ValidatePersistentVolumeClaimStatusUpdate(newPvc, oldPvc *core.PersistentVo
|
|||
return allErrs
|
||||
}
|
||||
|
||||
var supportedPortProtocols = sets.NewString(string(core.ProtocolTCP), string(core.ProtocolUDP))
|
||||
var supportedPortProtocols = sets.NewString(string(core.ProtocolTCP), string(core.ProtocolUDP), string(core.ProtocolSCTP))
|
||||
|
||||
func validateContainerPorts(ports []core.ContainerPort, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
|
|
@ -1951,6 +1977,8 @@ func validateContainerPorts(ports []core.ContainerPort, fldPath *field.Path) fie
|
|||
}
|
||||
if len(port.Protocol) == 0 {
|
||||
allErrs = append(allErrs, field.Required(idxPath.Child("protocol"), ""))
|
||||
} else if !utilfeature.DefaultFeatureGate.Enabled(features.SCTPSupport) && port.Protocol == core.ProtocolSCTP {
|
||||
allErrs = append(allErrs, field.NotSupported(idxPath.Child("protocol"), port.Protocol, []string{string(core.ProtocolTCP), string(core.ProtocolUDP)}))
|
||||
} else if !supportedPortProtocols.Has(string(port.Protocol)) {
|
||||
allErrs = append(allErrs, field.NotSupported(idxPath.Child("protocol"), port.Protocol, supportedPortProtocols.List()))
|
||||
}
|
||||
|
|
@ -2913,6 +2941,20 @@ func ValidatePod(pod *core.Pod) field.ErrorList {
|
|||
// this was done to preserve backwards compatibility
|
||||
specPath := field.NewPath("spec")
|
||||
|
||||
if pod.Spec.ServiceAccountName == "" {
|
||||
for vi, volume := range pod.Spec.Volumes {
|
||||
path := specPath.Child("volumes").Index(vi).Child("projected")
|
||||
if volume.Projected != nil {
|
||||
for si, source := range volume.Projected.Sources {
|
||||
saPath := path.Child("sources").Index(si).Child("serviceAccountToken")
|
||||
if source.ServiceAccountToken != nil {
|
||||
allErrs = append(allErrs, field.Forbidden(saPath, "must not be specified when serviceAccountName is not set"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
allErrs = append(allErrs, validateContainersOnlyForPod(pod.Spec.Containers, specPath.Child("containers"))...)
|
||||
allErrs = append(allErrs, validateContainersOnlyForPod(pod.Spec.InitContainers, specPath.Child("initContainers"))...)
|
||||
|
||||
|
|
@ -2996,6 +3038,10 @@ func ValidatePodSpec(spec *core.PodSpec, fldPath *field.Path) field.ErrorList {
|
|||
}
|
||||
}
|
||||
|
||||
if spec.RuntimeClassName != nil && utilfeature.DefaultFeatureGate.Enabled(features.RuntimeClass) {
|
||||
allErrs = append(allErrs, ValidateRuntimeClassName(*spec.RuntimeClassName, fldPath.Child("runtimeClassName"))...)
|
||||
}
|
||||
|
||||
return allErrs
|
||||
}
|
||||
|
||||
|
|
@ -3087,30 +3133,55 @@ func ValidateNodeSelector(nodeSelector *core.NodeSelector, fldPath *field.Path)
|
|||
return allErrs
|
||||
}
|
||||
|
||||
// validateTopologySelectorLabelRequirement tests that the specified TopologySelectorLabelRequirement fields has valid data
|
||||
func validateTopologySelectorLabelRequirement(rq core.TopologySelectorLabelRequirement, fldPath *field.Path) field.ErrorList {
|
||||
// validateTopologySelectorLabelRequirement tests that the specified TopologySelectorLabelRequirement fields has valid data,
|
||||
// and constructs a set containing all of its Values.
|
||||
func validateTopologySelectorLabelRequirement(rq core.TopologySelectorLabelRequirement, fldPath *field.Path) (sets.String, field.ErrorList) {
|
||||
allErrs := field.ErrorList{}
|
||||
valueSet := make(sets.String)
|
||||
valuesPath := fldPath.Child("values")
|
||||
if len(rq.Values) == 0 {
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("values"), "must specify as least one value"))
|
||||
allErrs = append(allErrs, field.Required(valuesPath, ""))
|
||||
}
|
||||
|
||||
// Validate set property of Values field
|
||||
for i, value := range rq.Values {
|
||||
if valueSet.Has(value) {
|
||||
allErrs = append(allErrs, field.Duplicate(valuesPath.Index(i), value))
|
||||
}
|
||||
valueSet.Insert(value)
|
||||
}
|
||||
|
||||
allErrs = append(allErrs, unversionedvalidation.ValidateLabelName(rq.Key, fldPath.Child("key"))...)
|
||||
|
||||
return allErrs
|
||||
return valueSet, allErrs
|
||||
}
|
||||
|
||||
// ValidateTopologySelectorTerm tests that the specified topology selector term has valid data
|
||||
func ValidateTopologySelectorTerm(term core.TopologySelectorTerm, fldPath *field.Path) field.ErrorList {
|
||||
// ValidateTopologySelectorTerm tests that the specified topology selector term has valid data,
|
||||
// and constructs a map representing the term in raw form.
|
||||
func ValidateTopologySelectorTerm(term core.TopologySelectorTerm, fldPath *field.Path) (map[string]sets.String, field.ErrorList) {
|
||||
allErrs := field.ErrorList{}
|
||||
exprMap := make(map[string]sets.String)
|
||||
exprPath := fldPath.Child("matchLabelExpressions")
|
||||
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.VolumeScheduling) {
|
||||
// Allow empty MatchLabelExpressions, in case this field becomes optional in the future.
|
||||
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicProvisioningScheduling) {
|
||||
for i, req := range term.MatchLabelExpressions {
|
||||
allErrs = append(allErrs, validateTopologySelectorLabelRequirement(req, fldPath.Child("matchLabelExpressions").Index(i))...)
|
||||
idxPath := exprPath.Index(i)
|
||||
valueSet, exprErrs := validateTopologySelectorLabelRequirement(req, idxPath)
|
||||
allErrs = append(allErrs, exprErrs...)
|
||||
|
||||
// Validate no duplicate keys exist.
|
||||
if _, exists := exprMap[req.Key]; exists {
|
||||
allErrs = append(allErrs, field.Duplicate(idxPath.Child("key"), req.Key))
|
||||
}
|
||||
exprMap[req.Key] = valueSet
|
||||
}
|
||||
} else if len(term.MatchLabelExpressions) != 0 {
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath, "field is disabled by feature-gate DynamicProvisioningScheduling"))
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath, "field is disabled by feature-gate VolumeScheduling"))
|
||||
}
|
||||
|
||||
return allErrs
|
||||
return exprMap, allErrs
|
||||
}
|
||||
|
||||
// ValidateAvoidPodsInNodeAnnotations tests that the serialized AvoidPods in Node.Annotations has valid data
|
||||
|
|
@ -3708,8 +3779,10 @@ func ValidateService(service *core.Service) field.ErrorList {
|
|||
includeProtocols := sets.NewString()
|
||||
for i := range service.Spec.Ports {
|
||||
portPath := portsPath.Index(i)
|
||||
if !supportedPortProtocols.Has(string(service.Spec.Ports[i].Protocol)) {
|
||||
allErrs = append(allErrs, field.Invalid(portPath.Child("protocol"), service.Spec.Ports[i].Protocol, "cannot create an external load balancer with non-TCP/UDP ports"))
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(features.SCTPSupport) && service.Spec.Ports[i].Protocol == core.ProtocolSCTP {
|
||||
allErrs = append(allErrs, field.NotSupported(portPath.Child("protocol"), service.Spec.Ports[i].Protocol, []string{string(core.ProtocolTCP), string(core.ProtocolUDP)}))
|
||||
} else if !supportedPortProtocols.Has(string(service.Spec.Ports[i].Protocol)) {
|
||||
allErrs = append(allErrs, field.Invalid(portPath.Child("protocol"), service.Spec.Ports[i].Protocol, "cannot create an external load balancer with non-TCP/UDP/SCTP ports"))
|
||||
} else {
|
||||
includeProtocols.Insert(string(service.Spec.Ports[i].Protocol))
|
||||
}
|
||||
|
|
@ -3807,6 +3880,8 @@ func validateServicePort(sp *core.ServicePort, requireName, isHeadlessService bo
|
|||
|
||||
if len(sp.Protocol) == 0 {
|
||||
allErrs = append(allErrs, field.Required(fldPath.Child("protocol"), ""))
|
||||
} else if !utilfeature.DefaultFeatureGate.Enabled(features.SCTPSupport) && sp.Protocol == core.ProtocolSCTP {
|
||||
allErrs = append(allErrs, field.NotSupported(fldPath.Child("protocol"), sp.Protocol, []string{string(core.ProtocolTCP), string(core.ProtocolUDP)}))
|
||||
} else if !supportedPortProtocols.Has(string(sp.Protocol)) {
|
||||
allErrs = append(allErrs, field.NotSupported(fldPath.Child("protocol"), sp.Protocol, supportedPortProtocols.List()))
|
||||
}
|
||||
|
|
@ -4654,7 +4729,7 @@ func ValidateSecretUpdate(newSecret, oldSecret *core.Secret) field.ErrorList {
|
|||
// ValidateConfigMapName can be used to check whether the given ConfigMap name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
// trailing dashes are allowed.
|
||||
var ValidateConfigMapName = NameIsDNSSubdomain
|
||||
var ValidateConfigMapName = apimachineryvalidation.NameIsDNSSubdomain
|
||||
|
||||
// ValidateConfigMap tests whether required fields in the ConfigMap are set.
|
||||
func ValidateConfigMap(cfg *core.ConfigMap) field.ErrorList {
|
||||
|
|
@ -5049,50 +5124,16 @@ func ValidateNamespaceFinalizeUpdate(newNamespace, oldNamespace *core.Namespace)
|
|||
return allErrs
|
||||
}
|
||||
|
||||
// Construct lookup map of old subset IPs to NodeNames.
|
||||
func updateEpAddrToNodeNameMap(ipToNodeName map[string]string, addresses []core.EndpointAddress) {
|
||||
for n := range addresses {
|
||||
if addresses[n].NodeName == nil {
|
||||
continue
|
||||
}
|
||||
ipToNodeName[addresses[n].IP] = *addresses[n].NodeName
|
||||
}
|
||||
}
|
||||
|
||||
// Build a map across all subsets of IP -> NodeName
|
||||
func buildEndpointAddressNodeNameMap(subsets []core.EndpointSubset) map[string]string {
|
||||
ipToNodeName := make(map[string]string)
|
||||
for i := range subsets {
|
||||
updateEpAddrToNodeNameMap(ipToNodeName, subsets[i].Addresses)
|
||||
updateEpAddrToNodeNameMap(ipToNodeName, subsets[i].NotReadyAddresses)
|
||||
}
|
||||
return ipToNodeName
|
||||
}
|
||||
|
||||
func validateEpAddrNodeNameTransition(addr *core.EndpointAddress, ipToNodeName map[string]string, fldPath *field.Path) field.ErrorList {
|
||||
errList := field.ErrorList{}
|
||||
existingNodeName, found := ipToNodeName[addr.IP]
|
||||
if !found {
|
||||
return errList
|
||||
}
|
||||
if addr.NodeName == nil || *addr.NodeName == existingNodeName {
|
||||
return errList
|
||||
}
|
||||
// NodeName entry found for this endpoint IP, but user is attempting to change NodeName
|
||||
return append(errList, field.Forbidden(fldPath, fmt.Sprintf("Cannot change NodeName for %s to %s", addr.IP, *addr.NodeName)))
|
||||
}
|
||||
|
||||
// ValidateEndpoints tests if required fields are set.
|
||||
func ValidateEndpoints(endpoints *core.Endpoints) field.ErrorList {
|
||||
allErrs := ValidateObjectMeta(&endpoints.ObjectMeta, true, ValidateEndpointsName, field.NewPath("metadata"))
|
||||
allErrs = append(allErrs, ValidateEndpointsSpecificAnnotations(endpoints.Annotations, field.NewPath("annotations"))...)
|
||||
allErrs = append(allErrs, validateEndpointSubsets(endpoints.Subsets, []core.EndpointSubset{}, field.NewPath("subsets"))...)
|
||||
allErrs = append(allErrs, validateEndpointSubsets(endpoints.Subsets, field.NewPath("subsets"))...)
|
||||
return allErrs
|
||||
}
|
||||
|
||||
func validateEndpointSubsets(subsets []core.EndpointSubset, oldSubsets []core.EndpointSubset, fldPath *field.Path) field.ErrorList {
|
||||
func validateEndpointSubsets(subsets []core.EndpointSubset, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
ipToNodeName := buildEndpointAddressNodeNameMap(oldSubsets)
|
||||
for i := range subsets {
|
||||
ss := &subsets[i]
|
||||
idxPath := fldPath.Index(i)
|
||||
|
|
@ -5103,10 +5144,10 @@ func validateEndpointSubsets(subsets []core.EndpointSubset, oldSubsets []core.En
|
|||
allErrs = append(allErrs, field.Required(idxPath, "must specify `addresses` or `notReadyAddresses`"))
|
||||
}
|
||||
for addr := range ss.Addresses {
|
||||
allErrs = append(allErrs, validateEndpointAddress(&ss.Addresses[addr], idxPath.Child("addresses").Index(addr), ipToNodeName)...)
|
||||
allErrs = append(allErrs, validateEndpointAddress(&ss.Addresses[addr], idxPath.Child("addresses").Index(addr))...)
|
||||
}
|
||||
for addr := range ss.NotReadyAddresses {
|
||||
allErrs = append(allErrs, validateEndpointAddress(&ss.NotReadyAddresses[addr], idxPath.Child("notReadyAddresses").Index(addr), ipToNodeName)...)
|
||||
allErrs = append(allErrs, validateEndpointAddress(&ss.NotReadyAddresses[addr], idxPath.Child("notReadyAddresses").Index(addr))...)
|
||||
}
|
||||
for port := range ss.Ports {
|
||||
allErrs = append(allErrs, validateEndpointPort(&ss.Ports[port], len(ss.Ports) > 1, idxPath.Child("ports").Index(port))...)
|
||||
|
|
@ -5116,7 +5157,7 @@ func validateEndpointSubsets(subsets []core.EndpointSubset, oldSubsets []core.En
|
|||
return allErrs
|
||||
}
|
||||
|
||||
func validateEndpointAddress(address *core.EndpointAddress, fldPath *field.Path, ipToNodeName map[string]string) field.ErrorList {
|
||||
func validateEndpointAddress(address *core.EndpointAddress, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
for _, msg := range validation.IsValidIP(address.IP) {
|
||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("ip"), address.IP, msg))
|
||||
|
|
@ -5130,10 +5171,6 @@ func validateEndpointAddress(address *core.EndpointAddress, fldPath *field.Path,
|
|||
allErrs = append(allErrs, field.Invalid(fldPath.Child("nodeName"), *address.NodeName, msg))
|
||||
}
|
||||
}
|
||||
allErrs = append(allErrs, validateEpAddrNodeNameTransition(address, ipToNodeName, fldPath.Child("nodeName"))...)
|
||||
if len(allErrs) > 0 {
|
||||
return allErrs
|
||||
}
|
||||
allErrs = append(allErrs, validateNonSpecialIP(address.IP, fldPath.Child("ip"))...)
|
||||
return allErrs
|
||||
}
|
||||
|
|
@ -5176,6 +5213,8 @@ func validateEndpointPort(port *core.EndpointPort, requireName bool, fldPath *fi
|
|||
}
|
||||
if len(port.Protocol) == 0 {
|
||||
allErrs = append(allErrs, field.Required(fldPath.Child("protocol"), ""))
|
||||
} else if !utilfeature.DefaultFeatureGate.Enabled(features.SCTPSupport) && port.Protocol == core.ProtocolSCTP {
|
||||
allErrs = append(allErrs, field.NotSupported(fldPath.Child("protocol"), port.Protocol, []string{string(core.ProtocolTCP), string(core.ProtocolUDP)}))
|
||||
} else if !supportedPortProtocols.Has(string(port.Protocol)) {
|
||||
allErrs = append(allErrs, field.NotSupported(fldPath.Child("protocol"), port.Protocol, supportedPortProtocols.List()))
|
||||
}
|
||||
|
|
@ -5183,9 +5222,11 @@ func validateEndpointPort(port *core.EndpointPort, requireName bool, fldPath *fi
|
|||
}
|
||||
|
||||
// ValidateEndpointsUpdate tests to make sure an endpoints update can be applied.
|
||||
// NodeName changes are allowed during update to accommodate the case where nodeIP or PodCIDR is reused.
|
||||
// An existing endpoint ip will have a different nodeName if this happens.
|
||||
func ValidateEndpointsUpdate(newEndpoints, oldEndpoints *core.Endpoints) field.ErrorList {
|
||||
allErrs := ValidateObjectMetaUpdate(&newEndpoints.ObjectMeta, &oldEndpoints.ObjectMeta, field.NewPath("metadata"))
|
||||
allErrs = append(allErrs, validateEndpointSubsets(newEndpoints.Subsets, oldEndpoints.Subsets, field.NewPath("subsets"))...)
|
||||
allErrs = append(allErrs, validateEndpointSubsets(newEndpoints.Subsets, field.NewPath("subsets"))...)
|
||||
allErrs = append(allErrs, ValidateEndpointsSpecificAnnotations(newEndpoints.Annotations, field.NewPath("annotations"))...)
|
||||
return allErrs
|
||||
}
|
||||
|
|
|
|||
1453
vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go
generated
vendored
1453
vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go
generated
vendored
File diff suppressed because it is too large
Load diff
10
vendor/k8s.io/kubernetes/pkg/apis/extensions/BUILD
generated
vendored
10
vendor/k8s.io/kubernetes/pkg/apis/extensions/BUILD
generated
vendored
|
|
@ -19,11 +19,11 @@ go_library(
|
|||
"//pkg/apis/core:go_default_library",
|
||||
"//pkg/apis/networking:go_default_library",
|
||||
"//pkg/apis/policy:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
2
vendor/k8s.io/kubernetes/pkg/apis/extensions/OWNERS
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/apis/extensions/OWNERS
generated
vendored
|
|
@ -36,3 +36,5 @@ reviewers:
|
|||
- mqliang
|
||||
- lukaszo
|
||||
- jianhuiz
|
||||
labels:
|
||||
- sig/apps
|
||||
|
|
|
|||
4
vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go
generated
vendored
4
vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go
generated
vendored
|
|
@ -127,8 +127,8 @@ type DeploymentSpec struct {
|
|||
// is considered to be failed. The deployment controller will continue to
|
||||
// process failed deployments and a condition with a ProgressDeadlineExceeded
|
||||
// reason will be surfaced in the deployment status. Note that progress will
|
||||
// not be estimated during the time a deployment is paused. This is not set
|
||||
// by default.
|
||||
// not be estimated during the time a deployment is paused. This is set to
|
||||
// the max value of int32 (i.e. 2147483647) by default, which means "no deadline".
|
||||
// +optional
|
||||
ProgressDeadlineSeconds *int32
|
||||
}
|
||||
|
|
|
|||
104
vendor/k8s.io/kubernetes/pkg/apis/extensions/zz_generated.deepcopy.go
generated
vendored
104
vendor/k8s.io/kubernetes/pkg/apis/extensions/zz_generated.deepcopy.go
generated
vendored
|
|
@ -188,23 +188,15 @@ func (in *DaemonSetSpec) DeepCopyInto(out *DaemonSetSpec) {
|
|||
*out = *in
|
||||
if in.Selector != nil {
|
||||
in, out := &in.Selector, &out.Selector
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
in.Template.DeepCopyInto(&out.Template)
|
||||
in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy)
|
||||
if in.RevisionHistoryLimit != nil {
|
||||
in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -224,12 +216,8 @@ func (in *DaemonSetStatus) DeepCopyInto(out *DaemonSetStatus) {
|
|||
*out = *in
|
||||
if in.CollisionCount != nil {
|
||||
in, out := &in.CollisionCount, &out.CollisionCount
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
if in.Conditions != nil {
|
||||
in, out := &in.Conditions, &out.Conditions
|
||||
|
|
@ -256,12 +244,8 @@ func (in *DaemonSetUpdateStrategy) DeepCopyInto(out *DaemonSetUpdateStrategy) {
|
|||
*out = *in
|
||||
if in.RollingUpdate != nil {
|
||||
in, out := &in.RollingUpdate, &out.RollingUpdate
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(RollingUpdateDaemonSet)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(RollingUpdateDaemonSet)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -393,41 +377,25 @@ func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) {
|
|||
*out = *in
|
||||
if in.Selector != nil {
|
||||
in, out := &in.Selector, &out.Selector
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
in.Template.DeepCopyInto(&out.Template)
|
||||
in.Strategy.DeepCopyInto(&out.Strategy)
|
||||
if in.RevisionHistoryLimit != nil {
|
||||
in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
if in.RollbackTo != nil {
|
||||
in, out := &in.RollbackTo, &out.RollbackTo
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(RollbackConfig)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(RollbackConfig)
|
||||
**out = **in
|
||||
}
|
||||
if in.ProgressDeadlineSeconds != nil {
|
||||
in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -454,12 +422,8 @@ func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) {
|
|||
}
|
||||
if in.CollisionCount != nil {
|
||||
in, out := &in.CollisionCount, &out.CollisionCount
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -479,12 +443,8 @@ func (in *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy) {
|
|||
*out = *in
|
||||
if in.RollingUpdate != nil {
|
||||
in, out := &in.RollingUpdate, &out.RollingUpdate
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(RollingUpdateDeployment)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(RollingUpdateDeployment)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -637,12 +597,8 @@ func (in *IngressRuleValue) DeepCopyInto(out *IngressRuleValue) {
|
|||
*out = *in
|
||||
if in.HTTP != nil {
|
||||
in, out := &in.HTTP, &out.HTTP
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(HTTPIngressRuleValue)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(HTTPIngressRuleValue)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -662,12 +618,8 @@ func (in *IngressSpec) DeepCopyInto(out *IngressSpec) {
|
|||
*out = *in
|
||||
if in.Backend != nil {
|
||||
in, out := &in.Backend, &out.Backend
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(IngressBackend)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(IngressBackend)
|
||||
**out = **in
|
||||
}
|
||||
if in.TLS != nil {
|
||||
in, out := &in.TLS, &out.TLS
|
||||
|
|
@ -817,12 +769,8 @@ func (in *ReplicaSetSpec) DeepCopyInto(out *ReplicaSetSpec) {
|
|||
*out = *in
|
||||
if in.Selector != nil {
|
||||
in, out := &in.Selector, &out.Selector
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
in.Template.DeepCopyInto(&out.Template)
|
||||
return
|
||||
|
|
|
|||
8
vendor/k8s.io/kubernetes/pkg/apis/networking/BUILD
generated
vendored
8
vendor/k8s.io/kubernetes/pkg/apis/networking/BUILD
generated
vendored
|
|
@ -16,10 +16,10 @@ go_library(
|
|||
importpath = "k8s.io/kubernetes/pkg/apis/networking",
|
||||
deps = [
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
2
vendor/k8s.io/kubernetes/pkg/apis/networking/types.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/apis/networking/types.go
generated
vendored
|
|
@ -134,7 +134,7 @@ type NetworkPolicyEgressRule struct {
|
|||
|
||||
// NetworkPolicyPort describes a port to allow traffic on
|
||||
type NetworkPolicyPort struct {
|
||||
// The protocol (TCP or UDP) which traffic must match. If not specified, this
|
||||
// The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this
|
||||
// field defaults to TCP.
|
||||
// +optional
|
||||
Protocol *api.Protocol
|
||||
|
|
|
|||
40
vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go
generated
vendored
40
vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go
generated
vendored
|
|
@ -173,30 +173,18 @@ 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)
|
||||
}
|
||||
*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)
|
||||
}
|
||||
*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)
|
||||
}
|
||||
*out = new(IPBlock)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -216,21 +204,13 @@ 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
|
||||
}
|
||||
*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
|
||||
}
|
||||
*out = new(intstr.IntOrString)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
8
vendor/k8s.io/kubernetes/pkg/apis/policy/BUILD
generated
vendored
8
vendor/k8s.io/kubernetes/pkg/apis/policy/BUILD
generated
vendored
|
|
@ -16,10 +16,10 @@ go_library(
|
|||
importpath = "k8s.io/kubernetes/pkg/apis/policy",
|
||||
deps = [
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
5
vendor/k8s.io/kubernetes/pkg/apis/policy/types.go
generated
vendored
5
vendor/k8s.io/kubernetes/pkg/apis/policy/types.go
generated
vendored
|
|
@ -63,6 +63,7 @@ type PodDisruptionBudgetStatus struct {
|
|||
// the list automatically by PodDisruptionBudget controller after some time.
|
||||
// If everything goes smooth this map should be empty for the most of the time.
|
||||
// Large number of entries in the map may indicate problems with pod deletions.
|
||||
// +optional
|
||||
DisruptedPods map[string]metav1.Time
|
||||
|
||||
// Number of pod disruptions that are currently allowed.
|
||||
|
|
@ -227,6 +228,10 @@ type PodSecurityPolicySpec struct {
|
|||
// e.g. "foo.*" forbids "foo.bar", "foo.baz", etc.
|
||||
// +optional
|
||||
ForbiddenSysctls []string
|
||||
// AllowedProcMountTypes is a whitelist of allowed ProcMountTypes.
|
||||
// Empty or nil indicates that only the DefaultProcMountType may be used.
|
||||
// +optional
|
||||
AllowedProcMountTypes []api.ProcMountType
|
||||
}
|
||||
|
||||
// AllowedHostPath defines the host volume conditions that will be enabled by a policy
|
||||
|
|
|
|||
53
vendor/k8s.io/kubernetes/pkg/apis/policy/zz_generated.deepcopy.go
generated
vendored
53
vendor/k8s.io/kubernetes/pkg/apis/policy/zz_generated.deepcopy.go
generated
vendored
|
|
@ -66,12 +66,8 @@ func (in *Eviction) DeepCopyInto(out *Eviction) {
|
|||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
if in.DeleteOptions != nil {
|
||||
in, out := &in.DeleteOptions, &out.DeleteOptions
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(v1.DeleteOptions)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(v1.DeleteOptions)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -213,30 +209,18 @@ func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec) {
|
|||
*out = *in
|
||||
if in.MinAvailable != nil {
|
||||
in, out := &in.MinAvailable, &out.MinAvailable
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(intstr.IntOrString)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(intstr.IntOrString)
|
||||
**out = **in
|
||||
}
|
||||
if in.Selector != nil {
|
||||
in, out := &in.Selector, &out.Selector
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.MaxUnavailable != nil {
|
||||
in, out := &in.MaxUnavailable, &out.MaxUnavailable
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(intstr.IntOrString)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(intstr.IntOrString)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -368,12 +352,8 @@ func (in *PodSecurityPolicySpec) DeepCopyInto(out *PodSecurityPolicySpec) {
|
|||
in.FSGroup.DeepCopyInto(&out.FSGroup)
|
||||
if in.DefaultAllowPrivilegeEscalation != nil {
|
||||
in, out := &in.DefaultAllowPrivilegeEscalation, &out.DefaultAllowPrivilegeEscalation
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.AllowedHostPaths != nil {
|
||||
in, out := &in.AllowedHostPaths, &out.AllowedHostPaths
|
||||
|
|
@ -395,6 +375,11 @@ func (in *PodSecurityPolicySpec) DeepCopyInto(out *PodSecurityPolicySpec) {
|
|||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.AllowedProcMountTypes != nil {
|
||||
in, out := &in.AllowedProcMountTypes, &out.AllowedProcMountTypes
|
||||
*out = make([]core.ProcMountType, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -434,12 +419,8 @@ func (in *SELinuxStrategyOptions) DeepCopyInto(out *SELinuxStrategyOptions) {
|
|||
*out = *in
|
||||
if in.SELinuxOptions != nil {
|
||||
in, out := &in.SELinuxOptions, &out.SELinuxOptions
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(core.SELinuxOptions)
|
||||
**out = **in
|
||||
}
|
||||
*out = new(core.SELinuxOptions)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
8
vendor/k8s.io/kubernetes/pkg/apis/scheduling/BUILD
generated
vendored
8
vendor/k8s.io/kubernetes/pkg/apis/scheduling/BUILD
generated
vendored
|
|
@ -17,9 +17,9 @@ go_library(
|
|||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/apis/scheduling",
|
||||
deps = [
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -47,5 +47,5 @@ go_test(
|
|||
name = "go_default_test",
|
||||
srcs = ["helpers_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
deps = ["//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library"],
|
||||
deps = ["//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library"],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue