Create meta/internalversion for ListOptions
Move over only the conversions that are needed, create a new scheme that is private to meta and only accessible via ParameterCodec. Move half of pkg/util/labels/.readonly to pkg/apis/meta/v1/labels.go
This commit is contained in:
@@ -21,8 +21,6 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/selection"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
@@ -91,14 +89,6 @@ func IsStandardFinalizerName(str string) bool {
|
||||
return standardFinalizers.Has(str)
|
||||
}
|
||||
|
||||
// SingleObject returns a ListOptions for watching a single object.
|
||||
func SingleObject(meta metav1.ObjectMeta) ListOptions {
|
||||
return ListOptions{
|
||||
FieldSelector: fields.OneTermEqualSelector("metadata.name", meta.Name).String(),
|
||||
ResourceVersion: meta.ResourceVersion,
|
||||
}
|
||||
}
|
||||
|
||||
// AddToNodeAddresses appends the NodeAddresses to the passed-by-pointer slice,
|
||||
// only if they do not already exist
|
||||
func AddToNodeAddresses(addresses *[]NodeAddress, addAddresses ...NodeAddress) {
|
||||
|
Reference in New Issue
Block a user