rename legacy to core

This commit is contained in:
Chao Xu
2016-02-03 13:21:05 -08:00
parent ad9fa30e7e
commit 1b047f8e67
114 changed files with 491 additions and 491 deletions

View File

@@ -66,7 +66,7 @@ func (p *provision) Admit(a admission.Attributes) (err error) {
if exists {
return nil
}
_, err = p.client.Legacy().Namespaces().Create(namespace)
_, err = p.client.Core().Namespaces().Create(namespace)
if err != nil && !errors.IsAlreadyExists(err) {
return admission.NewForbidden(a, err)
}
@@ -79,10 +79,10 @@ func NewProvision(c clientset.Interface) admission.Interface {
reflector := cache.NewReflector(
&cache.ListWatch{
ListFunc: func(options api.ListOptions) (runtime.Object, error) {
return c.Legacy().Namespaces().List(options)
return c.Core().Namespaces().List(options)
},
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return c.Legacy().Namespaces().Watch(options)
return c.Core().Namespaces().Watch(options)
},
},
&api.Namespace{},

View File

@@ -69,7 +69,7 @@ func (e *exists) Admit(a admission.Attributes) (err error) {
}
// in case of latency in our caches, make a call direct to storage to verify that it truly exists or not
_, err = e.client.Legacy().Namespaces().Get(a.GetNamespace())
_, err = e.client.Core().Namespaces().Get(a.GetNamespace())
if err != nil {
if errors.IsNotFound(err) {
return err
@@ -86,10 +86,10 @@ func NewExists(c clientset.Interface) admission.Interface {
reflector := cache.NewReflector(
&cache.ListWatch{
ListFunc: func(options api.ListOptions) (runtime.Object, error) {
return c.Legacy().Namespaces().List(options)
return c.Core().Namespaces().List(options)
},
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return c.Legacy().Namespaces().Watch(options)
return c.Core().Namespaces().Watch(options)
},
},
&api.Namespace{},

View File

@@ -73,7 +73,7 @@ func (l *lifecycle) Admit(a admission.Attributes) (err error) {
// refuse to operate on non-existent namespaces
if !exists {
// in case of latency in our caches, make a call direct to storage to verify that it truly exists or not
namespaceObj, err = l.client.Legacy().Namespaces().Get(a.GetNamespace())
namespaceObj, err = l.client.Core().Namespaces().Get(a.GetNamespace())
if err != nil {
if errors.IsNotFound(err) {
return err
@@ -102,10 +102,10 @@ func NewLifecycle(c clientset.Interface) admission.Interface {
reflector := cache.NewReflector(
&cache.ListWatch{
ListFunc: func(options api.ListOptions) (runtime.Object, error) {
return c.Legacy().Namespaces().List(options)
return c.Core().Namespaces().List(options)
},
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return c.Legacy().Namespaces().Watch(options)
return c.Core().Namespaces().Watch(options)
},
},
&api.Namespace{},