vendor updates

This commit is contained in:
Serguei Bezverkhi
2018-03-06 17:33:18 -05:00
parent 4b3ebc171b
commit e9033989a0
5854 changed files with 248382 additions and 119809 deletions

View File

@ -50,13 +50,13 @@ filegroup(
go_test(
name = "go_default_xtest",
srcs = ["defaults_test.go"],
importpath = "k8s.io/kubernetes/pkg/apis/apps/v1beta1_test",
deps = [
":go_default_library",
"//pkg/api/legacyscheme:go_default_library",
"//pkg/apis/apps/install:go_default_library",
"//pkg/apis/core:go_default_library",
"//pkg/apis/core/install:go_default_library",
"//pkg/util/pointer:go_default_library",
"//vendor/k8s.io/api/apps/v1beta1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",

View File

@ -31,6 +31,7 @@ import (
. "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
api "k8s.io/kubernetes/pkg/apis/core"
_ "k8s.io/kubernetes/pkg/apis/core/install"
utilpointer "k8s.io/kubernetes/pkg/util/pointer"
)
func TestSetDefaultDeployment(t *testing.T) {
@ -54,7 +55,7 @@ func TestSetDefaultDeployment(t *testing.T) {
original: &appsv1beta1.Deployment{},
expected: &appsv1beta1.Deployment{
Spec: appsv1beta1.DeploymentSpec{
Replicas: newInt32(1),
Replicas: utilpointer.Int32Ptr(1),
Strategy: appsv1beta1.DeploymentStrategy{
Type: appsv1beta1.RollingUpdateDeploymentStrategyType,
RollingUpdate: &appsv1beta1.RollingUpdateDeployment{
@ -62,8 +63,8 @@ func TestSetDefaultDeployment(t *testing.T) {
MaxUnavailable: &defaultIntOrString,
},
},
RevisionHistoryLimit: newInt32(2),
ProgressDeadlineSeconds: newInt32(600),
RevisionHistoryLimit: utilpointer.Int32Ptr(2),
ProgressDeadlineSeconds: utilpointer.Int32Ptr(600),
Template: defaultTemplate,
},
},
@ -71,7 +72,7 @@ func TestSetDefaultDeployment(t *testing.T) {
{
original: &appsv1beta1.Deployment{
Spec: appsv1beta1.DeploymentSpec{
Replicas: newInt32(5),
Replicas: utilpointer.Int32Ptr(5),
Strategy: appsv1beta1.DeploymentStrategy{
RollingUpdate: &appsv1beta1.RollingUpdateDeployment{
MaxSurge: &differentIntOrString,
@ -81,7 +82,7 @@ func TestSetDefaultDeployment(t *testing.T) {
},
expected: &appsv1beta1.Deployment{
Spec: appsv1beta1.DeploymentSpec{
Replicas: newInt32(5),
Replicas: utilpointer.Int32Ptr(5),
Strategy: appsv1beta1.DeploymentStrategy{
Type: appsv1beta1.RollingUpdateDeploymentStrategyType,
RollingUpdate: &appsv1beta1.RollingUpdateDeployment{
@ -89,8 +90,8 @@ func TestSetDefaultDeployment(t *testing.T) {
MaxUnavailable: &defaultIntOrString,
},
},
RevisionHistoryLimit: newInt32(2),
ProgressDeadlineSeconds: newInt32(600),
RevisionHistoryLimit: utilpointer.Int32Ptr(2),
ProgressDeadlineSeconds: utilpointer.Int32Ptr(600),
Template: defaultTemplate,
},
},
@ -98,7 +99,7 @@ func TestSetDefaultDeployment(t *testing.T) {
{
original: &appsv1beta1.Deployment{
Spec: appsv1beta1.DeploymentSpec{
Replicas: newInt32(3),
Replicas: utilpointer.Int32Ptr(3),
Strategy: appsv1beta1.DeploymentStrategy{
Type: appsv1beta1.RollingUpdateDeploymentStrategyType,
RollingUpdate: nil,
@ -107,7 +108,7 @@ func TestSetDefaultDeployment(t *testing.T) {
},
expected: &appsv1beta1.Deployment{
Spec: appsv1beta1.DeploymentSpec{
Replicas: newInt32(3),
Replicas: utilpointer.Int32Ptr(3),
Strategy: appsv1beta1.DeploymentStrategy{
Type: appsv1beta1.RollingUpdateDeploymentStrategyType,
RollingUpdate: &appsv1beta1.RollingUpdateDeployment{
@ -115,8 +116,8 @@ func TestSetDefaultDeployment(t *testing.T) {
MaxUnavailable: &defaultIntOrString,
},
},
RevisionHistoryLimit: newInt32(2),
ProgressDeadlineSeconds: newInt32(600),
RevisionHistoryLimit: utilpointer.Int32Ptr(2),
ProgressDeadlineSeconds: utilpointer.Int32Ptr(600),
Template: defaultTemplate,
},
},
@ -124,21 +125,21 @@ func TestSetDefaultDeployment(t *testing.T) {
{
original: &appsv1beta1.Deployment{
Spec: appsv1beta1.DeploymentSpec{
Replicas: newInt32(5),
Replicas: utilpointer.Int32Ptr(5),
Strategy: appsv1beta1.DeploymentStrategy{
Type: appsv1beta1.RecreateDeploymentStrategyType,
},
RevisionHistoryLimit: newInt32(0),
RevisionHistoryLimit: utilpointer.Int32Ptr(0),
},
},
expected: &appsv1beta1.Deployment{
Spec: appsv1beta1.DeploymentSpec{
Replicas: newInt32(5),
Replicas: utilpointer.Int32Ptr(5),
Strategy: appsv1beta1.DeploymentStrategy{
Type: appsv1beta1.RecreateDeploymentStrategyType,
},
RevisionHistoryLimit: newInt32(0),
ProgressDeadlineSeconds: newInt32(600),
RevisionHistoryLimit: utilpointer.Int32Ptr(0),
ProgressDeadlineSeconds: utilpointer.Int32Ptr(600),
Template: defaultTemplate,
},
},
@ -146,22 +147,22 @@ func TestSetDefaultDeployment(t *testing.T) {
{
original: &appsv1beta1.Deployment{
Spec: appsv1beta1.DeploymentSpec{
Replicas: newInt32(5),
Replicas: utilpointer.Int32Ptr(5),
Strategy: appsv1beta1.DeploymentStrategy{
Type: appsv1beta1.RecreateDeploymentStrategyType,
},
ProgressDeadlineSeconds: newInt32(30),
RevisionHistoryLimit: newInt32(2),
ProgressDeadlineSeconds: utilpointer.Int32Ptr(30),
RevisionHistoryLimit: utilpointer.Int32Ptr(2),
},
},
expected: &appsv1beta1.Deployment{
Spec: appsv1beta1.DeploymentSpec{
Replicas: newInt32(5),
Replicas: utilpointer.Int32Ptr(5),
Strategy: appsv1beta1.DeploymentStrategy{
Type: appsv1beta1.RecreateDeploymentStrategyType,
},
ProgressDeadlineSeconds: newInt32(30),
RevisionHistoryLimit: newInt32(2),
ProgressDeadlineSeconds: utilpointer.Int32Ptr(30),
RevisionHistoryLimit: utilpointer.Int32Ptr(2),
Template: defaultTemplate,
},
},
@ -215,9 +216,3 @@ func roundTrip(t *testing.T, obj runtime.Object) runtime.Object {
}
return obj3
}
func newInt32(val int32) *int32 {
p := new(int32)
*p = val
return p
}

View File

@ -16,11 +16,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was autogenerated by conversion-gen. Do not edit it manually!
// Code generated by conversion-gen. DO NOT EDIT.
package v1beta1
import (
unsafe "unsafe"
v1beta1 "k8s.io/api/apps/v1beta1"
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -31,7 +33,6 @@ import (
core "k8s.io/kubernetes/pkg/apis/core"
core_v1 "k8s.io/kubernetes/pkg/apis/core/v1"
extensions "k8s.io/kubernetes/pkg/apis/extensions"
unsafe "unsafe"
)
func init() {

View File

@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was autogenerated by defaulter-gen. Do not edit it manually!
// Code generated by defaulter-gen. DO NOT EDIT.
package v1beta1