Update ingress godeps
This commit is contained in:
parent
d43021b3f1
commit
28db8fb16d
1068 changed files with 461467 additions and 117300 deletions
31
vendor/k8s.io/kubernetes/pkg/registry/thirdpartyresourcedata/strategy.go
generated
vendored
31
vendor/k8s.io/kubernetes/pkg/registry/thirdpartyresourcedata/strategy.go
generated
vendored
|
|
@ -48,7 +48,7 @@ func (strategy) NamespaceScoped() bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func (strategy) PrepareForCreate(obj runtime.Object) {
|
||||
func (strategy) PrepareForCreate(ctx api.Context, obj runtime.Object) {
|
||||
}
|
||||
|
||||
func (strategy) Validate(ctx api.Context, obj runtime.Object) field.ErrorList {
|
||||
|
|
@ -63,7 +63,7 @@ func (strategy) AllowCreateOnUpdate() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (strategy) PrepareForUpdate(obj, old runtime.Object) {
|
||||
func (strategy) PrepareForUpdate(ctx api.Context, obj, old runtime.Object) {
|
||||
}
|
||||
|
||||
func (strategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList {
|
||||
|
|
@ -75,18 +75,21 @@ func (strategy) AllowUnconditionalUpdate() bool {
|
|||
}
|
||||
|
||||
// Matcher returns a generic matcher for a given label and field selector.
|
||||
func Matcher(label labels.Selector, field fields.Selector) generic.Matcher {
|
||||
return generic.MatcherFunc(func(obj runtime.Object) (bool, error) {
|
||||
sa, ok := obj.(*extensions.ThirdPartyResourceData)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("not a ThirdPartyResourceData")
|
||||
}
|
||||
fields := SelectableFields(sa)
|
||||
return label.Matches(labels.Set(sa.Labels)) && field.Matches(fields), nil
|
||||
})
|
||||
func Matcher(label labels.Selector, field fields.Selector) *generic.SelectionPredicate {
|
||||
return &generic.SelectionPredicate{
|
||||
Label: label,
|
||||
Field: field,
|
||||
GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) {
|
||||
tprd, ok := obj.(*extensions.ThirdPartyResourceData)
|
||||
if !ok {
|
||||
return nil, nil, fmt.Errorf("not a ThirdPartyResourceData")
|
||||
}
|
||||
return labels.Set(tprd.Labels), SelectableFields(tprd), nil
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// SelectableFields returns a label set that can be used for filter selection
|
||||
func SelectableFields(obj *extensions.ThirdPartyResourceData) labels.Set {
|
||||
return labels.Set{}
|
||||
// SelectableFields returns a field set that can be used for filter selection
|
||||
func SelectableFields(obj *extensions.ThirdPartyResourceData) fields.Set {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue