Vendor: Update k8s version

Signed-off-by: Michał Żyłowski <michal.zylowski@intel.com>
This commit is contained in:
Michał Żyłowski 2017-02-03 14:41:32 +01:00
parent dfa93414c5
commit 52baf68d50
3756 changed files with 113013 additions and 92675 deletions

View file

@ -29,6 +29,7 @@ go_library(
"//pkg/util/workqueue:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/apimachinery/pkg/api/meta",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/util/runtime",
@ -55,6 +56,7 @@ go_test(
"//pkg/quota/generic:go_default_library",
"//pkg/quota/install:go_default_library",
"//pkg/util/intstr:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/util/sets",

View file

@ -22,6 +22,7 @@ import (
"github.com/golang/glog"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
@ -148,11 +149,11 @@ func (r *replenishmentControllerFactory) NewController(options *ReplenishmentCon
// TODO move to informer when defined
_, result = cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
return r.kubeClient.Core().Services(v1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return r.kubeClient.Core().Services(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
return r.kubeClient.Core().Services(v1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return r.kubeClient.Core().Services(metav1.NamespaceAll).Watch(options)
},
},
&v1.Service{},
@ -166,11 +167,11 @@ func (r *replenishmentControllerFactory) NewController(options *ReplenishmentCon
// TODO move to informer when defined
_, result = cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
return r.kubeClient.Core().ReplicationControllers(v1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return r.kubeClient.Core().ReplicationControllers(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
return r.kubeClient.Core().ReplicationControllers(v1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return r.kubeClient.Core().ReplicationControllers(metav1.NamespaceAll).Watch(options)
},
},
&v1.ReplicationController{},
@ -189,11 +190,11 @@ func (r *replenishmentControllerFactory) NewController(options *ReplenishmentCon
// TODO (derekwaynecarr) remove me when we can require a sharedInformerFactory in all code paths...
_, result = cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
return r.kubeClient.Core().PersistentVolumeClaims(v1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return r.kubeClient.Core().PersistentVolumeClaims(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
return r.kubeClient.Core().PersistentVolumeClaims(v1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return r.kubeClient.Core().PersistentVolumeClaims(metav1.NamespaceAll).Watch(options)
},
},
&v1.PersistentVolumeClaim{},
@ -206,11 +207,11 @@ func (r *replenishmentControllerFactory) NewController(options *ReplenishmentCon
// TODO move to informer when defined
_, result = cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
return r.kubeClient.Core().Secrets(v1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return r.kubeClient.Core().Secrets(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
return r.kubeClient.Core().Secrets(v1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return r.kubeClient.Core().Secrets(metav1.NamespaceAll).Watch(options)
},
},
&v1.Secret{},
@ -223,11 +224,11 @@ func (r *replenishmentControllerFactory) NewController(options *ReplenishmentCon
// TODO move to informer when defined
_, result = cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
return r.kubeClient.Core().ConfigMaps(v1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return r.kubeClient.Core().ConfigMaps(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
return r.kubeClient.Core().ConfigMaps(v1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return r.kubeClient.Core().ConfigMaps(metav1.NamespaceAll).Watch(options)
},
},
&v1.ConfigMap{},

View file

@ -19,6 +19,7 @@ package resourcequota
import (
"testing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/kubernetes/pkg/api"
@ -47,11 +48,11 @@ func TestPodReplenishmentUpdateFunc(t *testing.T) {
ResyncPeriod: controller.NoResyncPeriodFunc,
}
oldPod := &v1.Pod{
ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "pod"},
ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "pod"},
Status: v1.PodStatus{Phase: v1.PodRunning},
}
newPod := &v1.Pod{
ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "pod"},
ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "pod"},
Status: v1.PodStatus{Phase: v1.PodFailed},
}
updateFunc := PodReplenishmentUpdateFunc(&options)
@ -72,7 +73,7 @@ func TestObjectReplenishmentDeleteFunc(t *testing.T) {
ResyncPeriod: controller.NoResyncPeriodFunc,
}
oldPod := &v1.Pod{
ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "pod"},
ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "pod"},
Status: v1.PodStatus{Phase: v1.PodRunning},
}
deleteFunc := ObjectReplenishmentDeleteFunc(&options)
@ -93,7 +94,7 @@ func TestServiceReplenishmentUpdateFunc(t *testing.T) {
ResyncPeriod: controller.NoResyncPeriodFunc,
}
oldService := &v1.Service{
ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "mysvc"},
ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "mysvc"},
Spec: v1.ServiceSpec{
Type: v1.ServiceTypeNodePort,
Ports: []v1.ServicePort{{
@ -103,7 +104,7 @@ func TestServiceReplenishmentUpdateFunc(t *testing.T) {
},
}
newService := &v1.Service{
ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "mysvc"},
ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "mysvc"},
Spec: v1.ServiceSpec{
Type: v1.ServiceTypeClusterIP,
Ports: []v1.ServicePort{{
@ -127,7 +128,7 @@ func TestServiceReplenishmentUpdateFunc(t *testing.T) {
ResyncPeriod: controller.NoResyncPeriodFunc,
}
oldService = &v1.Service{
ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "mysvc"},
ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "mysvc"},
Spec: v1.ServiceSpec{
Type: v1.ServiceTypeNodePort,
Ports: []v1.ServicePort{{
@ -137,7 +138,7 @@ func TestServiceReplenishmentUpdateFunc(t *testing.T) {
},
}
newService = &v1.Service{
ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "mysvc"},
ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "mysvc"},
Spec: v1.ServiceSpec{
Type: v1.ServiceTypeNodePort,
Ports: []v1.ServicePort{{

View file

@ -21,6 +21,7 @@ import (
"github.com/golang/glog"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
@ -94,11 +95,11 @@ func NewResourceQuotaController(options *ResourceQuotaControllerOptions) *Resour
// build the controller that observes quota
rq.rqIndexer, rq.rqController = cache.NewIndexerInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
return rq.kubeClient.Core().ResourceQuotas(v1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return rq.kubeClient.Core().ResourceQuotas(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
return rq.kubeClient.Core().ResourceQuotas(v1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return rq.kubeClient.Core().ResourceQuotas(metav1.NamespaceAll).Watch(options)
},
},
&v1.ResourceQuota{},
@ -300,7 +301,7 @@ func (rq *ResourceQuotaController) syncResourceQuota(v1ResourceQuota v1.Resource
// Create a usage object that is based on the quota resource version that will handle updates
// by default, we preserve the past usage observation, and set hard to the current spec
usage := api.ResourceQuota{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: resourceQuota.Name,
Namespace: resourceQuota.Namespace,
ResourceVersion: resourceQuota.ResourceVersion,

View file

@ -20,6 +20,7 @@ import (
"strings"
"testing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/kubernetes/pkg/api"
@ -54,7 +55,7 @@ func TestSyncResourceQuota(t *testing.T) {
podList := v1.PodList{
Items: []v1.Pod{
{
ObjectMeta: v1.ObjectMeta{Name: "pod-running", Namespace: "testing"},
ObjectMeta: metav1.ObjectMeta{Name: "pod-running", Namespace: "testing"},
Status: v1.PodStatus{Phase: v1.PodRunning},
Spec: v1.PodSpec{
Volumes: []v1.Volume{{Name: "vol"}},
@ -62,7 +63,7 @@ func TestSyncResourceQuota(t *testing.T) {
},
},
{
ObjectMeta: v1.ObjectMeta{Name: "pod-running-2", Namespace: "testing"},
ObjectMeta: metav1.ObjectMeta{Name: "pod-running-2", Namespace: "testing"},
Status: v1.PodStatus{Phase: v1.PodRunning},
Spec: v1.PodSpec{
Volumes: []v1.Volume{{Name: "vol"}},
@ -70,7 +71,7 @@ func TestSyncResourceQuota(t *testing.T) {
},
},
{
ObjectMeta: v1.ObjectMeta{Name: "pod-failed", Namespace: "testing"},
ObjectMeta: metav1.ObjectMeta{Name: "pod-failed", Namespace: "testing"},
Status: v1.PodStatus{Phase: v1.PodFailed},
Spec: v1.PodSpec{
Volumes: []v1.Volume{{Name: "vol"}},
@ -80,7 +81,7 @@ func TestSyncResourceQuota(t *testing.T) {
},
}
resourceQuota := v1.ResourceQuota{
ObjectMeta: v1.ObjectMeta{Name: "quota", Namespace: "testing"},
ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "testing"},
Spec: v1.ResourceQuotaSpec{
Hard: v1.ResourceList{
v1.ResourceCPU: resource.MustParse("3"),
@ -159,7 +160,7 @@ func TestSyncResourceQuota(t *testing.T) {
func TestSyncResourceQuotaSpecChange(t *testing.T) {
resourceQuota := v1.ResourceQuota{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "rq",
},
@ -245,7 +246,7 @@ func TestSyncResourceQuotaSpecChange(t *testing.T) {
}
func TestSyncResourceQuotaSpecHardChange(t *testing.T) {
resourceQuota := v1.ResourceQuota{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "rq",
},
@ -346,7 +347,7 @@ func TestSyncResourceQuotaSpecHardChange(t *testing.T) {
func TestSyncResourceQuotaNoChange(t *testing.T) {
resourceQuota := v1.ResourceQuota{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "rq",
},
@ -424,7 +425,7 @@ func TestAddQuota(t *testing.T) {
name: "no status",
expectedPriority: true,
quota: &v1.ResourceQuota{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "rq",
},
@ -439,7 +440,7 @@ func TestAddQuota(t *testing.T) {
name: "status, no usage",
expectedPriority: true,
quota: &v1.ResourceQuota{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "rq",
},
@ -459,7 +460,7 @@ func TestAddQuota(t *testing.T) {
name: "status, mismatch",
expectedPriority: true,
quota: &v1.ResourceQuota{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "rq",
},
@ -482,7 +483,7 @@ func TestAddQuota(t *testing.T) {
name: "status, missing usage, but don't care",
expectedPriority: false,
quota: &v1.ResourceQuota{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "rq",
},
@ -502,7 +503,7 @@ func TestAddQuota(t *testing.T) {
name: "ready",
expectedPriority: false,
quota: &v1.ResourceQuota{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "rq",
},