vendor: remove dep and use vndr
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
16f44674a4
commit
148e72d81e
16131 changed files with 73815 additions and 4235138 deletions
28
vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults.go
generated
vendored
28
vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults.go
generated
vendored
|
@ -19,8 +19,8 @@ package v1beta1
|
|||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/util/intstr"
|
||||
)
|
||||
|
||||
func addDefaultingFuncs(scheme *runtime.Scheme) error {
|
||||
|
@ -28,7 +28,6 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error {
|
|||
return scheme.AddDefaultingFuncs(
|
||||
SetDefaults_DaemonSet,
|
||||
SetDefaults_Deployment,
|
||||
SetDefaults_HorizontalPodAutoscaler,
|
||||
SetDefaults_ReplicaSet,
|
||||
SetDefaults_NetworkPolicy,
|
||||
)
|
||||
|
@ -48,6 +47,21 @@ func SetDefaults_DaemonSet(obj *DaemonSet) {
|
|||
obj.Labels = labels
|
||||
}
|
||||
}
|
||||
updateStrategy := &obj.Spec.UpdateStrategy
|
||||
if updateStrategy.Type == "" {
|
||||
updateStrategy.Type = OnDeleteDaemonSetStrategyType
|
||||
}
|
||||
if updateStrategy.Type == RollingUpdateDaemonSetStrategyType {
|
||||
if updateStrategy.RollingUpdate == nil {
|
||||
rollingUpdate := RollingUpdateDaemonSet{}
|
||||
updateStrategy.RollingUpdate = &rollingUpdate
|
||||
}
|
||||
if updateStrategy.RollingUpdate.MaxUnavailable == nil {
|
||||
// Set default MaxUnavailable as 1 by default.
|
||||
maxUnavailable := intstr.FromInt(1)
|
||||
updateStrategy.RollingUpdate.MaxUnavailable = &maxUnavailable
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func SetDefaults_Deployment(obj *Deployment) {
|
||||
|
@ -90,16 +104,6 @@ func SetDefaults_Deployment(obj *Deployment) {
|
|||
}
|
||||
}
|
||||
|
||||
func SetDefaults_HorizontalPodAutoscaler(obj *HorizontalPodAutoscaler) {
|
||||
if obj.Spec.MinReplicas == nil {
|
||||
minReplicas := int32(1)
|
||||
obj.Spec.MinReplicas = &minReplicas
|
||||
}
|
||||
if obj.Spec.CPUUtilization == nil {
|
||||
obj.Spec.CPUUtilization = &CPUTargetUtilization{TargetPercentage: 80}
|
||||
}
|
||||
}
|
||||
|
||||
func SetDefaults_ReplicaSet(obj *ReplicaSet) {
|
||||
labels := obj.Spec.Template.Labels
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue