From eb317a25622527922095175dd27700cb55f9a914 Mon Sep 17 00:00:00 2001 From: Trey Ridley Date: Wed, 29 Jul 2020 01:03:30 -0400 Subject: [PATCH 1/8] initial jwt sign --- ...rify_detached.go => detached_signature.go} | 21 ++++++ ...hed_test.go => detached_signature_test.go} | 0 pkg/attestlib/jwt.go | 64 +++++++++++++++++++ pkg/attestlib/pkix.go | 43 +++---------- pkg/attestlib/signer.go | 24 ------- .../protoc-gen-go/generator/generator.go | 2 +- .../gregjones/httpcache/httpcache.go | 8 +-- .../golang-lru/simplelru/lru_interface.go | 45 +++++++------ vendor/github.com/modern-go/concurrent/log.go | 6 +- .../concurrent/unbounded_executor.go | 2 +- .../github.com/modern-go/reflect2/reflect2.go | 6 +- .../x/sys/windows/security_windows.go | 2 +- .../app_identity/app_identity_service.pb.go | 10 +-- .../internal/datastore/datastore_v3.pb.go | 28 +++++--- .../appengine/internal/log/log_service.pb.go | 4 +- .../v1beta1/grafeas/grafeas.pb.go | 6 +- .../v1beta1/vulnerability/vulnerability.pb.go | 6 +- vendor/google.golang.org/grpc/server.go | 10 +-- vendor/gopkg.in/yaml.v2/readerc.go | 2 +- vendor/gopkg.in/yaml.v2/resolve.go | 2 +- vendor/gopkg.in/yaml.v2/sorter.go | 2 +- vendor/k8s.io/api/apps/v1/generated.pb.go | 16 +++-- .../apps/v1/types_swagger_doc_generated.go | 2 +- .../k8s.io/api/apps/v1beta2/generated.pb.go | 16 +++-- .../v1beta2/types_swagger_doc_generated.go | 2 +- .../api/authorization/v1/generated.pb.go | 8 ++- .../api/authorization/v1beta1/generated.pb.go | 8 ++- .../k8s.io/api/autoscaling/v1/generated.pb.go | 8 ++- .../v1/types_swagger_doc_generated.go | 8 +-- .../api/autoscaling/v2beta1/generated.pb.go | 16 +++-- .../v2beta1/types_swagger_doc_generated.go | 10 +-- vendor/k8s.io/api/core/v1/generated.pb.go | 56 ++++++++++------ .../core/v1/types_swagger_doc_generated.go | 38 +++++------ .../api/extensions/v1beta1/generated.pb.go | 24 ++++--- .../v1beta1/types_swagger_doc_generated.go | 2 +- .../k8s.io/api/networking/v1/generated.pb.go | 8 ++- .../k8s.io/api/policy/v1beta1/generated.pb.go | 24 ++++--- .../rbac/v1/types_swagger_doc_generated.go | 2 +- .../v1alpha1/types_swagger_doc_generated.go | 2 +- .../v1beta1/types_swagger_doc_generated.go | 2 +- .../v1alpha1/types_swagger_doc_generated.go | 2 +- .../v1beta1/types_swagger_doc_generated.go | 2 +- .../k8s.io/apimachinery/pkg/api/meta/meta.go | 12 ++-- .../apimachinery/pkg/apis/meta/v1/meta.go | 4 +- .../client-go/tools/cache/shared_informer.go | 2 +- vendor/k8s.io/client-go/util/cert/cert.go | 4 +- .../client-gen/generators/client_generator.go | 24 +++---- .../generators/generator_for_type.go | 4 +- .../cmd/informer-gen/generators/generic.go | 8 ++- .../cmd/informer-gen/generators/packages.go | 6 +- .../generators/versioninterface.go | 2 +- vendor/k8s.io/gengo/namer/plural_namer.go | 2 +- vendor/k8s.io/gengo/types/types.go | 4 +- 53 files changed, 361 insertions(+), 260 deletions(-) rename pkg/attestlib/{verify_detached.go => detached_signature.go} (83%) rename pkg/attestlib/{verify_detached_test.go => detached_signature_test.go} (100%) diff --git a/pkg/attestlib/verify_detached.go b/pkg/attestlib/detached_signature.go similarity index 83% rename from pkg/attestlib/verify_detached.go rename to pkg/attestlib/detached_signature.go index bff785eb2..0995856aa 100644 --- a/pkg/attestlib/verify_detached.go +++ b/pkg/attestlib/detached_signature.go @@ -25,6 +25,7 @@ import ( "crypto/x509" "encoding/asn1" "encoding/pem" + "fmt" "github.com/pkg/errors" "math/big" ) @@ -46,6 +47,26 @@ func hashPayload(payload []byte, signingAlg SignatureAlgorithm) (crypto.Hash, [] } } +func createDetachedSignature(privateKey interface{}, payload []byte, alg SignatureAlgorithm) ([]byte, error) { + switch alg { + case RsaSignPkcs12048Sha256, RsaSignPkcs13072Sha256, RsaSignPkcs14096Sha256, RsaSignPkcs14096Sha512, RsaPss2048Sha256, RsaPss3072Sha256, RsaPss4096Sha256, RsaPss4096Sha512: + rsaKey, ok := privateKey.(*rsa.PrivateKey) + if !ok { + return nil, errors.New("expected rsa key") + } + return rsaSign(rsaKey, payload, alg) + case EcdsaP256Sha256, EcdsaP384Sha384, EcdsaP521Sha512: + ecKey, ok := privateKey.(*ecdsa.PrivateKey) + if !ok { + return nil, errors.New("expected ecdsa key") + } + return ecSign(ecKey, payload, alg) + default: + return nil, fmt.Errorf("unknown signature algorithm: %v", alg) + + } +} + // This function will be used to verify PKIX and JWT signatures. PGP detached signatures are not supported by this function. // Signature is the raw byte signature. // PublicKey is the PEM encoded public key that will be used to verify the signature. diff --git a/pkg/attestlib/verify_detached_test.go b/pkg/attestlib/detached_signature_test.go similarity index 100% rename from pkg/attestlib/verify_detached_test.go rename to pkg/attestlib/detached_signature_test.go diff --git a/pkg/attestlib/jwt.go b/pkg/attestlib/jwt.go index 9ba5a1d19..4a7d1145e 100644 --- a/pkg/attestlib/jwt.go +++ b/pkg/attestlib/jwt.go @@ -45,6 +45,70 @@ func getAlgName(alg SignatureAlgorithm) string { } } +type jwtSigner struct { + privateKey interface{} + publicKeyID string + signatureAlgorithm SignatureAlgorithm +} + +// NewJwtSigner creates a Signer interface for JWT Attestations. `publicKeyID` +// is the ID of the public key that can verify the Attestation signature. +// TODO: Explain formatting of JWT private keys. +func NewJwtSigner(privateKey []byte, publicKeyID string, alg SignatureAlgorithm) (Signer, error) { + key, err := parsePkixPrivateKeyPem(privateKey) + if err != nil { + return nil, errors.Wrap(err, "error parsing private key") + } + + // If no ID is provided one is computed based on the default digest-based URI extracted from the public key material + if len(publicKeyID) == 0 { + publicKeyID, err = generatePkixPublicKeyId(key) + if err != nil { + return nil, errors.Wrap(err, "error generating public key id") + } + } + return &jwtSigner{ + privateKey: key, + publicKeyID: publicKeyID, + signatureAlgorithm: alg, + }, nil +} + +// CreateAttestation creates a signed JWT Attestation. See Signer for more details. +func (s *jwtSigner) CreateAttestation(payload []byte) (*Attestation, error) { + type headerTemplate struct { + typ, alg, kid string + } + header := headerTemplate{ + typ: "JWT", + alg: getAlgName(s.signatureAlgorithm), + kid: s.publicKeyID, + } + + headerJson, err := json.Marshal(header) + if err != nil { + return nil, errors.Wrap(err, "error marshaling header") + } + var headerBase64 []byte + base64.RawURLEncoding.Encode(headerBase64, headerJson) + headerDot := append(headerBase64, []byte(".")...) + var payloadBase64 []byte + base64.RawURLEncoding.Encode(payloadBase64, payload) + headerDotPayload := append(headerDot, payloadBase64...) + signature, err := createDetachedSignature(s.privateKey, headerDotPayload, s.signatureAlgorithm) + if err != nil { + return nil, errors.Wrap(err, "error creating signature") + } + var signatureBase64 []byte + base64.RawURLEncoding.Encode(signatureBase64, signature) + jwt := append(headerDotPayload, signatureBase64...) + return &Attestation{ + PublicKeyID: s.publicKeyID, + Signature: jwt, + SerializedPayload: payload, + }, nil +} + func checkHeader(headerIn []byte, publicKey PublicKey) error { type headerTemplate struct { Typ, Alg, Kid, Crit string diff --git a/pkg/attestlib/pkix.go b/pkg/attestlib/pkix.go index 48acdb9de..8bc92bf95 100644 --- a/pkg/attestlib/pkix.go +++ b/pkg/attestlib/pkix.go @@ -17,9 +17,6 @@ limitations under the License. package attestlib import ( - "crypto/ecdsa" - "crypto/rsa" - "fmt" "github.com/pkg/errors" ) @@ -54,37 +51,13 @@ func NewPkixSigner(privateKey []byte, alg SignatureAlgorithm, publicKeyID string // CreateAttestation creates a signed PKIX Attestation. See Signer for more details. func (s *pkixSigner) CreateAttestation(payload []byte) (*Attestation, error) { - switch s.signatureAlgorithm { - case RsaSignPkcs12048Sha256, RsaSignPkcs13072Sha256, RsaSignPkcs14096Sha256, RsaSignPkcs14096Sha512, RsaPss2048Sha256, RsaPss3072Sha256, RsaPss4096Sha256, RsaPss4096Sha512: - rsaKey, ok := s.privateKey.(*rsa.PrivateKey) - if !ok { - return nil, errors.New("expected rsa key") - } - signature, err := rsaSign(rsaKey, payload, s.signatureAlgorithm) - if err != nil { - return nil, errors.Wrap(err, "error creating rsa signature") - } - return &Attestation{ - PublicKeyID: s.publicKeyID, - Signature: signature, - SerializedPayload: payload, - }, nil - case EcdsaP256Sha256, EcdsaP384Sha384, EcdsaP521Sha512: - ecKey, ok := s.privateKey.(*ecdsa.PrivateKey) - if !ok { - return nil, errors.New("expected ecdsa key") - } - signature, err := ecSign(ecKey, payload, s.signatureAlgorithm) - if err != nil { - return nil, errors.Wrap(err, "error creating ecdsa signature") - } - return &Attestation{ - PublicKeyID: s.publicKeyID, - Signature: signature, - SerializedPayload: payload, - }, nil - default: - return nil, fmt.Errorf("unknown signature algorithm: %v", s.signatureAlgorithm) - + signature, err := createDetachedSignature(s.privateKey, payload, s.signatureAlgorithm) + if err != nil { + return nil, errors.Wrap(err, "error creating signature") } + return &Attestation{ + PublicKeyID: s.publicKeyID, + Signature: signature, + SerializedPayload: payload, + }, nil } diff --git a/pkg/attestlib/signer.go b/pkg/attestlib/signer.go index bd582693a..498362a4c 100644 --- a/pkg/attestlib/signer.go +++ b/pkg/attestlib/signer.go @@ -16,8 +16,6 @@ limitations under the License. package attestlib -import "errors" - // Signer contains methods to create a signed Attestation. type Signer interface { // CreateAttestation creates an Attestation whose signature is generated by @@ -26,25 +24,3 @@ type Signer interface { // but unsigned token. CreateAttestation(payload []byte) (*Attestation, error) } - -type jwtSigner struct { - PrivateKey []byte - PublicKeyID string - SignatureAlgorithm SignatureAlgorithm -} - -// NewJwtSigner creates a Signer interface for JWT Attestations. `publicKeyID` -// is the ID of the public key that can verify the Attestation signature. -// TODO: Explain formatting of JWT private keys. -func NewJwtSigner(privateKey []byte, publicKeyID string, alg SignatureAlgorithm) (Signer, error) { - return &jwtSigner{ - PrivateKey: privateKey, - PublicKeyID: publicKeyID, - SignatureAlgorithm: alg, - }, nil -} - -// CreateAttestation creates a signed JWT Attestation. See Signer for more details. -func (s *jwtSigner) CreateAttestation(payload []byte) (*Attestation, error) { - return nil, errors.New("jwt attestations not implemented") -} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go index 6f4a902b5..7d6670ae0 100644 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go @@ -2264,7 +2264,7 @@ func (g *Generator) generateMessage(message *Descriptor) { of := oneofField{ fieldCommon: fieldCommon{ goName: fname, - getterName: "Get"+fname, + getterName: "Get" + fname, goType: dname, tags: tag, protoName: odp.GetName(), diff --git a/vendor/github.com/gregjones/httpcache/httpcache.go b/vendor/github.com/gregjones/httpcache/httpcache.go index f6a2ec4a5..514ab73d4 100644 --- a/vendor/github.com/gregjones/httpcache/httpcache.go +++ b/vendor/github.com/gregjones/httpcache/httpcache.go @@ -420,10 +420,10 @@ func getEndToEndHeaders(respHeaders http.Header) []string { "Keep-Alive": struct{}{}, "Proxy-Authenticate": struct{}{}, "Proxy-Authorization": struct{}{}, - "Te": struct{}{}, - "Trailers": struct{}{}, - "Transfer-Encoding": struct{}{}, - "Upgrade": struct{}{}, + "Te": struct{}{}, + "Trailers": struct{}{}, + "Transfer-Encoding": struct{}{}, + "Upgrade": struct{}{}, } for _, extra := range strings.Split(respHeaders.Get("connection"), ",") { diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go index 744cac01c..74c707744 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go @@ -1,37 +1,36 @@ package simplelru - // LRUCache is the interface for simple LRU cache. type LRUCache interface { - // Adds a value to the cache, returns true if an eviction occurred and - // updates the "recently used"-ness of the key. - Add(key, value interface{}) bool + // Adds a value to the cache, returns true if an eviction occurred and + // updates the "recently used"-ness of the key. + Add(key, value interface{}) bool - // Returns key's value from the cache and - // updates the "recently used"-ness of the key. #value, isFound - Get(key interface{}) (value interface{}, ok bool) + // Returns key's value from the cache and + // updates the "recently used"-ness of the key. #value, isFound + Get(key interface{}) (value interface{}, ok bool) - // Check if a key exsists in cache without updating the recent-ness. - Contains(key interface{}) (ok bool) + // Check if a key exsists in cache without updating the recent-ness. + Contains(key interface{}) (ok bool) - // Returns key's value without updating the "recently used"-ness of the key. - Peek(key interface{}) (value interface{}, ok bool) + // Returns key's value without updating the "recently used"-ness of the key. + Peek(key interface{}) (value interface{}, ok bool) - // Removes a key from the cache. - Remove(key interface{}) bool + // Removes a key from the cache. + Remove(key interface{}) bool - // Removes the oldest entry from cache. - RemoveOldest() (interface{}, interface{}, bool) + // Removes the oldest entry from cache. + RemoveOldest() (interface{}, interface{}, bool) - // Returns the oldest entry from the cache. #key, value, isFound - GetOldest() (interface{}, interface{}, bool) + // Returns the oldest entry from the cache. #key, value, isFound + GetOldest() (interface{}, interface{}, bool) - // Returns a slice of the keys in the cache, from oldest to newest. - Keys() []interface{} + // Returns a slice of the keys in the cache, from oldest to newest. + Keys() []interface{} - // Returns the number of items in the cache. - Len() int + // Returns the number of items in the cache. + Len() int - // Clear all cache entries - Purge() + // Clear all cache entries + Purge() } diff --git a/vendor/github.com/modern-go/concurrent/log.go b/vendor/github.com/modern-go/concurrent/log.go index 9756fcc75..4899eed02 100644 --- a/vendor/github.com/modern-go/concurrent/log.go +++ b/vendor/github.com/modern-go/concurrent/log.go @@ -1,13 +1,13 @@ package concurrent import ( - "os" - "log" "io/ioutil" + "log" + "os" ) // ErrorLogger is used to print out error, can be set to writer other than stderr var ErrorLogger = log.New(os.Stderr, "", 0) // InfoLogger is used to print informational message, default to off -var InfoLogger = log.New(ioutil.Discard, "", 0) \ No newline at end of file +var InfoLogger = log.New(ioutil.Discard, "", 0) diff --git a/vendor/github.com/modern-go/concurrent/unbounded_executor.go b/vendor/github.com/modern-go/concurrent/unbounded_executor.go index 05a77dceb..5ea18eb7b 100644 --- a/vendor/github.com/modern-go/concurrent/unbounded_executor.go +++ b/vendor/github.com/modern-go/concurrent/unbounded_executor.go @@ -3,11 +3,11 @@ package concurrent import ( "context" "fmt" + "reflect" "runtime" "runtime/debug" "sync" "time" - "reflect" ) // HandlePanic logs goroutine panic by default diff --git a/vendor/github.com/modern-go/reflect2/reflect2.go b/vendor/github.com/modern-go/reflect2/reflect2.go index 63b49c799..4fe9a5965 100644 --- a/vendor/github.com/modern-go/reflect2/reflect2.go +++ b/vendor/github.com/modern-go/reflect2/reflect2.go @@ -136,7 +136,7 @@ type frozenConfig struct { func (cfg Config) Froze() *frozenConfig { return &frozenConfig{ useSafeImplementation: cfg.UseSafeImplementation, - cache: concurrent.NewMap(), + cache: concurrent.NewMap(), } } @@ -291,8 +291,8 @@ func UnsafeCastString(str string) []byte { stringHeader := (*reflect.StringHeader)(unsafe.Pointer(&str)) sliceHeader := &reflect.SliceHeader{ Data: stringHeader.Data, - Cap: stringHeader.Len, - Len: stringHeader.Len, + Cap: stringHeader.Len, + Len: stringHeader.Len, } return *(*[]byte)(unsafe.Pointer(sliceHeader)) } diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go index 4f17a3331..9f946da6f 100644 --- a/vendor/golang.org/x/sys/windows/security_windows.go +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -149,7 +149,7 @@ const ( DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS = 0x22b DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS = 0x22c DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = 0x22d - DOMAIN_ALIAS_RID_MONITORING_USERS = 0X22e + DOMAIN_ALIAS_RID_MONITORING_USERS = 0x22e DOMAIN_ALIAS_RID_LOGGING_USERS = 0x22f DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS = 0x230 DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS = 0x231 diff --git a/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go b/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go index 89d3ea9c2..58f4ec4db 100644 --- a/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go +++ b/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go @@ -294,10 +294,12 @@ type GetDefaultGcsBucketNameRequest struct { XXX_unrecognized []byte `json:"-"` } -func (m *GetDefaultGcsBucketNameRequest) Reset() { *m = GetDefaultGcsBucketNameRequest{} } -func (m *GetDefaultGcsBucketNameRequest) String() string { return proto.CompactTextString(m) } -func (*GetDefaultGcsBucketNameRequest) ProtoMessage() {} -func (*GetDefaultGcsBucketNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (m *GetDefaultGcsBucketNameRequest) Reset() { *m = GetDefaultGcsBucketNameRequest{} } +func (m *GetDefaultGcsBucketNameRequest) String() string { return proto.CompactTextString(m) } +func (*GetDefaultGcsBucketNameRequest) ProtoMessage() {} +func (*GetDefaultGcsBucketNameRequest) Descriptor() ([]byte, []int) { + return fileDescriptor0, []int{10} +} type GetDefaultGcsBucketNameResponse struct { DefaultGcsBucketName *string `protobuf:"bytes,1,opt,name=default_gcs_bucket_name,json=defaultGcsBucketName" json:"default_gcs_bucket_name,omitempty"` diff --git a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go index 393342c13..94bc7bc99 100644 --- a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go +++ b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go @@ -419,7 +419,9 @@ func (x *Query_Filter_Operator) UnmarshalJSON(data []byte) error { *x = Query_Filter_Operator(value) return nil } -func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{15, 0, 0} } +func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) { + return fileDescriptor0, []int{15, 0, 0} +} type Query_Order_Direction int32 @@ -453,7 +455,9 @@ func (x *Query_Order_Direction) UnmarshalJSON(data []byte) error { *x = Query_Order_Direction(value) return nil } -func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{15, 1, 0} } +func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) { + return fileDescriptor0, []int{15, 1, 0} +} type Error_ErrorCode int32 @@ -744,10 +748,12 @@ type PropertyValue_ReferenceValue struct { XXX_unrecognized []byte `json:"-"` } -func (m *PropertyValue_ReferenceValue) Reset() { *m = PropertyValue_ReferenceValue{} } -func (m *PropertyValue_ReferenceValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_ReferenceValue) ProtoMessage() {} -func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 2} } +func (m *PropertyValue_ReferenceValue) Reset() { *m = PropertyValue_ReferenceValue{} } +func (m *PropertyValue_ReferenceValue) String() string { return proto.CompactTextString(m) } +func (*PropertyValue_ReferenceValue) ProtoMessage() {} +func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) { + return fileDescriptor0, []int{1, 2} +} func (m *PropertyValue_ReferenceValue) GetApp() string { if m != nil && m.App != nil { @@ -1835,10 +1841,12 @@ type CompiledQuery_MergeJoinScan struct { XXX_unrecognized []byte `json:"-"` } -func (m *CompiledQuery_MergeJoinScan) Reset() { *m = CompiledQuery_MergeJoinScan{} } -func (m *CompiledQuery_MergeJoinScan) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery_MergeJoinScan) ProtoMessage() {} -func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16, 1} } +func (m *CompiledQuery_MergeJoinScan) Reset() { *m = CompiledQuery_MergeJoinScan{} } +func (m *CompiledQuery_MergeJoinScan) String() string { return proto.CompactTextString(m) } +func (*CompiledQuery_MergeJoinScan) ProtoMessage() {} +func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) { + return fileDescriptor0, []int{16, 1} +} const Default_CompiledQuery_MergeJoinScan_ValuePrefix bool = false diff --git a/vendor/google.golang.org/appengine/internal/log/log_service.pb.go b/vendor/google.golang.org/appengine/internal/log/log_service.pb.go index 5549605ad..2c6971193 100644 --- a/vendor/google.golang.org/appengine/internal/log/log_service.pb.go +++ b/vendor/google.golang.org/appengine/internal/log/log_service.pb.go @@ -75,7 +75,9 @@ func (x *LogServiceError_ErrorCode) UnmarshalJSON(data []byte) error { *x = LogServiceError_ErrorCode(value) return nil } -func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } +func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor0, []int{0, 0} +} type LogServiceError struct { XXX_unrecognized []byte `json:"-"` diff --git a/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas/grafeas.pb.go b/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas/grafeas.pb.go index a633f8bc9..d9c853f66 100644 --- a/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas/grafeas.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas/grafeas.pb.go @@ -1569,8 +1569,10 @@ type GetVulnerabilityOccurrencesSummaryRequest struct { func (m *GetVulnerabilityOccurrencesSummaryRequest) Reset() { *m = GetVulnerabilityOccurrencesSummaryRequest{} } -func (m *GetVulnerabilityOccurrencesSummaryRequest) String() string { return proto.CompactTextString(m) } -func (*GetVulnerabilityOccurrencesSummaryRequest) ProtoMessage() {} +func (m *GetVulnerabilityOccurrencesSummaryRequest) String() string { + return proto.CompactTextString(m) +} +func (*GetVulnerabilityOccurrencesSummaryRequest) ProtoMessage() {} func (*GetVulnerabilityOccurrencesSummaryRequest) Descriptor() ([]byte, []int) { return fileDescriptor_5865e5de1898162a, []int{22} } diff --git a/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.pb.go b/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.pb.go index 5b6526c69..2dfed7825 100644 --- a/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.pb.go @@ -380,8 +380,10 @@ type Vulnerability_WindowsDetail_KnowledgeBase struct { func (m *Vulnerability_WindowsDetail_KnowledgeBase) Reset() { *m = Vulnerability_WindowsDetail_KnowledgeBase{} } -func (m *Vulnerability_WindowsDetail_KnowledgeBase) String() string { return proto.CompactTextString(m) } -func (*Vulnerability_WindowsDetail_KnowledgeBase) ProtoMessage() {} +func (m *Vulnerability_WindowsDetail_KnowledgeBase) String() string { + return proto.CompactTextString(m) +} +func (*Vulnerability_WindowsDetail_KnowledgeBase) ProtoMessage() {} func (*Vulnerability_WindowsDetail_KnowledgeBase) Descriptor() ([]byte, []int) { return fileDescriptor_2a1e5608ee0186b1, []int{0, 1, 0} } diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go index 014c72b3f..718db50f8 100644 --- a/vendor/google.golang.org/grpc/server.go +++ b/vendor/google.golang.org/grpc/server.go @@ -1099,11 +1099,11 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp } ctx := NewContextWithServerTransportStream(stream.Context(), stream) ss := &serverStream{ - ctx: ctx, - t: t, - s: stream, - p: &parser{r: stream}, - codec: s.getCodec(stream.ContentSubtype()), + ctx: ctx, + t: t, + s: stream, + p: &parser{r: stream}, + codec: s.getCodec(stream.ContentSubtype()), maxReceiveMessageSize: s.opts.maxReceiveMessageSize, maxSendMessageSize: s.opts.maxSendMessageSize, trInfo: trInfo, diff --git a/vendor/gopkg.in/yaml.v2/readerc.go b/vendor/gopkg.in/yaml.v2/readerc.go index 7c1f5fac3..b0c436c4a 100644 --- a/vendor/gopkg.in/yaml.v2/readerc.go +++ b/vendor/gopkg.in/yaml.v2/readerc.go @@ -95,7 +95,7 @@ func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { // [Go] This function was changed to guarantee the requested length size at EOF. // The fact we need to do this is pretty awful, but the description above implies - // for that to be the case, and there are tests + // for that to be the case, and there are tests // If the EOF flag is set and the raw buffer is empty, do nothing. if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { diff --git a/vendor/gopkg.in/yaml.v2/resolve.go b/vendor/gopkg.in/yaml.v2/resolve.go index 6c151db6f..bf830eee5 100644 --- a/vendor/gopkg.in/yaml.v2/resolve.go +++ b/vendor/gopkg.in/yaml.v2/resolve.go @@ -180,7 +180,7 @@ func resolve(tag string, in string) (rtag string, out interface{}) { return yaml_INT_TAG, uintv } } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt("-" + plain[3:], 2, 64) + intv, err := strconv.ParseInt("-"+plain[3:], 2, 64) if err == nil { if true || intv == int64(int(intv)) { return yaml_INT_TAG, int(intv) diff --git a/vendor/gopkg.in/yaml.v2/sorter.go b/vendor/gopkg.in/yaml.v2/sorter.go index 4c45e660a..2edd73405 100644 --- a/vendor/gopkg.in/yaml.v2/sorter.go +++ b/vendor/gopkg.in/yaml.v2/sorter.go @@ -52,7 +52,7 @@ func (l keyList) Less(i, j int) bool { var ai, bi int var an, bn int64 if ar[i] == '0' || br[i] == '0' { - for j := i-1; j >= 0 && unicode.IsDigit(ar[j]); j-- { + for j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- { if ar[j] != '0' { an = 1 bn = 1 diff --git a/vendor/k8s.io/api/apps/v1/generated.pb.go b/vendor/k8s.io/api/apps/v1/generated.pb.go index 1823a8440..b62cd8626 100644 --- a/vendor/k8s.io/api/apps/v1/generated.pb.go +++ b/vendor/k8s.io/api/apps/v1/generated.pb.go @@ -110,9 +110,11 @@ func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } func (*DaemonSetStatus) ProtoMessage() {} func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } -func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } -func (*DaemonSetUpdateStrategy) ProtoMessage() {} -func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } +func (*DaemonSetUpdateStrategy) ProtoMessage() {} +func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{7} +} func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} @@ -158,9 +160,11 @@ func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} func (*ReplicaSetStatus) ProtoMessage() {} func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } -func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } -func (*RollingUpdateDaemonSet) ProtoMessage() {} -func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } +func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } +func (*RollingUpdateDaemonSet) ProtoMessage() {} +func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{19} +} func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} diff --git a/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go index 85fb159dd..7e992c584 100644 --- a/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go @@ -96,7 +96,7 @@ func (DaemonSetSpec) SwaggerDoc() map[string]string { } var map_DaemonSetStatus = map[string]string{ - "": "DaemonSetStatus represents the current status of a daemon set.", + "": "DaemonSetStatus represents the current status of a daemon set.", "currentNumberScheduled": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", "numberMisscheduled": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", "desiredNumberScheduled": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", diff --git a/vendor/k8s.io/api/apps/v1beta2/generated.pb.go b/vendor/k8s.io/api/apps/v1beta2/generated.pb.go index 49f9f8771..686ef95ac 100644 --- a/vendor/k8s.io/api/apps/v1beta2/generated.pb.go +++ b/vendor/k8s.io/api/apps/v1beta2/generated.pb.go @@ -115,9 +115,11 @@ func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } func (*DaemonSetStatus) ProtoMessage() {} func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } -func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } -func (*DaemonSetUpdateStrategy) ProtoMessage() {} -func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } +func (*DaemonSetUpdateStrategy) ProtoMessage() {} +func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{7} +} func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} @@ -163,9 +165,11 @@ func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} func (*ReplicaSetStatus) ProtoMessage() {} func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } -func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } -func (*RollingUpdateDaemonSet) ProtoMessage() {} -func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } +func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } +func (*RollingUpdateDaemonSet) ProtoMessage() {} +func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{19} +} func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} diff --git a/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go b/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go index 627df3ab7..f8229ceda 100644 --- a/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go @@ -96,7 +96,7 @@ func (DaemonSetSpec) SwaggerDoc() map[string]string { } var map_DaemonSetStatus = map[string]string{ - "": "DaemonSetStatus represents the current status of a daemon set.", + "": "DaemonSetStatus represents the current status of a daemon set.", "currentNumberScheduled": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", "numberMisscheduled": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", "desiredNumberScheduled": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", diff --git a/vendor/k8s.io/api/authorization/v1/generated.pb.go b/vendor/k8s.io/api/authorization/v1/generated.pb.go index 508c58f1b..3dfd901e3 100644 --- a/vendor/k8s.io/api/authorization/v1/generated.pb.go +++ b/vendor/k8s.io/api/authorization/v1/generated.pb.go @@ -90,9 +90,11 @@ func (m *ResourceRule) Reset() { *m = ResourceRule{} } func (*ResourceRule) ProtoMessage() {} func (*ResourceRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } -func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } -func (*SelfSubjectAccessReview) ProtoMessage() {} -func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } +func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } +func (*SelfSubjectAccessReview) ProtoMessage() {} +func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{6} +} func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} diff --git a/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go b/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go index 1f8abde4f..76e064e56 100644 --- a/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go @@ -90,9 +90,11 @@ func (m *ResourceRule) Reset() { *m = ResourceRule{} } func (*ResourceRule) ProtoMessage() {} func (*ResourceRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } -func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } -func (*SelfSubjectAccessReview) ProtoMessage() {} -func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } +func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } +func (*SelfSubjectAccessReview) ProtoMessage() {} +func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{6} +} func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} diff --git a/vendor/k8s.io/api/autoscaling/v1/generated.pb.go b/vendor/k8s.io/api/autoscaling/v1/generated.pb.go index 84c40a9f4..a27208639 100644 --- a/vendor/k8s.io/api/autoscaling/v1/generated.pb.go +++ b/vendor/k8s.io/api/autoscaling/v1/generated.pb.go @@ -86,9 +86,11 @@ func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricS func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } -func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -func (*HorizontalPodAutoscaler) ProtoMessage() {} -func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } +func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } +func (*HorizontalPodAutoscaler) ProtoMessage() {} +func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{3} +} func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} diff --git a/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go index e84909269..b34e46eb3 100644 --- a/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go @@ -190,8 +190,8 @@ func (PodsMetricStatus) SwaggerDoc() map[string]string { } var map_ResourceMetricSource = map[string]string{ - "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", - "name": "name is the name of the resource in question.", + "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "name": "name is the name of the resource in question.", "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", "targetAverageValue": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", } @@ -201,8 +201,8 @@ func (ResourceMetricSource) SwaggerDoc() map[string]string { } var map_ResourceMetricStatus = map[string]string{ - "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - "name": "name is the name of the resource in question.", + "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "name": "name is the name of the resource in question.", "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", "currentAverageValue": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", } diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go b/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go index 467345d32..c82ec2aaa 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go @@ -81,9 +81,11 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package -func (m *ContainerResourcePolicy) Reset() { *m = ContainerResourcePolicy{} } -func (*ContainerResourcePolicy) ProtoMessage() {} -func (*ContainerResourcePolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } +func (m *ContainerResourcePolicy) Reset() { *m = ContainerResourcePolicy{} } +func (*ContainerResourcePolicy) ProtoMessage() {} +func (*ContainerResourcePolicy) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{0} +} func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} @@ -99,9 +101,11 @@ func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricS func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } -func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -func (*HorizontalPodAutoscaler) ProtoMessage() {} -func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } +func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } +func (*HorizontalPodAutoscaler) ProtoMessage() {} +func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{4} +} func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go index fe67bb1b4..ebee83870 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go @@ -233,7 +233,7 @@ func (RecommendedContainerResources) SwaggerDoc() map[string]string { } var map_RecommendedPodResources = map[string]string{ - "": "RecommendedPodResources is the recommendation of resources computed by autoscaler. It contains a recommendation for each container in the pod (except for those with `ContainerScalingMode` set to 'Off').", + "": "RecommendedPodResources is the recommendation of resources computed by autoscaler. It contains a recommendation for each container in the pod (except for those with `ContainerScalingMode` set to 'Off').", "containerRecommendations": "Resources recommended by the autoscaler for each container.", } @@ -242,8 +242,8 @@ func (RecommendedPodResources) SwaggerDoc() map[string]string { } var map_ResourceMetricSource = map[string]string{ - "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", - "name": "name is the name of the resource in question.", + "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "name": "name is the name of the resource in question.", "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", "targetAverageValue": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", } @@ -253,8 +253,8 @@ func (ResourceMetricSource) SwaggerDoc() map[string]string { } var map_ResourceMetricStatus = map[string]string{ - "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - "name": "name is the name of the resource in question.", + "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "name": "name is the name of the resource in question.", "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", "currentAverageValue": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", } diff --git a/vendor/k8s.io/api/core/v1/generated.pb.go b/vendor/k8s.io/api/core/v1/generated.pb.go index 48b5a3c5b..7dc000fe9 100644 --- a/vendor/k8s.io/api/core/v1/generated.pb.go +++ b/vendor/k8s.io/api/core/v1/generated.pb.go @@ -674,9 +674,11 @@ func (m *PersistentVolume) Reset() { *m = PersistentVolume{} func (*PersistentVolume) ProtoMessage() {} func (*PersistentVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{99} } -func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } -func (*PersistentVolumeClaim) ProtoMessage() {} -func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{100} } +func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } +func (*PersistentVolumeClaim) ProtoMessage() {} +func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{100} +} func (m *PersistentVolumeClaimCondition) Reset() { *m = PersistentVolumeClaimCondition{} } func (*PersistentVolumeClaimCondition) ProtoMessage() {} @@ -778,9 +780,11 @@ func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } func (*PodLogOptions) ProtoMessage() {} func (*PodLogOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{121} } -func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } -func (*PodPortForwardOptions) ProtoMessage() {} -func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{122} } +func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } +func (*PodPortForwardOptions) ProtoMessage() {} +func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{122} +} func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } func (*PodProxyOptions) ProtoMessage() {} @@ -844,9 +848,11 @@ func (m *Probe) Reset() { *m = Probe{} } func (*Probe) ProtoMessage() {} func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} } -func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } -func (*ProjectedVolumeSource) ProtoMessage() {} -func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} } +func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } +func (*ProjectedVolumeSource) ProtoMessage() {} +func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{138} +} func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } func (*QuobyteVolumeSource) ProtoMessage() {} @@ -866,9 +872,11 @@ func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } func (*RangeAllocation) ProtoMessage() {} func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} } -func (m *ReplicationController) Reset() { *m = ReplicationController{} } -func (*ReplicationController) ProtoMessage() {} -func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} } +func (m *ReplicationController) Reset() { *m = ReplicationController{} } +func (*ReplicationController) ProtoMessage() {} +func (*ReplicationController) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{143} +} func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } func (*ReplicationControllerCondition) ProtoMessage() {} @@ -894,9 +902,11 @@ func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{147} } -func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } -func (*ResourceFieldSelector) ProtoMessage() {} -func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} } +func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } +func (*ResourceFieldSelector) ProtoMessage() {} +func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{148} +} func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } func (*ResourceQuota) ProtoMessage() {} @@ -1016,9 +1026,11 @@ func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } func (*ServiceStatus) ProtoMessage() {} func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{176} } -func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } -func (*SessionAffinityConfig) ProtoMessage() {} -func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{177} } +func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } +func (*SessionAffinityConfig) ProtoMessage() {} +func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{177} +} func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} } func (*StorageOSPersistentVolumeSource) ProtoMessage() {} @@ -1026,9 +1038,11 @@ func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{178} } -func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } -func (*StorageOSVolumeSource) ProtoMessage() {} -func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{179} } +func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } +func (*StorageOSVolumeSource) ProtoMessage() {} +func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{179} +} func (m *Sysctl) Reset() { *m = Sysctl{} } func (*Sysctl) ProtoMessage() {} diff --git a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go index 5b4e173db..e888b6edf 100644 --- a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -1633,7 +1633,7 @@ func (PreferredSchedulingTerm) SwaggerDoc() map[string]string { } var map_Probe = map[string]string{ - "": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", + "": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", "initialDelaySeconds": "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "timeoutSeconds": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "periodSeconds": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", @@ -2197,7 +2197,7 @@ func (TopologySelectorLabelRequirement) SwaggerDoc() map[string]string { } var map_TopologySelectorTerm = map[string]string{ - "": "A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.", + "": "A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.", "matchLabelExpressions": "A list of topology selector requirements by labels.", } @@ -2270,23 +2270,23 @@ var map_VolumeSource = map[string]string{ "iscsi": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md", "glusterfs": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", "persistentVolumeClaim": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", - "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - "cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - "flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", - "downwardAPI": "DownwardAPI represents downward API about the pod that should populate this volume", - "fc": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - "azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - "configMap": "ConfigMap represents a configMap that should populate this volume", - "vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - "photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - "projected": "Items for all in one resources secrets, configmaps, and downward API", - "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", - "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - "storageos": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", + "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", + "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", + "downwardAPI": "DownwardAPI represents downward API about the pod that should populate this volume", + "fc": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + "azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "configMap": "ConfigMap represents a configMap that should populate this volume", + "vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "projected": "Items for all in one resources secrets, configmaps, and downward API", + "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "storageos": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", } func (VolumeSource) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go b/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go index 0604fb957..7e725b413 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go @@ -196,9 +196,11 @@ func (m *DeploymentStrategy) Reset() { *m = DeploymentStrateg func (*DeploymentStrategy) ProtoMessage() {} func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } -func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} } -func (*FSGroupStrategyOptions) ProtoMessage() {} -func (*FSGroupStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } +func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} } +func (*FSGroupStrategyOptions) ProtoMessage() {} +func (*FSGroupStrategyOptions) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{19} +} func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } func (*HTTPIngressPath) ProtoMessage() {} @@ -326,9 +328,11 @@ func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } func (*RollbackConfig) ProtoMessage() {} func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} } -func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } -func (*RollingUpdateDaemonSet) ProtoMessage() {} -func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} } +func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } +func (*RollingUpdateDaemonSet) ProtoMessage() {} +func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{50} +} func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} @@ -342,9 +346,11 @@ func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{52} } -func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } -func (*SELinuxStrategyOptions) ProtoMessage() {} -func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{53} } +func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } +func (*SELinuxStrategyOptions) ProtoMessage() {} +func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{53} +} func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} diff --git a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go index d261b4247..bb4e9943d 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go @@ -114,7 +114,7 @@ func (DaemonSetSpec) SwaggerDoc() map[string]string { } var map_DaemonSetStatus = map[string]string{ - "": "DaemonSetStatus represents the current status of a daemon set.", + "": "DaemonSetStatus represents the current status of a daemon set.", "currentNumberScheduled": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", "numberMisscheduled": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", "desiredNumberScheduled": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", diff --git a/vendor/k8s.io/api/networking/v1/generated.pb.go b/vendor/k8s.io/api/networking/v1/generated.pb.go index 089d31963..d9395c7b0 100644 --- a/vendor/k8s.io/api/networking/v1/generated.pb.go +++ b/vendor/k8s.io/api/networking/v1/generated.pb.go @@ -70,9 +70,11 @@ func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } func (*NetworkPolicy) ProtoMessage() {} func (*NetworkPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } -func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } -func (*NetworkPolicyEgressRule) ProtoMessage() {} -func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } +func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } +func (*NetworkPolicyEgressRule) ProtoMessage() {} +func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{2} +} func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } func (*NetworkPolicyIngressRule) ProtoMessage() {} diff --git a/vendor/k8s.io/api/policy/v1beta1/generated.pb.go b/vendor/k8s.io/api/policy/v1beta1/generated.pb.go index 505fb0e03..9e2cbe71d 100644 --- a/vendor/k8s.io/api/policy/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/policy/v1beta1/generated.pb.go @@ -99,13 +99,17 @@ func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBud func (*PodDisruptionBudget) ProtoMessage() {} func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } -func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } -func (*PodDisruptionBudgetList) ProtoMessage() {} -func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } +func (*PodDisruptionBudgetList) ProtoMessage() {} +func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{7} +} -func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } -func (*PodDisruptionBudgetSpec) ProtoMessage() {} -func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } +func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } +func (*PodDisruptionBudgetSpec) ProtoMessage() {} +func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{8} +} func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } func (*PodDisruptionBudgetStatus) ProtoMessage() {} @@ -131,9 +135,11 @@ func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } -func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } -func (*SELinuxStrategyOptions) ProtoMessage() {} -func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } +func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } +func (*SELinuxStrategyOptions) ProtoMessage() {} +func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{14} +} func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} } func (*SupplementalGroupsStrategyOptions) ProtoMessage() {} diff --git a/vendor/k8s.io/api/rbac/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/rbac/v1/types_swagger_doc_generated.go index 0ec20c88e..83ce310e6 100644 --- a/vendor/k8s.io/api/rbac/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/rbac/v1/types_swagger_doc_generated.go @@ -28,7 +28,7 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AggregationRule = map[string]string{ - "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", "clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", } diff --git a/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go index 1d6ef30b0..d7b194ae4 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go @@ -28,7 +28,7 @@ package v1alpha1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AggregationRule = map[string]string{ - "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", "clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", } diff --git a/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go index 66dba6ca1..c80327593 100644 --- a/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go @@ -28,7 +28,7 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AggregationRule = map[string]string{ - "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", "clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", } diff --git a/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go index 32d7dcc52..3701b0864 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go @@ -49,7 +49,7 @@ func (VolumeAttachmentList) SwaggerDoc() map[string]string { } var map_VolumeAttachmentSource = map[string]string{ - "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", "persistentVolumeName": "Name of the persistent volume to attach.", } diff --git a/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go index 423e7f271..db37ac4fa 100644 --- a/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go @@ -75,7 +75,7 @@ func (VolumeAttachmentList) SwaggerDoc() map[string]string { } var map_VolumeAttachmentSource = map[string]string{ - "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", "persistentVolumeName": "Name of the persistent volume to attach.", } diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go index b9670071c..a55cf8a09 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go @@ -135,12 +135,12 @@ func AsPartialObjectMetadata(m metav1.Object) *metav1beta1.PartialObjectMetadata CreationTimestamp: m.GetCreationTimestamp(), DeletionTimestamp: m.GetDeletionTimestamp(), DeletionGracePeriodSeconds: m.GetDeletionGracePeriodSeconds(), - Labels: m.GetLabels(), - Annotations: m.GetAnnotations(), - OwnerReferences: m.GetOwnerReferences(), - Finalizers: m.GetFinalizers(), - ClusterName: m.GetClusterName(), - Initializers: m.GetInitializers(), + Labels: m.GetLabels(), + Annotations: m.GetAnnotations(), + OwnerReferences: m.GetOwnerReferences(), + Finalizers: m.GetFinalizers(), + ClusterName: m.GetClusterName(), + Initializers: m.GetInitializers(), }, } } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go index c13fe4af8..6caf2c386 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go @@ -150,7 +150,9 @@ func (meta *ObjectMeta) GetDeletionTimestamp() *Time { return meta.DeletionTimes func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *Time) { meta.DeletionTimestamp = deletionTimestamp } -func (meta *ObjectMeta) GetDeletionGracePeriodSeconds() *int64 { return meta.DeletionGracePeriodSeconds } +func (meta *ObjectMeta) GetDeletionGracePeriodSeconds() *int64 { + return meta.DeletionGracePeriodSeconds +} func (meta *ObjectMeta) SetDeletionGracePeriodSeconds(deletionGracePeriodSeconds *int64) { meta.DeletionGracePeriodSeconds = deletionGracePeriodSeconds } diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/vendor/k8s.io/client-go/tools/cache/shared_informer.go index 5f8c507f9..f29a4b331 100644 --- a/vendor/k8s.io/client-go/tools/cache/shared_informer.go +++ b/vendor/k8s.io/client-go/tools/cache/shared_informer.go @@ -86,7 +86,7 @@ func NewSharedIndexInformer(lw ListerWatcher, objType runtime.Object, defaultEve resyncCheckPeriod: defaultEventHandlerResyncPeriod, defaultEventHandlerResyncPeriod: defaultEventHandlerResyncPeriod, cacheMutationDetector: NewCacheMutationDetector(fmt.Sprintf("%T", objType)), - clock: realClock, + clock: realClock, } return sharedIndexInformer } diff --git a/vendor/k8s.io/client-go/util/cert/cert.go b/vendor/k8s.io/client-go/util/cert/cert.go index fb7f5facc..7af1a5f30 100644 --- a/vendor/k8s.io/client-go/util/cert/cert.go +++ b/vendor/k8s.io/client-go/util/cert/cert.go @@ -72,7 +72,7 @@ func NewSelfSignedCACert(cfg Config, key *rsa.PrivateKey) (*x509.Certificate, er NotAfter: now.Add(duration365d * 10).UTC(), KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, BasicConstraintsValid: true, - IsCA: true, + IsCA: true, } certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &tmpl, &tmpl, key.Public(), key) @@ -153,7 +153,7 @@ func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, BasicConstraintsValid: true, - IsCA: true, + IsCA: true, } caDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &caTemplate, &caTemplate, &caKey.PublicKey, caKey) diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go index 74af0b31d..335e995c0 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go @@ -44,10 +44,10 @@ func NameSystems() namer.NameSystems { publicNamer := &ExceptionNamer{ Exceptions: map[string]string{ - // these exceptions are used to deconflict the generated code - // you can put your fully qualified package like - // to generate a name that doesn't conflict with your group. - // "k8s.io/apis/events/v1beta1.Event": "EventResource" + // these exceptions are used to deconflict the generated code + // you can put your fully qualified package like + // to generate a name that doesn't conflict with your group. + // "k8s.io/apis/events/v1beta1.Event": "EventResource" }, KeyFunc: func(t *types.Type) string { return t.Name.Package + "." + t.Name.Name @@ -56,10 +56,10 @@ func NameSystems() namer.NameSystems { } privateNamer := &ExceptionNamer{ Exceptions: map[string]string{ - // these exceptions are used to deconflict the generated code - // you can put your fully qualified package like - // to generate a name that doesn't conflict with your group. - // "k8s.io/apis/events/v1beta1.Event": "eventResource" + // these exceptions are used to deconflict the generated code + // you can put your fully qualified package like + // to generate a name that doesn't conflict with your group. + // "k8s.io/apis/events/v1beta1.Event": "eventResource" }, KeyFunc: func(t *types.Type) string { return t.Name.Package + "." + t.Name.Name @@ -68,10 +68,10 @@ func NameSystems() namer.NameSystems { } publicPluralNamer := &ExceptionNamer{ Exceptions: map[string]string{ - // these exceptions are used to deconflict the generated code - // you can put your fully qualified package like - // to generate a name that doesn't conflict with your group. - // "k8s.io/apis/events/v1beta1.Event": "EventResource" + // these exceptions are used to deconflict the generated code + // you can put your fully qualified package like + // to generate a name that doesn't conflict with your group. + // "k8s.io/apis/events/v1beta1.Event": "EventResource" }, KeyFunc: func(t *types.Type) string { return t.Name.Package + "." + t.Name.Name diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go index 92e2a97f1..96016a0ce 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go @@ -43,7 +43,9 @@ type genClientForType struct { var _ generator.Generator = &genClientForType{} // Filter ignores all but one type because we're making a single file per type. -func (g *genClientForType) Filter(c *generator.Context, t *types.Type) bool { return t == g.typeToMatch } +func (g *genClientForType) Filter(c *generator.Context, t *types.Type) bool { + return t == g.typeToMatch +} func (g *genClientForType) Namers(c *generator.Context) namer.NameSystems { return namer.NameSystems{ diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go index 54632de05..6a7ca77d5 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go @@ -73,9 +73,11 @@ type group struct { type groupSort []group -func (g groupSort) Len() int { return len(g) } -func (g groupSort) Less(i, j int) bool { return strings.ToLower(g[i].Name) < strings.ToLower(g[j].Name) } -func (g groupSort) Swap(i, j int) { g[i], g[j] = g[j], g[i] } +func (g groupSort) Len() int { return len(g) } +func (g groupSort) Less(i, j int) bool { + return strings.ToLower(g[i].Name) < strings.ToLower(g[j].Name) +} +func (g groupSort) Swap(i, j int) { g[i], g[j] = g[j], g[i] } type version struct { Name string diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go index 2cc0372f8..642f9a466 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go @@ -320,9 +320,9 @@ func versionPackage(basePackage string, groupPkgName string, gv clientgentypes.G DefaultGen: generator.DefaultGen{ OptionalName: "interface", }, - outputPackage: packagePath, - imports: generator.NewImportTracker(), - types: typesToGenerate, + outputPackage: packagePath, + imports: generator.NewImportTracker(), + types: typesToGenerate, internalInterfacesPackage: packageForInternalInterfaces(basePackage), }) diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go index 1cd27d5cd..f80350c5f 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go @@ -63,7 +63,7 @@ func (g *versionInterfaceGenerator) GenerateType(c *generator.Context, t *types. m := map[string]interface{}{ "interfacesTweakListOptionsFunc": c.Universe.Type(types.Name{Package: g.internalInterfacesPackage, Name: "TweakListOptionsFunc"}), "interfacesSharedInformerFactory": c.Universe.Type(types.Name{Package: g.internalInterfacesPackage, Name: "SharedInformerFactory"}), - "types": g.types, + "types": g.types, } sw.Do(versionTemplate, m) diff --git a/vendor/k8s.io/gengo/namer/plural_namer.go b/vendor/k8s.io/gengo/namer/plural_namer.go index 40bdcc6cc..bfad02d6d 100644 --- a/vendor/k8s.io/gengo/namer/plural_namer.go +++ b/vendor/k8s.io/gengo/namer/plural_namer.go @@ -87,7 +87,7 @@ func (r *pluralNamer) Name(t *types.Type) string { plural = sPlural(singular) } case 'f': - plural = vesPlural(singular) + plural = vesPlural(singular) default: plural = sPlural(singular) } diff --git a/vendor/k8s.io/gengo/types/types.go b/vendor/k8s.io/gengo/types/types.go index aa3b7128e..ec25248e7 100644 --- a/vendor/k8s.io/gengo/types/types.go +++ b/vendor/k8s.io/gengo/types/types.go @@ -51,10 +51,10 @@ func ParseFullyQualifiedName(fqn string) Name { cs := strings.Split(fqn, ".") pkg := "" if len(cs) > 1 { - pkg = strings.Join(cs[0:len(cs) - 1], ".") + pkg = strings.Join(cs[0:len(cs)-1], ".") } return Name{ - Name: cs[len(cs) - 1], + Name: cs[len(cs)-1], Package: pkg, } } From abb84ee26177d165387cc5ad796d6148b5c4feff Mon Sep 17 00:00:00 2001 From: Trey Ridley Date: Wed, 29 Jul 2020 01:04:01 -0400 Subject: [PATCH 2/8] fix vendor --- .../protoc-gen-go/generator/generator.go | 2 +- .../gregjones/httpcache/httpcache.go | 8 +-- .../golang-lru/simplelru/lru_interface.go | 45 +++++++-------- vendor/github.com/modern-go/concurrent/log.go | 6 +- .../concurrent/unbounded_executor.go | 2 +- .../github.com/modern-go/reflect2/reflect2.go | 6 +- .../x/sys/windows/security_windows.go | 2 +- .../app_identity/app_identity_service.pb.go | 10 ++-- .../internal/datastore/datastore_v3.pb.go | 28 ++++------ .../appengine/internal/log/log_service.pb.go | 4 +- .../v1beta1/grafeas/grafeas.pb.go | 6 +- .../v1beta1/vulnerability/vulnerability.pb.go | 6 +- vendor/google.golang.org/grpc/server.go | 10 ++-- vendor/gopkg.in/yaml.v2/readerc.go | 2 +- vendor/gopkg.in/yaml.v2/resolve.go | 2 +- vendor/gopkg.in/yaml.v2/sorter.go | 2 +- vendor/k8s.io/api/apps/v1/generated.pb.go | 16 ++---- .../apps/v1/types_swagger_doc_generated.go | 2 +- .../k8s.io/api/apps/v1beta2/generated.pb.go | 16 ++---- .../v1beta2/types_swagger_doc_generated.go | 2 +- .../api/authorization/v1/generated.pb.go | 8 +-- .../api/authorization/v1beta1/generated.pb.go | 8 +-- .../k8s.io/api/autoscaling/v1/generated.pb.go | 8 +-- .../v1/types_swagger_doc_generated.go | 8 +-- .../api/autoscaling/v2beta1/generated.pb.go | 16 ++---- .../v2beta1/types_swagger_doc_generated.go | 10 ++-- vendor/k8s.io/api/core/v1/generated.pb.go | 56 +++++++------------ .../core/v1/types_swagger_doc_generated.go | 38 ++++++------- .../api/extensions/v1beta1/generated.pb.go | 24 +++----- .../v1beta1/types_swagger_doc_generated.go | 2 +- .../k8s.io/api/networking/v1/generated.pb.go | 8 +-- .../k8s.io/api/policy/v1beta1/generated.pb.go | 24 +++----- .../rbac/v1/types_swagger_doc_generated.go | 2 +- .../v1alpha1/types_swagger_doc_generated.go | 2 +- .../v1beta1/types_swagger_doc_generated.go | 2 +- .../v1alpha1/types_swagger_doc_generated.go | 2 +- .../v1beta1/types_swagger_doc_generated.go | 2 +- .../k8s.io/apimachinery/pkg/api/meta/meta.go | 12 ++-- .../apimachinery/pkg/apis/meta/v1/meta.go | 4 +- .../client-go/tools/cache/shared_informer.go | 2 +- vendor/k8s.io/client-go/util/cert/cert.go | 4 +- .../client-gen/generators/client_generator.go | 24 ++++---- .../generators/generator_for_type.go | 4 +- .../cmd/informer-gen/generators/generic.go | 8 +-- .../cmd/informer-gen/generators/packages.go | 6 +- .../generators/versioninterface.go | 2 +- vendor/k8s.io/gengo/namer/plural_namer.go | 2 +- vendor/k8s.io/gengo/types/types.go | 4 +- 48 files changed, 201 insertions(+), 268 deletions(-) diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go index 7d6670ae0..6f4a902b5 100644 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go @@ -2264,7 +2264,7 @@ func (g *Generator) generateMessage(message *Descriptor) { of := oneofField{ fieldCommon: fieldCommon{ goName: fname, - getterName: "Get" + fname, + getterName: "Get"+fname, goType: dname, tags: tag, protoName: odp.GetName(), diff --git a/vendor/github.com/gregjones/httpcache/httpcache.go b/vendor/github.com/gregjones/httpcache/httpcache.go index 514ab73d4..f6a2ec4a5 100644 --- a/vendor/github.com/gregjones/httpcache/httpcache.go +++ b/vendor/github.com/gregjones/httpcache/httpcache.go @@ -420,10 +420,10 @@ func getEndToEndHeaders(respHeaders http.Header) []string { "Keep-Alive": struct{}{}, "Proxy-Authenticate": struct{}{}, "Proxy-Authorization": struct{}{}, - "Te": struct{}{}, - "Trailers": struct{}{}, - "Transfer-Encoding": struct{}{}, - "Upgrade": struct{}{}, + "Te": struct{}{}, + "Trailers": struct{}{}, + "Transfer-Encoding": struct{}{}, + "Upgrade": struct{}{}, } for _, extra := range strings.Split(respHeaders.Get("connection"), ",") { diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go index 74c707744..744cac01c 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go @@ -1,36 +1,37 @@ package simplelru + // LRUCache is the interface for simple LRU cache. type LRUCache interface { - // Adds a value to the cache, returns true if an eviction occurred and - // updates the "recently used"-ness of the key. - Add(key, value interface{}) bool + // Adds a value to the cache, returns true if an eviction occurred and + // updates the "recently used"-ness of the key. + Add(key, value interface{}) bool - // Returns key's value from the cache and - // updates the "recently used"-ness of the key. #value, isFound - Get(key interface{}) (value interface{}, ok bool) + // Returns key's value from the cache and + // updates the "recently used"-ness of the key. #value, isFound + Get(key interface{}) (value interface{}, ok bool) - // Check if a key exsists in cache without updating the recent-ness. - Contains(key interface{}) (ok bool) + // Check if a key exsists in cache without updating the recent-ness. + Contains(key interface{}) (ok bool) - // Returns key's value without updating the "recently used"-ness of the key. - Peek(key interface{}) (value interface{}, ok bool) + // Returns key's value without updating the "recently used"-ness of the key. + Peek(key interface{}) (value interface{}, ok bool) - // Removes a key from the cache. - Remove(key interface{}) bool + // Removes a key from the cache. + Remove(key interface{}) bool - // Removes the oldest entry from cache. - RemoveOldest() (interface{}, interface{}, bool) + // Removes the oldest entry from cache. + RemoveOldest() (interface{}, interface{}, bool) - // Returns the oldest entry from the cache. #key, value, isFound - GetOldest() (interface{}, interface{}, bool) + // Returns the oldest entry from the cache. #key, value, isFound + GetOldest() (interface{}, interface{}, bool) - // Returns a slice of the keys in the cache, from oldest to newest. - Keys() []interface{} + // Returns a slice of the keys in the cache, from oldest to newest. + Keys() []interface{} - // Returns the number of items in the cache. - Len() int + // Returns the number of items in the cache. + Len() int - // Clear all cache entries - Purge() + // Clear all cache entries + Purge() } diff --git a/vendor/github.com/modern-go/concurrent/log.go b/vendor/github.com/modern-go/concurrent/log.go index 4899eed02..9756fcc75 100644 --- a/vendor/github.com/modern-go/concurrent/log.go +++ b/vendor/github.com/modern-go/concurrent/log.go @@ -1,13 +1,13 @@ package concurrent import ( - "io/ioutil" - "log" "os" + "log" + "io/ioutil" ) // ErrorLogger is used to print out error, can be set to writer other than stderr var ErrorLogger = log.New(os.Stderr, "", 0) // InfoLogger is used to print informational message, default to off -var InfoLogger = log.New(ioutil.Discard, "", 0) +var InfoLogger = log.New(ioutil.Discard, "", 0) \ No newline at end of file diff --git a/vendor/github.com/modern-go/concurrent/unbounded_executor.go b/vendor/github.com/modern-go/concurrent/unbounded_executor.go index 5ea18eb7b..05a77dceb 100644 --- a/vendor/github.com/modern-go/concurrent/unbounded_executor.go +++ b/vendor/github.com/modern-go/concurrent/unbounded_executor.go @@ -3,11 +3,11 @@ package concurrent import ( "context" "fmt" - "reflect" "runtime" "runtime/debug" "sync" "time" + "reflect" ) // HandlePanic logs goroutine panic by default diff --git a/vendor/github.com/modern-go/reflect2/reflect2.go b/vendor/github.com/modern-go/reflect2/reflect2.go index 4fe9a5965..63b49c799 100644 --- a/vendor/github.com/modern-go/reflect2/reflect2.go +++ b/vendor/github.com/modern-go/reflect2/reflect2.go @@ -136,7 +136,7 @@ type frozenConfig struct { func (cfg Config) Froze() *frozenConfig { return &frozenConfig{ useSafeImplementation: cfg.UseSafeImplementation, - cache: concurrent.NewMap(), + cache: concurrent.NewMap(), } } @@ -291,8 +291,8 @@ func UnsafeCastString(str string) []byte { stringHeader := (*reflect.StringHeader)(unsafe.Pointer(&str)) sliceHeader := &reflect.SliceHeader{ Data: stringHeader.Data, - Cap: stringHeader.Len, - Len: stringHeader.Len, + Cap: stringHeader.Len, + Len: stringHeader.Len, } return *(*[]byte)(unsafe.Pointer(sliceHeader)) } diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go index 9f946da6f..4f17a3331 100644 --- a/vendor/golang.org/x/sys/windows/security_windows.go +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -149,7 +149,7 @@ const ( DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS = 0x22b DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS = 0x22c DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = 0x22d - DOMAIN_ALIAS_RID_MONITORING_USERS = 0x22e + DOMAIN_ALIAS_RID_MONITORING_USERS = 0X22e DOMAIN_ALIAS_RID_LOGGING_USERS = 0x22f DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS = 0x230 DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS = 0x231 diff --git a/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go b/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go index 58f4ec4db..89d3ea9c2 100644 --- a/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go +++ b/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go @@ -294,12 +294,10 @@ type GetDefaultGcsBucketNameRequest struct { XXX_unrecognized []byte `json:"-"` } -func (m *GetDefaultGcsBucketNameRequest) Reset() { *m = GetDefaultGcsBucketNameRequest{} } -func (m *GetDefaultGcsBucketNameRequest) String() string { return proto.CompactTextString(m) } -func (*GetDefaultGcsBucketNameRequest) ProtoMessage() {} -func (*GetDefaultGcsBucketNameRequest) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{10} -} +func (m *GetDefaultGcsBucketNameRequest) Reset() { *m = GetDefaultGcsBucketNameRequest{} } +func (m *GetDefaultGcsBucketNameRequest) String() string { return proto.CompactTextString(m) } +func (*GetDefaultGcsBucketNameRequest) ProtoMessage() {} +func (*GetDefaultGcsBucketNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } type GetDefaultGcsBucketNameResponse struct { DefaultGcsBucketName *string `protobuf:"bytes,1,opt,name=default_gcs_bucket_name,json=defaultGcsBucketName" json:"default_gcs_bucket_name,omitempty"` diff --git a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go index 94bc7bc99..393342c13 100644 --- a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go +++ b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go @@ -419,9 +419,7 @@ func (x *Query_Filter_Operator) UnmarshalJSON(data []byte) error { *x = Query_Filter_Operator(value) return nil } -func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{15, 0, 0} -} +func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{15, 0, 0} } type Query_Order_Direction int32 @@ -455,9 +453,7 @@ func (x *Query_Order_Direction) UnmarshalJSON(data []byte) error { *x = Query_Order_Direction(value) return nil } -func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{15, 1, 0} -} +func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{15, 1, 0} } type Error_ErrorCode int32 @@ -748,12 +744,10 @@ type PropertyValue_ReferenceValue struct { XXX_unrecognized []byte `json:"-"` } -func (m *PropertyValue_ReferenceValue) Reset() { *m = PropertyValue_ReferenceValue{} } -func (m *PropertyValue_ReferenceValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_ReferenceValue) ProtoMessage() {} -func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{1, 2} -} +func (m *PropertyValue_ReferenceValue) Reset() { *m = PropertyValue_ReferenceValue{} } +func (m *PropertyValue_ReferenceValue) String() string { return proto.CompactTextString(m) } +func (*PropertyValue_ReferenceValue) ProtoMessage() {} +func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 2} } func (m *PropertyValue_ReferenceValue) GetApp() string { if m != nil && m.App != nil { @@ -1841,12 +1835,10 @@ type CompiledQuery_MergeJoinScan struct { XXX_unrecognized []byte `json:"-"` } -func (m *CompiledQuery_MergeJoinScan) Reset() { *m = CompiledQuery_MergeJoinScan{} } -func (m *CompiledQuery_MergeJoinScan) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery_MergeJoinScan) ProtoMessage() {} -func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{16, 1} -} +func (m *CompiledQuery_MergeJoinScan) Reset() { *m = CompiledQuery_MergeJoinScan{} } +func (m *CompiledQuery_MergeJoinScan) String() string { return proto.CompactTextString(m) } +func (*CompiledQuery_MergeJoinScan) ProtoMessage() {} +func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16, 1} } const Default_CompiledQuery_MergeJoinScan_ValuePrefix bool = false diff --git a/vendor/google.golang.org/appengine/internal/log/log_service.pb.go b/vendor/google.golang.org/appengine/internal/log/log_service.pb.go index 2c6971193..5549605ad 100644 --- a/vendor/google.golang.org/appengine/internal/log/log_service.pb.go +++ b/vendor/google.golang.org/appengine/internal/log/log_service.pb.go @@ -75,9 +75,7 @@ func (x *LogServiceError_ErrorCode) UnmarshalJSON(data []byte) error { *x = LogServiceError_ErrorCode(value) return nil } -func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{0, 0} -} +func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } type LogServiceError struct { XXX_unrecognized []byte `json:"-"` diff --git a/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas/grafeas.pb.go b/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas/grafeas.pb.go index d9c853f66..a633f8bc9 100644 --- a/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas/grafeas.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas/grafeas.pb.go @@ -1569,10 +1569,8 @@ type GetVulnerabilityOccurrencesSummaryRequest struct { func (m *GetVulnerabilityOccurrencesSummaryRequest) Reset() { *m = GetVulnerabilityOccurrencesSummaryRequest{} } -func (m *GetVulnerabilityOccurrencesSummaryRequest) String() string { - return proto.CompactTextString(m) -} -func (*GetVulnerabilityOccurrencesSummaryRequest) ProtoMessage() {} +func (m *GetVulnerabilityOccurrencesSummaryRequest) String() string { return proto.CompactTextString(m) } +func (*GetVulnerabilityOccurrencesSummaryRequest) ProtoMessage() {} func (*GetVulnerabilityOccurrencesSummaryRequest) Descriptor() ([]byte, []int) { return fileDescriptor_5865e5de1898162a, []int{22} } diff --git a/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.pb.go b/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.pb.go index 2dfed7825..5b6526c69 100644 --- a/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/vulnerability/vulnerability.pb.go @@ -380,10 +380,8 @@ type Vulnerability_WindowsDetail_KnowledgeBase struct { func (m *Vulnerability_WindowsDetail_KnowledgeBase) Reset() { *m = Vulnerability_WindowsDetail_KnowledgeBase{} } -func (m *Vulnerability_WindowsDetail_KnowledgeBase) String() string { - return proto.CompactTextString(m) -} -func (*Vulnerability_WindowsDetail_KnowledgeBase) ProtoMessage() {} +func (m *Vulnerability_WindowsDetail_KnowledgeBase) String() string { return proto.CompactTextString(m) } +func (*Vulnerability_WindowsDetail_KnowledgeBase) ProtoMessage() {} func (*Vulnerability_WindowsDetail_KnowledgeBase) Descriptor() ([]byte, []int) { return fileDescriptor_2a1e5608ee0186b1, []int{0, 1, 0} } diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go index 718db50f8..014c72b3f 100644 --- a/vendor/google.golang.org/grpc/server.go +++ b/vendor/google.golang.org/grpc/server.go @@ -1099,11 +1099,11 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp } ctx := NewContextWithServerTransportStream(stream.Context(), stream) ss := &serverStream{ - ctx: ctx, - t: t, - s: stream, - p: &parser{r: stream}, - codec: s.getCodec(stream.ContentSubtype()), + ctx: ctx, + t: t, + s: stream, + p: &parser{r: stream}, + codec: s.getCodec(stream.ContentSubtype()), maxReceiveMessageSize: s.opts.maxReceiveMessageSize, maxSendMessageSize: s.opts.maxSendMessageSize, trInfo: trInfo, diff --git a/vendor/gopkg.in/yaml.v2/readerc.go b/vendor/gopkg.in/yaml.v2/readerc.go index b0c436c4a..7c1f5fac3 100644 --- a/vendor/gopkg.in/yaml.v2/readerc.go +++ b/vendor/gopkg.in/yaml.v2/readerc.go @@ -95,7 +95,7 @@ func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { // [Go] This function was changed to guarantee the requested length size at EOF. // The fact we need to do this is pretty awful, but the description above implies - // for that to be the case, and there are tests + // for that to be the case, and there are tests // If the EOF flag is set and the raw buffer is empty, do nothing. if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { diff --git a/vendor/gopkg.in/yaml.v2/resolve.go b/vendor/gopkg.in/yaml.v2/resolve.go index bf830eee5..6c151db6f 100644 --- a/vendor/gopkg.in/yaml.v2/resolve.go +++ b/vendor/gopkg.in/yaml.v2/resolve.go @@ -180,7 +180,7 @@ func resolve(tag string, in string) (rtag string, out interface{}) { return yaml_INT_TAG, uintv } } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt("-"+plain[3:], 2, 64) + intv, err := strconv.ParseInt("-" + plain[3:], 2, 64) if err == nil { if true || intv == int64(int(intv)) { return yaml_INT_TAG, int(intv) diff --git a/vendor/gopkg.in/yaml.v2/sorter.go b/vendor/gopkg.in/yaml.v2/sorter.go index 2edd73405..4c45e660a 100644 --- a/vendor/gopkg.in/yaml.v2/sorter.go +++ b/vendor/gopkg.in/yaml.v2/sorter.go @@ -52,7 +52,7 @@ func (l keyList) Less(i, j int) bool { var ai, bi int var an, bn int64 if ar[i] == '0' || br[i] == '0' { - for j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- { + for j := i-1; j >= 0 && unicode.IsDigit(ar[j]); j-- { if ar[j] != '0' { an = 1 bn = 1 diff --git a/vendor/k8s.io/api/apps/v1/generated.pb.go b/vendor/k8s.io/api/apps/v1/generated.pb.go index b62cd8626..1823a8440 100644 --- a/vendor/k8s.io/api/apps/v1/generated.pb.go +++ b/vendor/k8s.io/api/apps/v1/generated.pb.go @@ -110,11 +110,9 @@ func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } func (*DaemonSetStatus) ProtoMessage() {} func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } -func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } -func (*DaemonSetUpdateStrategy) ProtoMessage() {} -func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{7} -} +func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } +func (*DaemonSetUpdateStrategy) ProtoMessage() {} +func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} @@ -160,11 +158,9 @@ func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} func (*ReplicaSetStatus) ProtoMessage() {} func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } -func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } -func (*RollingUpdateDaemonSet) ProtoMessage() {} -func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{19} -} +func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } +func (*RollingUpdateDaemonSet) ProtoMessage() {} +func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} diff --git a/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go index 7e992c584..85fb159dd 100644 --- a/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go @@ -96,7 +96,7 @@ func (DaemonSetSpec) SwaggerDoc() map[string]string { } var map_DaemonSetStatus = map[string]string{ - "": "DaemonSetStatus represents the current status of a daemon set.", + "": "DaemonSetStatus represents the current status of a daemon set.", "currentNumberScheduled": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", "numberMisscheduled": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", "desiredNumberScheduled": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", diff --git a/vendor/k8s.io/api/apps/v1beta2/generated.pb.go b/vendor/k8s.io/api/apps/v1beta2/generated.pb.go index 686ef95ac..49f9f8771 100644 --- a/vendor/k8s.io/api/apps/v1beta2/generated.pb.go +++ b/vendor/k8s.io/api/apps/v1beta2/generated.pb.go @@ -115,11 +115,9 @@ func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } func (*DaemonSetStatus) ProtoMessage() {} func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } -func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } -func (*DaemonSetUpdateStrategy) ProtoMessage() {} -func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{7} -} +func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } +func (*DaemonSetUpdateStrategy) ProtoMessage() {} +func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} @@ -165,11 +163,9 @@ func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} func (*ReplicaSetStatus) ProtoMessage() {} func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } -func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } -func (*RollingUpdateDaemonSet) ProtoMessage() {} -func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{19} -} +func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } +func (*RollingUpdateDaemonSet) ProtoMessage() {} +func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} diff --git a/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go b/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go index f8229ceda..627df3ab7 100644 --- a/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go @@ -96,7 +96,7 @@ func (DaemonSetSpec) SwaggerDoc() map[string]string { } var map_DaemonSetStatus = map[string]string{ - "": "DaemonSetStatus represents the current status of a daemon set.", + "": "DaemonSetStatus represents the current status of a daemon set.", "currentNumberScheduled": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", "numberMisscheduled": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", "desiredNumberScheduled": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", diff --git a/vendor/k8s.io/api/authorization/v1/generated.pb.go b/vendor/k8s.io/api/authorization/v1/generated.pb.go index 3dfd901e3..508c58f1b 100644 --- a/vendor/k8s.io/api/authorization/v1/generated.pb.go +++ b/vendor/k8s.io/api/authorization/v1/generated.pb.go @@ -90,11 +90,9 @@ func (m *ResourceRule) Reset() { *m = ResourceRule{} } func (*ResourceRule) ProtoMessage() {} func (*ResourceRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } -func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } -func (*SelfSubjectAccessReview) ProtoMessage() {} -func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{6} -} +func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } +func (*SelfSubjectAccessReview) ProtoMessage() {} +func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} diff --git a/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go b/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go index 76e064e56..1f8abde4f 100644 --- a/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go @@ -90,11 +90,9 @@ func (m *ResourceRule) Reset() { *m = ResourceRule{} } func (*ResourceRule) ProtoMessage() {} func (*ResourceRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } -func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } -func (*SelfSubjectAccessReview) ProtoMessage() {} -func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{6} -} +func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } +func (*SelfSubjectAccessReview) ProtoMessage() {} +func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} diff --git a/vendor/k8s.io/api/autoscaling/v1/generated.pb.go b/vendor/k8s.io/api/autoscaling/v1/generated.pb.go index a27208639..84c40a9f4 100644 --- a/vendor/k8s.io/api/autoscaling/v1/generated.pb.go +++ b/vendor/k8s.io/api/autoscaling/v1/generated.pb.go @@ -86,11 +86,9 @@ func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricS func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } -func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -func (*HorizontalPodAutoscaler) ProtoMessage() {} -func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{3} -} +func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } +func (*HorizontalPodAutoscaler) ProtoMessage() {} +func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} diff --git a/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go index b34e46eb3..e84909269 100644 --- a/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go @@ -190,8 +190,8 @@ func (PodsMetricStatus) SwaggerDoc() map[string]string { } var map_ResourceMetricSource = map[string]string{ - "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", - "name": "name is the name of the resource in question.", + "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "name": "name is the name of the resource in question.", "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", "targetAverageValue": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", } @@ -201,8 +201,8 @@ func (ResourceMetricSource) SwaggerDoc() map[string]string { } var map_ResourceMetricStatus = map[string]string{ - "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - "name": "name is the name of the resource in question.", + "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "name": "name is the name of the resource in question.", "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", "currentAverageValue": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", } diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go b/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go index c82ec2aaa..467345d32 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go @@ -81,11 +81,9 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package -func (m *ContainerResourcePolicy) Reset() { *m = ContainerResourcePolicy{} } -func (*ContainerResourcePolicy) ProtoMessage() {} -func (*ContainerResourcePolicy) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{0} -} +func (m *ContainerResourcePolicy) Reset() { *m = ContainerResourcePolicy{} } +func (*ContainerResourcePolicy) ProtoMessage() {} +func (*ContainerResourcePolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} @@ -101,11 +99,9 @@ func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricS func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } -func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -func (*HorizontalPodAutoscaler) ProtoMessage() {} -func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{4} -} +func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } +func (*HorizontalPodAutoscaler) ProtoMessage() {} +func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go index ebee83870..fe67bb1b4 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go @@ -233,7 +233,7 @@ func (RecommendedContainerResources) SwaggerDoc() map[string]string { } var map_RecommendedPodResources = map[string]string{ - "": "RecommendedPodResources is the recommendation of resources computed by autoscaler. It contains a recommendation for each container in the pod (except for those with `ContainerScalingMode` set to 'Off').", + "": "RecommendedPodResources is the recommendation of resources computed by autoscaler. It contains a recommendation for each container in the pod (except for those with `ContainerScalingMode` set to 'Off').", "containerRecommendations": "Resources recommended by the autoscaler for each container.", } @@ -242,8 +242,8 @@ func (RecommendedPodResources) SwaggerDoc() map[string]string { } var map_ResourceMetricSource = map[string]string{ - "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", - "name": "name is the name of the resource in question.", + "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "name": "name is the name of the resource in question.", "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", "targetAverageValue": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", } @@ -253,8 +253,8 @@ func (ResourceMetricSource) SwaggerDoc() map[string]string { } var map_ResourceMetricStatus = map[string]string{ - "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - "name": "name is the name of the resource in question.", + "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "name": "name is the name of the resource in question.", "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", "currentAverageValue": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", } diff --git a/vendor/k8s.io/api/core/v1/generated.pb.go b/vendor/k8s.io/api/core/v1/generated.pb.go index 7dc000fe9..48b5a3c5b 100644 --- a/vendor/k8s.io/api/core/v1/generated.pb.go +++ b/vendor/k8s.io/api/core/v1/generated.pb.go @@ -674,11 +674,9 @@ func (m *PersistentVolume) Reset() { *m = PersistentVolume{} func (*PersistentVolume) ProtoMessage() {} func (*PersistentVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{99} } -func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } -func (*PersistentVolumeClaim) ProtoMessage() {} -func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{100} -} +func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } +func (*PersistentVolumeClaim) ProtoMessage() {} +func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{100} } func (m *PersistentVolumeClaimCondition) Reset() { *m = PersistentVolumeClaimCondition{} } func (*PersistentVolumeClaimCondition) ProtoMessage() {} @@ -780,11 +778,9 @@ func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } func (*PodLogOptions) ProtoMessage() {} func (*PodLogOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{121} } -func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } -func (*PodPortForwardOptions) ProtoMessage() {} -func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{122} -} +func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } +func (*PodPortForwardOptions) ProtoMessage() {} +func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{122} } func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } func (*PodProxyOptions) ProtoMessage() {} @@ -848,11 +844,9 @@ func (m *Probe) Reset() { *m = Probe{} } func (*Probe) ProtoMessage() {} func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} } -func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } -func (*ProjectedVolumeSource) ProtoMessage() {} -func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{138} -} +func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } +func (*ProjectedVolumeSource) ProtoMessage() {} +func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} } func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } func (*QuobyteVolumeSource) ProtoMessage() {} @@ -872,11 +866,9 @@ func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } func (*RangeAllocation) ProtoMessage() {} func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} } -func (m *ReplicationController) Reset() { *m = ReplicationController{} } -func (*ReplicationController) ProtoMessage() {} -func (*ReplicationController) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{143} -} +func (m *ReplicationController) Reset() { *m = ReplicationController{} } +func (*ReplicationController) ProtoMessage() {} +func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} } func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } func (*ReplicationControllerCondition) ProtoMessage() {} @@ -902,11 +894,9 @@ func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{147} } -func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } -func (*ResourceFieldSelector) ProtoMessage() {} -func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{148} -} +func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } +func (*ResourceFieldSelector) ProtoMessage() {} +func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} } func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } func (*ResourceQuota) ProtoMessage() {} @@ -1026,11 +1016,9 @@ func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } func (*ServiceStatus) ProtoMessage() {} func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{176} } -func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } -func (*SessionAffinityConfig) ProtoMessage() {} -func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{177} -} +func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } +func (*SessionAffinityConfig) ProtoMessage() {} +func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{177} } func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} } func (*StorageOSPersistentVolumeSource) ProtoMessage() {} @@ -1038,11 +1026,9 @@ func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{178} } -func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } -func (*StorageOSVolumeSource) ProtoMessage() {} -func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{179} -} +func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } +func (*StorageOSVolumeSource) ProtoMessage() {} +func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{179} } func (m *Sysctl) Reset() { *m = Sysctl{} } func (*Sysctl) ProtoMessage() {} diff --git a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go index e888b6edf..5b4e173db 100644 --- a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -1633,7 +1633,7 @@ func (PreferredSchedulingTerm) SwaggerDoc() map[string]string { } var map_Probe = map[string]string{ - "": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", + "": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", "initialDelaySeconds": "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "timeoutSeconds": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "periodSeconds": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", @@ -2197,7 +2197,7 @@ func (TopologySelectorLabelRequirement) SwaggerDoc() map[string]string { } var map_TopologySelectorTerm = map[string]string{ - "": "A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.", + "": "A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.", "matchLabelExpressions": "A list of topology selector requirements by labels.", } @@ -2270,23 +2270,23 @@ var map_VolumeSource = map[string]string{ "iscsi": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md", "glusterfs": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", "persistentVolumeClaim": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", - "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - "cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - "flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", - "downwardAPI": "DownwardAPI represents downward API about the pod that should populate this volume", - "fc": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - "azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - "configMap": "ConfigMap represents a configMap that should populate this volume", - "vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - "photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - "projected": "Items for all in one resources secrets, configmaps, and downward API", - "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", - "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - "storageos": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", + "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", + "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", + "downwardAPI": "DownwardAPI represents downward API about the pod that should populate this volume", + "fc": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + "azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "configMap": "ConfigMap represents a configMap that should populate this volume", + "vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "projected": "Items for all in one resources secrets, configmaps, and downward API", + "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "storageos": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", } func (VolumeSource) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go b/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go index 7e725b413..0604fb957 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go @@ -196,11 +196,9 @@ func (m *DeploymentStrategy) Reset() { *m = DeploymentStrateg func (*DeploymentStrategy) ProtoMessage() {} func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } -func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} } -func (*FSGroupStrategyOptions) ProtoMessage() {} -func (*FSGroupStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{19} -} +func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} } +func (*FSGroupStrategyOptions) ProtoMessage() {} +func (*FSGroupStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } func (*HTTPIngressPath) ProtoMessage() {} @@ -328,11 +326,9 @@ func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } func (*RollbackConfig) ProtoMessage() {} func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} } -func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } -func (*RollingUpdateDaemonSet) ProtoMessage() {} -func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{50} -} +func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } +func (*RollingUpdateDaemonSet) ProtoMessage() {} +func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} } func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} @@ -346,11 +342,9 @@ func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{52} } -func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } -func (*SELinuxStrategyOptions) ProtoMessage() {} -func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{53} -} +func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } +func (*SELinuxStrategyOptions) ProtoMessage() {} +func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{53} } func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} diff --git a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go index bb4e9943d..d261b4247 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go @@ -114,7 +114,7 @@ func (DaemonSetSpec) SwaggerDoc() map[string]string { } var map_DaemonSetStatus = map[string]string{ - "": "DaemonSetStatus represents the current status of a daemon set.", + "": "DaemonSetStatus represents the current status of a daemon set.", "currentNumberScheduled": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", "numberMisscheduled": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", "desiredNumberScheduled": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", diff --git a/vendor/k8s.io/api/networking/v1/generated.pb.go b/vendor/k8s.io/api/networking/v1/generated.pb.go index d9395c7b0..089d31963 100644 --- a/vendor/k8s.io/api/networking/v1/generated.pb.go +++ b/vendor/k8s.io/api/networking/v1/generated.pb.go @@ -70,11 +70,9 @@ func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } func (*NetworkPolicy) ProtoMessage() {} func (*NetworkPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } -func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } -func (*NetworkPolicyEgressRule) ProtoMessage() {} -func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{2} -} +func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } +func (*NetworkPolicyEgressRule) ProtoMessage() {} +func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } func (*NetworkPolicyIngressRule) ProtoMessage() {} diff --git a/vendor/k8s.io/api/policy/v1beta1/generated.pb.go b/vendor/k8s.io/api/policy/v1beta1/generated.pb.go index 9e2cbe71d..505fb0e03 100644 --- a/vendor/k8s.io/api/policy/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/policy/v1beta1/generated.pb.go @@ -99,17 +99,13 @@ func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBud func (*PodDisruptionBudget) ProtoMessage() {} func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } -func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } -func (*PodDisruptionBudgetList) ProtoMessage() {} -func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{7} -} +func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } +func (*PodDisruptionBudgetList) ProtoMessage() {} +func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } -func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } -func (*PodDisruptionBudgetSpec) ProtoMessage() {} -func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{8} -} +func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } +func (*PodDisruptionBudgetSpec) ProtoMessage() {} +func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } func (*PodDisruptionBudgetStatus) ProtoMessage() {} @@ -135,11 +131,9 @@ func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } -func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } -func (*SELinuxStrategyOptions) ProtoMessage() {} -func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{14} -} +func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } +func (*SELinuxStrategyOptions) ProtoMessage() {} +func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} } func (*SupplementalGroupsStrategyOptions) ProtoMessage() {} diff --git a/vendor/k8s.io/api/rbac/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/rbac/v1/types_swagger_doc_generated.go index 83ce310e6..0ec20c88e 100644 --- a/vendor/k8s.io/api/rbac/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/rbac/v1/types_swagger_doc_generated.go @@ -28,7 +28,7 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AggregationRule = map[string]string{ - "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", "clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", } diff --git a/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go index d7b194ae4..1d6ef30b0 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go @@ -28,7 +28,7 @@ package v1alpha1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AggregationRule = map[string]string{ - "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", "clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", } diff --git a/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go index c80327593..66dba6ca1 100644 --- a/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go @@ -28,7 +28,7 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AggregationRule = map[string]string{ - "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", "clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", } diff --git a/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go index 3701b0864..32d7dcc52 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go @@ -49,7 +49,7 @@ func (VolumeAttachmentList) SwaggerDoc() map[string]string { } var map_VolumeAttachmentSource = map[string]string{ - "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", "persistentVolumeName": "Name of the persistent volume to attach.", } diff --git a/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go index db37ac4fa..423e7f271 100644 --- a/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go @@ -75,7 +75,7 @@ func (VolumeAttachmentList) SwaggerDoc() map[string]string { } var map_VolumeAttachmentSource = map[string]string{ - "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", "persistentVolumeName": "Name of the persistent volume to attach.", } diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go index a55cf8a09..b9670071c 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go @@ -135,12 +135,12 @@ func AsPartialObjectMetadata(m metav1.Object) *metav1beta1.PartialObjectMetadata CreationTimestamp: m.GetCreationTimestamp(), DeletionTimestamp: m.GetDeletionTimestamp(), DeletionGracePeriodSeconds: m.GetDeletionGracePeriodSeconds(), - Labels: m.GetLabels(), - Annotations: m.GetAnnotations(), - OwnerReferences: m.GetOwnerReferences(), - Finalizers: m.GetFinalizers(), - ClusterName: m.GetClusterName(), - Initializers: m.GetInitializers(), + Labels: m.GetLabels(), + Annotations: m.GetAnnotations(), + OwnerReferences: m.GetOwnerReferences(), + Finalizers: m.GetFinalizers(), + ClusterName: m.GetClusterName(), + Initializers: m.GetInitializers(), }, } } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go index 6caf2c386..c13fe4af8 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go @@ -150,9 +150,7 @@ func (meta *ObjectMeta) GetDeletionTimestamp() *Time { return meta.DeletionTimes func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *Time) { meta.DeletionTimestamp = deletionTimestamp } -func (meta *ObjectMeta) GetDeletionGracePeriodSeconds() *int64 { - return meta.DeletionGracePeriodSeconds -} +func (meta *ObjectMeta) GetDeletionGracePeriodSeconds() *int64 { return meta.DeletionGracePeriodSeconds } func (meta *ObjectMeta) SetDeletionGracePeriodSeconds(deletionGracePeriodSeconds *int64) { meta.DeletionGracePeriodSeconds = deletionGracePeriodSeconds } diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/vendor/k8s.io/client-go/tools/cache/shared_informer.go index f29a4b331..5f8c507f9 100644 --- a/vendor/k8s.io/client-go/tools/cache/shared_informer.go +++ b/vendor/k8s.io/client-go/tools/cache/shared_informer.go @@ -86,7 +86,7 @@ func NewSharedIndexInformer(lw ListerWatcher, objType runtime.Object, defaultEve resyncCheckPeriod: defaultEventHandlerResyncPeriod, defaultEventHandlerResyncPeriod: defaultEventHandlerResyncPeriod, cacheMutationDetector: NewCacheMutationDetector(fmt.Sprintf("%T", objType)), - clock: realClock, + clock: realClock, } return sharedIndexInformer } diff --git a/vendor/k8s.io/client-go/util/cert/cert.go b/vendor/k8s.io/client-go/util/cert/cert.go index 7af1a5f30..fb7f5facc 100644 --- a/vendor/k8s.io/client-go/util/cert/cert.go +++ b/vendor/k8s.io/client-go/util/cert/cert.go @@ -72,7 +72,7 @@ func NewSelfSignedCACert(cfg Config, key *rsa.PrivateKey) (*x509.Certificate, er NotAfter: now.Add(duration365d * 10).UTC(), KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, BasicConstraintsValid: true, - IsCA: true, + IsCA: true, } certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &tmpl, &tmpl, key.Public(), key) @@ -153,7 +153,7 @@ func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, BasicConstraintsValid: true, - IsCA: true, + IsCA: true, } caDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &caTemplate, &caTemplate, &caKey.PublicKey, caKey) diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go index 335e995c0..74af0b31d 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go @@ -44,10 +44,10 @@ func NameSystems() namer.NameSystems { publicNamer := &ExceptionNamer{ Exceptions: map[string]string{ - // these exceptions are used to deconflict the generated code - // you can put your fully qualified package like - // to generate a name that doesn't conflict with your group. - // "k8s.io/apis/events/v1beta1.Event": "EventResource" + // these exceptions are used to deconflict the generated code + // you can put your fully qualified package like + // to generate a name that doesn't conflict with your group. + // "k8s.io/apis/events/v1beta1.Event": "EventResource" }, KeyFunc: func(t *types.Type) string { return t.Name.Package + "." + t.Name.Name @@ -56,10 +56,10 @@ func NameSystems() namer.NameSystems { } privateNamer := &ExceptionNamer{ Exceptions: map[string]string{ - // these exceptions are used to deconflict the generated code - // you can put your fully qualified package like - // to generate a name that doesn't conflict with your group. - // "k8s.io/apis/events/v1beta1.Event": "eventResource" + // these exceptions are used to deconflict the generated code + // you can put your fully qualified package like + // to generate a name that doesn't conflict with your group. + // "k8s.io/apis/events/v1beta1.Event": "eventResource" }, KeyFunc: func(t *types.Type) string { return t.Name.Package + "." + t.Name.Name @@ -68,10 +68,10 @@ func NameSystems() namer.NameSystems { } publicPluralNamer := &ExceptionNamer{ Exceptions: map[string]string{ - // these exceptions are used to deconflict the generated code - // you can put your fully qualified package like - // to generate a name that doesn't conflict with your group. - // "k8s.io/apis/events/v1beta1.Event": "EventResource" + // these exceptions are used to deconflict the generated code + // you can put your fully qualified package like + // to generate a name that doesn't conflict with your group. + // "k8s.io/apis/events/v1beta1.Event": "EventResource" }, KeyFunc: func(t *types.Type) string { return t.Name.Package + "." + t.Name.Name diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go index 96016a0ce..92e2a97f1 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go @@ -43,9 +43,7 @@ type genClientForType struct { var _ generator.Generator = &genClientForType{} // Filter ignores all but one type because we're making a single file per type. -func (g *genClientForType) Filter(c *generator.Context, t *types.Type) bool { - return t == g.typeToMatch -} +func (g *genClientForType) Filter(c *generator.Context, t *types.Type) bool { return t == g.typeToMatch } func (g *genClientForType) Namers(c *generator.Context) namer.NameSystems { return namer.NameSystems{ diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go index 6a7ca77d5..54632de05 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go @@ -73,11 +73,9 @@ type group struct { type groupSort []group -func (g groupSort) Len() int { return len(g) } -func (g groupSort) Less(i, j int) bool { - return strings.ToLower(g[i].Name) < strings.ToLower(g[j].Name) -} -func (g groupSort) Swap(i, j int) { g[i], g[j] = g[j], g[i] } +func (g groupSort) Len() int { return len(g) } +func (g groupSort) Less(i, j int) bool { return strings.ToLower(g[i].Name) < strings.ToLower(g[j].Name) } +func (g groupSort) Swap(i, j int) { g[i], g[j] = g[j], g[i] } type version struct { Name string diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go index 642f9a466..2cc0372f8 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go @@ -320,9 +320,9 @@ func versionPackage(basePackage string, groupPkgName string, gv clientgentypes.G DefaultGen: generator.DefaultGen{ OptionalName: "interface", }, - outputPackage: packagePath, - imports: generator.NewImportTracker(), - types: typesToGenerate, + outputPackage: packagePath, + imports: generator.NewImportTracker(), + types: typesToGenerate, internalInterfacesPackage: packageForInternalInterfaces(basePackage), }) diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go index f80350c5f..1cd27d5cd 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go @@ -63,7 +63,7 @@ func (g *versionInterfaceGenerator) GenerateType(c *generator.Context, t *types. m := map[string]interface{}{ "interfacesTweakListOptionsFunc": c.Universe.Type(types.Name{Package: g.internalInterfacesPackage, Name: "TweakListOptionsFunc"}), "interfacesSharedInformerFactory": c.Universe.Type(types.Name{Package: g.internalInterfacesPackage, Name: "SharedInformerFactory"}), - "types": g.types, + "types": g.types, } sw.Do(versionTemplate, m) diff --git a/vendor/k8s.io/gengo/namer/plural_namer.go b/vendor/k8s.io/gengo/namer/plural_namer.go index bfad02d6d..40bdcc6cc 100644 --- a/vendor/k8s.io/gengo/namer/plural_namer.go +++ b/vendor/k8s.io/gengo/namer/plural_namer.go @@ -87,7 +87,7 @@ func (r *pluralNamer) Name(t *types.Type) string { plural = sPlural(singular) } case 'f': - plural = vesPlural(singular) + plural = vesPlural(singular) default: plural = sPlural(singular) } diff --git a/vendor/k8s.io/gengo/types/types.go b/vendor/k8s.io/gengo/types/types.go index ec25248e7..aa3b7128e 100644 --- a/vendor/k8s.io/gengo/types/types.go +++ b/vendor/k8s.io/gengo/types/types.go @@ -51,10 +51,10 @@ func ParseFullyQualifiedName(fqn string) Name { cs := strings.Split(fqn, ".") pkg := "" if len(cs) > 1 { - pkg = strings.Join(cs[0:len(cs)-1], ".") + pkg = strings.Join(cs[0:len(cs) - 1], ".") } return Name{ - Name: cs[len(cs)-1], + Name: cs[len(cs) - 1], Package: pkg, } } From ddd21e6982f54dd6b1b3088354c23efdc740698d Mon Sep 17 00:00:00 2001 From: Trey Ridley Date: Wed, 29 Jul 2020 12:32:05 -0400 Subject: [PATCH 3/8] add tests --- pkg/attestlib/detached_signature_test.go | 44 +++++++++++++++++ pkg/attestlib/jwt.go | 17 +++---- pkg/attestlib/jwt_test.go | 61 +++++++++++++++++++++++- 3 files changed, 110 insertions(+), 12 deletions(-) diff --git a/pkg/attestlib/detached_signature_test.go b/pkg/attestlib/detached_signature_test.go index 222135bf2..a94904fe1 100644 --- a/pkg/attestlib/detached_signature_test.go +++ b/pkg/attestlib/detached_signature_test.go @@ -254,3 +254,47 @@ func TestVerifyDetached(t *testing.T) { }) } } + +func TestCreateDetachedSignature(t *testing.T) { + tcs := []struct { + name string + key []byte + alg SignatureAlgorithm + expectedError bool + }{ + { + name: "create rsa signature success", + key: []byte(rsa2048PrivateKey), + alg: RsaSignPkcs12048Sha256, + expectedError: false, + }, { + name: "create ecdsa signature success", + key: []byte(ec256PrivateKey), + alg: EcdsaP256Sha256, + expectedError: false, + }, { + name: "unknown singature algorithm", + key: []byte(rsa2048PrivateKey), + alg: UnknownSigningAlgorithm, + expectedError: true, + }, + } + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + privKey, err := parsePkixPrivateKeyPem(tc.key) + if err != nil { + t.Fatalf("failed to parse private key %v", err) + } + _, err = createDetachedSignature(privKey, []byte(payload), tc.alg) + if tc.expectedError { + if err == nil { + t.Errorf("createDetachedSignature(...)=nil, expected non-nil") + } + } else { + if err != nil { + t.Errorf("createDetachedSignature(...)=%v, expected nil", err) + } + } + }) + } +} diff --git a/pkg/attestlib/jwt.go b/pkg/attestlib/jwt.go index 4a7d1145e..5452c749f 100644 --- a/pkg/attestlib/jwt.go +++ b/pkg/attestlib/jwt.go @@ -89,22 +89,17 @@ func (s *jwtSigner) CreateAttestation(payload []byte) (*Attestation, error) { if err != nil { return nil, errors.Wrap(err, "error marshaling header") } - var headerBase64 []byte - base64.RawURLEncoding.Encode(headerBase64, headerJson) - headerDot := append(headerBase64, []byte(".")...) - var payloadBase64 []byte - base64.RawURLEncoding.Encode(payloadBase64, payload) - headerDotPayload := append(headerDot, payloadBase64...) - signature, err := createDetachedSignature(s.privateKey, headerDotPayload, s.signatureAlgorithm) + headerBase64 := base64.RawURLEncoding.EncodeToString(headerJson) + payloadBase64 := base64.RawURLEncoding.EncodeToString(payload) + signature, err := createDetachedSignature(s.privateKey, []byte(headerBase64+"."+payloadBase64), s.signatureAlgorithm) if err != nil { return nil, errors.Wrap(err, "error creating signature") } - var signatureBase64 []byte - base64.RawURLEncoding.Encode(signatureBase64, signature) - jwt := append(headerDotPayload, signatureBase64...) + signatureBase64 := base64.RawURLEncoding.EncodeToString(signature) + jwt := headerBase64 + "." + payloadBase64 + "." + signatureBase64 return &Attestation{ PublicKeyID: s.publicKeyID, - Signature: jwt, + Signature: []byte(jwt), SerializedPayload: payload, }, nil } diff --git a/pkg/attestlib/jwt_test.go b/pkg/attestlib/jwt_test.go index c5cd5ecff..5eabf268b 100644 --- a/pkg/attestlib/jwt_test.go +++ b/pkg/attestlib/jwt_test.go @@ -96,10 +96,69 @@ func TestVerifyJWT(t *testing.T) { } } else { if err != nil { - t.Errorf("Unexpected error: %e", err) + t.Errorf("Unexpected error: %v", err) } } }) } } + +func TestNewJwtSigner(t *testing.T) { + tcs := []struct { + name string + key []byte + publicKeyId string + alg SignatureAlgorithm + expectedError bool + }{ + { + name: "new jwt singer success", + key: []byte(rsa2048PrivateKey), + publicKeyId: "kid", + alg: RsaSignPkcs12048Sha256, + expectedError: false, + }, + { + name: "new jwt singer with no key id success", + key: []byte(rsa2048PrivateKey), + publicKeyId: "", + alg: RsaSignPkcs12048Sha256, + expectedError: false, + }, + { + name: "new jwt singer with bad key fails", + key: []byte("some-key"), + publicKeyId: "", + alg: RsaSignPkcs12048Sha256, + expectedError: true, + }, + } + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + _, err := NewJwtSigner(tc.key, tc.publicKeyId, tc.alg) + if tc.expectedError { + if err == nil { + t.Errorf("NewJwtSigner(...) = nil, expected non nil") + } + } else { + if err != nil { + t.Errorf("NewJwtSigner(...)=%v, expected nil", err) + } + } + }) + } +} + +func TestCreateJwtAttestation(t *testing.T) { + signer, err := NewJwtSigner([]byte(rsa2048PrivateKey), "kid", RsaSignPkcs12048Sha256) + if err != nil { + t.Fatalf("failed to create signer") + } + attestation, err := signer.CreateAttestation([]byte(payload)) + if err != nil { + t.Errorf("CreateAttestation(..) = %v, expected nil", err) + } else if attestation.PublicKeyID != "kid" { + t.Errorf("attestation.PublicKeyID = %v, expected kid", attestation.PublicKeyID) + } +} From 4a2807b12a247ec3f6d4979baf9710a56975a4e1 Mon Sep 17 00:00:00 2001 From: Trey Ridley Date: Mon, 3 Aug 2020 13:58:57 -0400 Subject: [PATCH 4/8] address comments 1 --- pkg/attestlib/detached_signature_test.go | 8 ++++---- pkg/attestlib/jwt.go | 15 +++++++-------- pkg/attestlib/jwt_test.go | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/pkg/attestlib/detached_signature_test.go b/pkg/attestlib/detached_signature_test.go index a94904fe1..150a01d10 100644 --- a/pkg/attestlib/detached_signature_test.go +++ b/pkg/attestlib/detached_signature_test.go @@ -244,11 +244,11 @@ func TestVerifyDetached(t *testing.T) { err := verifyDetached(decodedSig, tc.pubkey, tc.signingAlg, tc.payload) if tc.expectedError { if err == nil { - t.Errorf("verifyDetached(...)=nil, expected non-nil") + t.Errorf("verifyDetached(...) = nil, expected non-nil") } } else { if err != nil { - t.Errorf("verifyDetached(...)=%v, expected nil", err) + t.Errorf("verifyDetached(...) = %v, expected nil", err) } } }) @@ -288,11 +288,11 @@ func TestCreateDetachedSignature(t *testing.T) { _, err = createDetachedSignature(privKey, []byte(payload), tc.alg) if tc.expectedError { if err == nil { - t.Errorf("createDetachedSignature(...)=nil, expected non-nil") + t.Errorf("createDetachedSignature(...) = nil, expected non-nil") } } else { if err != nil { - t.Errorf("createDetachedSignature(...)=%v, expected nil", err) + t.Errorf("createDetachedSignature(...) = %v, expected nil", err) } } }) diff --git a/pkg/attestlib/jwt.go b/pkg/attestlib/jwt.go index 5452c749f..43ea9e07c 100644 --- a/pkg/attestlib/jwt.go +++ b/pkg/attestlib/jwt.go @@ -51,10 +51,10 @@ type jwtSigner struct { signatureAlgorithm SignatureAlgorithm } -// NewJwtSigner creates a Signer interface for JWT Attestations. `publicKeyID` -// is the ID of the public key that can verify the Attestation signature. -// TODO: Explain formatting of JWT private keys. -func NewJwtSigner(privateKey []byte, publicKeyID string, alg SignatureAlgorithm) (Signer, error) { +// NewJwtSigner creates a Signer interface for JWT Attestations. `privateKey` +// contains the PEM-encoded private key. `publicKeyID` is the ID of the public +// key that can verify the Attestation signature. In most cases, publicKeyID should be left empty and will be generated automatically. +func NewJwtSigner(privateKey []byte, alg SignatureAlgorithm, publicKeyID string) (Signer, error) { key, err := parsePkixPrivateKeyPem(privateKey) if err != nil { return nil, errors.Wrap(err, "error parsing private key") @@ -75,7 +75,7 @@ func NewJwtSigner(privateKey []byte, publicKeyID string, alg SignatureAlgorithm) } // CreateAttestation creates a signed JWT Attestation. See Signer for more details. -func (s *jwtSigner) CreateAttestation(payload []byte) (*Attestation, error) { +func (s *jwtSigner) CreateAttestation(jsonJwtBody []byte) (*Attestation, error) { type headerTemplate struct { typ, alg, kid string } @@ -90,8 +90,8 @@ func (s *jwtSigner) CreateAttestation(payload []byte) (*Attestation, error) { return nil, errors.Wrap(err, "error marshaling header") } headerBase64 := base64.RawURLEncoding.EncodeToString(headerJson) - payloadBase64 := base64.RawURLEncoding.EncodeToString(payload) - signature, err := createDetachedSignature(s.privateKey, []byte(headerBase64+"."+payloadBase64), s.signatureAlgorithm) + jsonJwtBodyBase64 := base64.RawURLEncoding.EncodeToString(jsonJwtBody) + signature, err := createDetachedSignature(s.privateKey, []byte(headerBase64+"."+jsonJwtBodyBase64), s.signatureAlgorithm) if err != nil { return nil, errors.Wrap(err, "error creating signature") } @@ -100,7 +100,6 @@ func (s *jwtSigner) CreateAttestation(payload []byte) (*Attestation, error) { return &Attestation{ PublicKeyID: s.publicKeyID, Signature: []byte(jwt), - SerializedPayload: payload, }, nil } diff --git a/pkg/attestlib/jwt_test.go b/pkg/attestlib/jwt_test.go index 5eabf268b..43e04633e 100644 --- a/pkg/attestlib/jwt_test.go +++ b/pkg/attestlib/jwt_test.go @@ -143,7 +143,7 @@ func TestNewJwtSigner(t *testing.T) { } } else { if err != nil { - t.Errorf("NewJwtSigner(...)=%v, expected nil", err) + t.Errorf("NewJwtSigner(...) = %v, expected nil", err) } } }) From 643fe9db0efb8c9c90a79a178abb8f3e205007a9 Mon Sep 17 00:00:00 2001 From: Trey Ridley Date: Mon, 3 Aug 2020 14:00:54 -0400 Subject: [PATCH 5/8] fix format --- pkg/attestlib/jwt.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/attestlib/jwt.go b/pkg/attestlib/jwt.go index 43ea9e07c..efb91b936 100644 --- a/pkg/attestlib/jwt.go +++ b/pkg/attestlib/jwt.go @@ -54,7 +54,7 @@ type jwtSigner struct { // NewJwtSigner creates a Signer interface for JWT Attestations. `privateKey` // contains the PEM-encoded private key. `publicKeyID` is the ID of the public // key that can verify the Attestation signature. In most cases, publicKeyID should be left empty and will be generated automatically. -func NewJwtSigner(privateKey []byte, alg SignatureAlgorithm, publicKeyID string) (Signer, error) { +func NewJwtSigner(privateKey []byte, alg SignatureAlgorithm, publicKeyID string) (Signer, error) { key, err := parsePkixPrivateKeyPem(privateKey) if err != nil { return nil, errors.Wrap(err, "error parsing private key") @@ -98,8 +98,8 @@ func (s *jwtSigner) CreateAttestation(jsonJwtBody []byte) (*Attestation, error) signatureBase64 := base64.RawURLEncoding.EncodeToString(signature) jwt := headerBase64 + "." + payloadBase64 + "." + signatureBase64 return &Attestation{ - PublicKeyID: s.publicKeyID, - Signature: []byte(jwt), + PublicKeyID: s.publicKeyID, + Signature: []byte(jwt), }, nil } From 5df156007c0867e4a76cb73c8c83ea0a214f17f0 Mon Sep 17 00:00:00 2001 From: Trey Ridley Date: Mon, 3 Aug 2020 14:03:53 -0400 Subject: [PATCH 6/8] fix small error --- pkg/attestlib/jwt.go | 2 +- pkg/attestlib/jwt_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/attestlib/jwt.go b/pkg/attestlib/jwt.go index efb91b936..64512ffd8 100644 --- a/pkg/attestlib/jwt.go +++ b/pkg/attestlib/jwt.go @@ -96,7 +96,7 @@ func (s *jwtSigner) CreateAttestation(jsonJwtBody []byte) (*Attestation, error) return nil, errors.Wrap(err, "error creating signature") } signatureBase64 := base64.RawURLEncoding.EncodeToString(signature) - jwt := headerBase64 + "." + payloadBase64 + "." + signatureBase64 + jwt := headerBase64 + "." + jsonJwtBodyBase64 + "." + signatureBase64 return &Attestation{ PublicKeyID: s.publicKeyID, Signature: []byte(jwt), diff --git a/pkg/attestlib/jwt_test.go b/pkg/attestlib/jwt_test.go index 43e04633e..39b2cc8bf 100644 --- a/pkg/attestlib/jwt_test.go +++ b/pkg/attestlib/jwt_test.go @@ -136,7 +136,7 @@ func TestNewJwtSigner(t *testing.T) { } for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { - _, err := NewJwtSigner(tc.key, tc.publicKeyId, tc.alg) + _, err := NewJwtSigner(tc.key, tc.alg, tc.publicKeyId) if tc.expectedError { if err == nil { t.Errorf("NewJwtSigner(...) = nil, expected non nil") @@ -151,7 +151,7 @@ func TestNewJwtSigner(t *testing.T) { } func TestCreateJwtAttestation(t *testing.T) { - signer, err := NewJwtSigner([]byte(rsa2048PrivateKey), "kid", RsaSignPkcs12048Sha256) + signer, err := NewJwtSigner([]byte(rsa2048PrivateKey), RsaSignPkcs12048Sha256, "kid") if err != nil { t.Fatalf("failed to create signer") } From f7a29dafa4a8701122487de425b0034b02562a73 Mon Sep 17 00:00:00 2001 From: Trey Ridley Date: Wed, 5 Aug 2020 09:58:26 -0400 Subject: [PATCH 7/8] address comments 2 --- pkg/attestlib/detached_signature_test.go | 19 +++++++++++++++---- pkg/attestlib/jwt.go | 2 ++ pkg/attestlib/jwt_test.go | 14 +++++++------- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/pkg/attestlib/detached_signature_test.go b/pkg/attestlib/detached_signature_test.go index 150a01d10..50e4d3425 100644 --- a/pkg/attestlib/detached_signature_test.go +++ b/pkg/attestlib/detached_signature_test.go @@ -244,11 +244,11 @@ func TestVerifyDetached(t *testing.T) { err := verifyDetached(decodedSig, tc.pubkey, tc.signingAlg, tc.payload) if tc.expectedError { if err == nil { - t.Errorf("verifyDetached(...) = nil, expected non-nil") + t.Errorf("verifyDetached(...)=nil, expected non-nil") } } else { if err != nil { - t.Errorf("verifyDetached(...) = %v, expected nil", err) + t.Errorf("verifyDetached(...)=%v, expected nil", err) } } }) @@ -272,6 +272,17 @@ func TestCreateDetachedSignature(t *testing.T) { key: []byte(ec256PrivateKey), alg: EcdsaP256Sha256, expectedError: false, + }, + { + name: "rsa key with ecdsa alg", + key: []byte(rsa2048PrivateKey), + alg: EcdsaP256Sha256, + expectedError: true, + },{ + name: "ecdsa key with rsa alg", + key: []byte(ec256PrivateKey), + alg: RsaSignPkcs12048Sha256, + expectedError: true, }, { name: "unknown singature algorithm", key: []byte(rsa2048PrivateKey), @@ -288,11 +299,11 @@ func TestCreateDetachedSignature(t *testing.T) { _, err = createDetachedSignature(privKey, []byte(payload), tc.alg) if tc.expectedError { if err == nil { - t.Errorf("createDetachedSignature(...) = nil, expected non-nil") + t.Errorf("createDetachedSignature(...)=nil, expected non-nil") } } else { if err != nil { - t.Errorf("createDetachedSignature(...) = %v, expected nil", err) + t.Errorf("createDetachedSignature(...)=%v, expected nil", err) } } }) diff --git a/pkg/attestlib/jwt.go b/pkg/attestlib/jwt.go index 64512ffd8..1b05d42fb 100644 --- a/pkg/attestlib/jwt.go +++ b/pkg/attestlib/jwt.go @@ -75,6 +75,8 @@ func NewJwtSigner(privateKey []byte, alg SignatureAlgorithm, publicKeyID string) } // CreateAttestation creates a signed JWT Attestation. See Signer for more details. +// jsonJwtBody is the second section in the JWT. This should contain the following claims: +// "sub" = container:digest:sha256:, "aud" : "//binaryauthorization.googleapis.com", "attestationType" : "claimless" func (s *jwtSigner) CreateAttestation(jsonJwtBody []byte) (*Attestation, error) { type headerTemplate struct { typ, alg, kid string diff --git a/pkg/attestlib/jwt_test.go b/pkg/attestlib/jwt_test.go index 39b2cc8bf..d32979859 100644 --- a/pkg/attestlib/jwt_test.go +++ b/pkg/attestlib/jwt_test.go @@ -113,21 +113,21 @@ func TestNewJwtSigner(t *testing.T) { expectedError bool }{ { - name: "new jwt singer success", + name: "new jwt signer success", key: []byte(rsa2048PrivateKey), publicKeyId: "kid", alg: RsaSignPkcs12048Sha256, expectedError: false, }, { - name: "new jwt singer with no key id success", + name: "new jwt signer with no key id success", key: []byte(rsa2048PrivateKey), publicKeyId: "", alg: RsaSignPkcs12048Sha256, expectedError: false, }, { - name: "new jwt singer with bad key fails", + name: "new jwt signer with bad key fails", key: []byte("some-key"), publicKeyId: "", alg: RsaSignPkcs12048Sha256, @@ -139,11 +139,11 @@ func TestNewJwtSigner(t *testing.T) { _, err := NewJwtSigner(tc.key, tc.alg, tc.publicKeyId) if tc.expectedError { if err == nil { - t.Errorf("NewJwtSigner(...) = nil, expected non nil") + t.Errorf("NewJwtSigner(...)=nil, expected non nil") } } else { if err != nil { - t.Errorf("NewJwtSigner(...) = %v, expected nil", err) + t.Errorf("NewJwtSigner(...)=%v, expected nil", err) } } }) @@ -157,8 +157,8 @@ func TestCreateJwtAttestation(t *testing.T) { } attestation, err := signer.CreateAttestation([]byte(payload)) if err != nil { - t.Errorf("CreateAttestation(..) = %v, expected nil", err) + t.Errorf("CreateAttestation(..)=%v, expected nil", err) } else if attestation.PublicKeyID != "kid" { - t.Errorf("attestation.PublicKeyID = %v, expected kid", attestation.PublicKeyID) + t.Errorf("attestation.PublicKeyID=%v, expected kid", attestation.PublicKeyID) } } From 13fbc748c5120fb4ad7d036ad602b5137af91f24 Mon Sep 17 00:00:00 2001 From: Trey Ridley Date: Wed, 5 Aug 2020 15:01:14 -0400 Subject: [PATCH 8/8] left off changes --- pkg/attestlib/detached_signature_test.go | 4 ++-- pkg/attestlib/jwt.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/attestlib/detached_signature_test.go b/pkg/attestlib/detached_signature_test.go index 50e4d3425..2b9811741 100644 --- a/pkg/attestlib/detached_signature_test.go +++ b/pkg/attestlib/detached_signature_test.go @@ -272,13 +272,13 @@ func TestCreateDetachedSignature(t *testing.T) { key: []byte(ec256PrivateKey), alg: EcdsaP256Sha256, expectedError: false, - }, + }, { name: "rsa key with ecdsa alg", key: []byte(rsa2048PrivateKey), alg: EcdsaP256Sha256, expectedError: true, - },{ + }, { name: "ecdsa key with rsa alg", key: []byte(ec256PrivateKey), alg: RsaSignPkcs12048Sha256, diff --git a/pkg/attestlib/jwt.go b/pkg/attestlib/jwt.go index 1b05d42fb..04d9cf125 100644 --- a/pkg/attestlib/jwt.go +++ b/pkg/attestlib/jwt.go @@ -75,7 +75,7 @@ func NewJwtSigner(privateKey []byte, alg SignatureAlgorithm, publicKeyID string) } // CreateAttestation creates a signed JWT Attestation. See Signer for more details. -// jsonJwtBody is the second section in the JWT. This should contain the following claims: +// jsonJwtBody is the second section in the JWT. This should contain the following claims: // "sub" = container:digest:sha256:, "aud" : "//binaryauthorization.googleapis.com", "attestationType" : "claimless" func (s *jwtSigner) CreateAttestation(jsonJwtBody []byte) (*Attestation, error) { type headerTemplate struct {