From 17c583b14204b54f8924a6b78339d74a8e902c0f Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Sat, 11 Feb 2017 19:16:07 -0800 Subject: [PATCH] manually fix master, revert to when client-go depends on apimachinery 7080e31e90e981181435294bca96c80a37db8941 --- Godeps/Godeps.json | 10 +++++----- pkg/api/v1/helpers.go | 3 +-- pkg/api/v1/types.go | 1 + util/cert/io.go | 21 --------------------- 4 files changed, 7 insertions(+), 28 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index d975747d..d7cec9a7 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/client-go", "GoVersion": "go1.7", - "GodepVersion": "v74", + "GodepVersion": "v75", "Packages": [ "./..." ], @@ -66,12 +66,12 @@ }, { "ImportPath": "github.com/docker/distribution/digest", - "Comment": "v2.4.0-rc.1-38-gcd27f17", + "Comment": "v2.4.0-rc.1-38-gcd27f179", "Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51" }, { "ImportPath": "github.com/docker/distribution/reference", - "Comment": "v2.4.0-rc.1-38-gcd27f17", + "Comment": "v2.4.0-rc.1-38-gcd27f179", "Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51" }, { @@ -111,12 +111,12 @@ }, { "ImportPath": "github.com/gogo/protobuf/proto", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/sortkeys", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { diff --git a/pkg/api/v1/helpers.go b/pkg/api/v1/helpers.go index 57468707..f0ebe997 100644 --- a/pkg/api/v1/helpers.go +++ b/pkg/api/v1/helpers.go @@ -26,7 +26,6 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/pkg/api" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // IsOpaqueIntResourceName returns true if the resource name has the opaque @@ -83,7 +82,7 @@ func IsServiceIPRequested(service *Service) bool { var standardFinalizers = sets.NewString( string(FinalizerKubernetes), - metav1.FinalizerOrphan, + FinalizerOrphan, ) func IsStandardFinalizerName(str string) bool { diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index 393e95a5..be90da72 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -3223,6 +3223,7 @@ type FinalizerName string // These are internal finalizer values to Kubernetes, must be qualified name unless defined here const ( FinalizerKubernetes FinalizerName = "kubernetes" + FinalizerOrphan string = "orphan" ) // NamespaceSpec describes the attributes on a Namespace. diff --git a/util/cert/io.go b/util/cert/io.go index b6b69038..c2bde8ef 100644 --- a/util/cert/io.go +++ b/util/cert/io.go @@ -86,27 +86,6 @@ func WriteKey(keyPath string, data []byte) error { 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. // 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) {