manually fix master, revert to when client-go depends on apimachinery 7080e31e90e981181435294bca96c80a37db8941

This commit is contained in:
Chao Xu 2017-02-11 19:16:07 -08:00
parent decc012434
commit 17c583b142
4 changed files with 7 additions and 28 deletions

10
Godeps/Godeps.json generated
View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/client-go", "ImportPath": "k8s.io/client-go",
"GoVersion": "go1.7", "GoVersion": "go1.7",
"GodepVersion": "v74", "GodepVersion": "v75",
"Packages": [ "Packages": [
"./..." "./..."
], ],
@ -66,12 +66,12 @@
}, },
{ {
"ImportPath": "github.com/docker/distribution/digest", "ImportPath": "github.com/docker/distribution/digest",
"Comment": "v2.4.0-rc.1-38-gcd27f17", "Comment": "v2.4.0-rc.1-38-gcd27f179",
"Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51" "Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51"
}, },
{ {
"ImportPath": "github.com/docker/distribution/reference", "ImportPath": "github.com/docker/distribution/reference",
"Comment": "v2.4.0-rc.1-38-gcd27f17", "Comment": "v2.4.0-rc.1-38-gcd27f179",
"Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51" "Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51"
}, },
{ {
@ -111,12 +111,12 @@
}, },
{ {
"ImportPath": "github.com/gogo/protobuf/proto", "ImportPath": "github.com/gogo/protobuf/proto",
"Comment": "v0.2-33-ge18d7aa", "Comment": "v0.2-33-ge18d7aa8",
"Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173"
}, },
{ {
"ImportPath": "github.com/gogo/protobuf/sortkeys", "ImportPath": "github.com/gogo/protobuf/sortkeys",
"Comment": "v0.2-33-ge18d7aa", "Comment": "v0.2-33-ge18d7aa8",
"Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173"
}, },
{ {

View File

@ -26,7 +26,6 @@ import (
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
"k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )
// IsOpaqueIntResourceName returns true if the resource name has the opaque // IsOpaqueIntResourceName returns true if the resource name has the opaque
@ -83,7 +82,7 @@ func IsServiceIPRequested(service *Service) bool {
var standardFinalizers = sets.NewString( var standardFinalizers = sets.NewString(
string(FinalizerKubernetes), string(FinalizerKubernetes),
metav1.FinalizerOrphan, FinalizerOrphan,
) )
func IsStandardFinalizerName(str string) bool { func IsStandardFinalizerName(str string) bool {

View File

@ -3223,6 +3223,7 @@ type FinalizerName string
// These are internal finalizer values to Kubernetes, must be qualified name unless defined here // These are internal finalizer values to Kubernetes, must be qualified name unless defined here
const ( const (
FinalizerKubernetes FinalizerName = "kubernetes" FinalizerKubernetes FinalizerName = "kubernetes"
FinalizerOrphan string = "orphan"
) )
// NamespaceSpec describes the attributes on a Namespace. // NamespaceSpec describes the attributes on a Namespace.

View File

@ -86,27 +86,6 @@ func WriteKey(keyPath string, data []byte) error {
return nil return nil
} }
// LoadOrGenerateKeyFile looks for a key in the file at the given path. If it
// can't find one, it will generate a new key and store it there.
func LoadOrGenerateKeyFile(keyPath string) (data []byte, wasGenerated bool, err error) {
loadedData, err := ioutil.ReadFile(keyPath)
if err == nil {
return loadedData, false, err
}
if !os.IsNotExist(err) {
return nil, false, fmt.Errorf("error loading key from %s: %v", keyPath, err)
}
generatedData, err := MakeEllipticPrivateKeyPEM()
if err != nil {
return nil, false, fmt.Errorf("error generating key: %v", err)
}
if err := WriteKey(keyPath, generatedData); err != nil {
return nil, false, fmt.Errorf("error writing key to %s: %v", keyPath, err)
}
return generatedData, true, nil
}
// NewPool returns an x509.CertPool containing the certificates in the given PEM-encoded file. // NewPool returns an x509.CertPool containing the certificates in the given PEM-encoded file.
// Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates // Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates
func NewPool(filename string) (*x509.CertPool, error) { func NewPool(filename string) (*x509.CertPool, error) {