ResourceQuota should have labels in v1beta1 and v1beta2

This commit is contained in:
derekwaynecarr 2015-03-13 14:45:48 -04:00
parent f6441a6d2f
commit df5744ad8f
4 changed files with 14 additions and 1 deletions

View File

@ -848,6 +848,9 @@ func init() {
if err := s.Convert(&in.Status, &out.Status, 0); err != nil {
return err
}
if err := s.Convert(&in.Labels, &out.Labels, 0); err != nil {
return err
}
return nil
},
func(in *ResourceQuota, out *newer.ResourceQuota, s conversion.Scope) error {
@ -863,6 +866,9 @@ func init() {
if err := s.Convert(&in.Status, &out.Status, 0); err != nil {
return err
}
if err := s.Convert(&in.Labels, &out.ObjectMeta.Labels, 0); err != nil {
return err
}
return nil
},

View File

@ -1147,6 +1147,7 @@ type ResourceQuotaStatus struct {
// ResourceQuota sets aggregate quota restrictions enforced per namespace
type ResourceQuota struct {
TypeMeta `json:",inline"`
Labels map[string]string `json:"labels,omitempty" description:"map of string keys and values that can be used to organize and categorize resource quotas"`
// Spec defines the desired quota
Spec ResourceQuotaSpec `json:"spec,omitempty" description:"spec defines the desired quota"`

View File

@ -768,6 +768,9 @@ func init() {
if err := s.Convert(&in.Status, &out.Status, 0); err != nil {
return err
}
if err := s.Convert(&in.Labels, &out.Labels, 0); err != nil {
return err
}
return nil
},
func(in *ResourceQuota, out *newer.ResourceQuota, s conversion.Scope) error {
@ -783,6 +786,9 @@ func init() {
if err := s.Convert(&in.Status, &out.Status, 0); err != nil {
return err
}
if err := s.Convert(&in.Labels, &out.ObjectMeta.Labels, 0); err != nil {
return err
}
return nil
},

View File

@ -1209,7 +1209,7 @@ type ResourceQuotaStatus struct {
// ResourceQuota sets aggregate quota restrictions enforced per namespace
type ResourceQuota struct {
TypeMeta `json:",inline"`
Labels map[string]string `json:"labels,omitempty" description:"map of string keys and values that can be used to organize and categorize resource quotas"`
// Spec defines the desired quota
Spec ResourceQuotaSpec `json:"spec,omitempty" description:"spec defines the desired quota"`