Grow signature for predicate attributes to include init status

This commit is contained in:
Clayton Coleman
2017-05-26 18:43:42 -04:00
parent 331eea67d8
commit 2568a92119
85 changed files with 221 additions and 268 deletions

View File

@@ -102,12 +102,12 @@ func (persistentvolumeStatusStrategy) ValidateUpdate(ctx genericapirequest.Conte
}
// GetAttrs returns labels and fields of a given object for filtering purposes.
func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) {
func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) {
persistentvolumeObj, ok := obj.(*api.PersistentVolume)
if !ok {
return nil, nil, fmt.Errorf("not a persistentvolume")
return nil, nil, false, fmt.Errorf("not a persistentvolume")
}
return labels.Set(persistentvolumeObj.Labels), PersistentVolumeToSelectableFields(persistentvolumeObj), nil
return labels.Set(persistentvolumeObj.Labels), PersistentVolumeToSelectableFields(persistentvolumeObj), persistentvolumeObj.Initializers != nil, nil
}
// MatchPersistentVolume returns a generic matcher for a given label and field selector.