From aa8cdb2d1d1dd3541b18b4536e049f013952c8e1 Mon Sep 17 00:00:00 2001 From: Johannes Aubart Date: Tue, 5 Sep 2023 09:14:39 +0200 Subject: [PATCH] bump component-spec dependency (#812) * bump component-spec dependency (run-int-tests) * fix incompatible changes (run-int-tests) --- go.mod | 2 +- go.sum | 4 +- .../executions/template/template_test.go | 6 +- .../jsonschema/jsonschema_suite_test.go | 2 +- .../registry/components/cdutils/uri_test.go | 2 +- test/integration/core/registry.go | 4 +- .../apis/v2/componentdescriptor.go | 17 +-- .../bindings-go/apis/v2/jsonscheme/bindata.go | 100 ++++++++++-------- .../apis/v2/validation/validation.go | 7 +- .../bindings-go/oci/constants.go | 9 +- .../bindings-go/oci/manifest.go | 14 +-- .../component-spec/bindings-go/oci/resolve.go | 10 +- .../pkg/kubernetes/kubernetes.go | 23 ++++ vendor/modules.txt | 2 +- 14 files changed, 120 insertions(+), 82 deletions(-) diff --git a/go.mod b/go.mod index 2e41febd4..455df33e6 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/containerd/containerd v1.7.0 github.com/docker/cli v23.0.5+incompatible github.com/gardener/component-cli v0.44.0 - github.com/gardener/component-spec/bindings-go v0.0.66 + github.com/gardener/component-spec/bindings-go v0.0.95 github.com/gardener/image-vector v0.10.0 github.com/gardener/landscaper/apis v0.0.0-00010101000000-000000000000 github.com/gardener/landscaper/controller-utils v0.0.0-00010101000000-000000000000 diff --git a/go.sum b/go.sum index 504450f95..8372a670c 100644 --- a/go.sum +++ b/go.sum @@ -184,8 +184,8 @@ github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbS github.com/gardener/component-cli v0.44.0 h1:19w703QNyV0VRhoqbRv6NgibK/t6OZxoLqkBWO/JrFM= github.com/gardener/component-cli v0.44.0/go.mod h1:TMYFZYiopyvbgVzaMALgUcJvup3LP/qOl/NQpS7uvjM= github.com/gardener/component-spec/bindings-go v0.0.52/go.mod h1:kQFMTWowNAp9tOp6aImQa/NoLzfvX29jN5Qgud9rpQU= -github.com/gardener/component-spec/bindings-go v0.0.66 h1:FvtnnTxXJi2ZCC/GgijUNJCcwwdlZAiEWpZTtyHviz0= -github.com/gardener/component-spec/bindings-go v0.0.66/go.mod h1:qr7kADDXbXB0huul+ih/B43YkwyiMFYQepp/tqJ331c= +github.com/gardener/component-spec/bindings-go v0.0.95 h1:0h9ZRfWo0d84PkC/reVRXALJsOiyuwP0nsFdrOCWXtk= +github.com/gardener/component-spec/bindings-go v0.0.95/go.mod h1:qr7kADDXbXB0huul+ih/B43YkwyiMFYQepp/tqJ331c= github.com/gardener/image-vector v0.10.0 h1:Ysg3hxfiGUG/doajiZ0nQuUaJYwfO5BZCOcijL3tRuo= github.com/gardener/image-vector v0.10.0/go.mod h1:32SHGcbmmueeK9VkawsFcEbsoENXQPIuuYiFBUP+vMQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= diff --git a/pkg/landscaper/installations/executions/template/template_test.go b/pkg/landscaper/installations/executions/template/template_test.go index 95b785c56..12ee98e5a 100644 --- a/pkg/landscaper/installations/executions/template/template_test.go +++ b/pkg/landscaper/installations/executions/template/template_test.go @@ -198,7 +198,7 @@ func runTestSuite(testdataDir, sharedTestdataDir string) { Version: "1.0.0", }, RepositoryContexts: []*types.UnstructuredTypedObject{}, - Provider: cdv2.InternalProvider, + Provider: "internal", Resources: []types.Resource{ { IdentityObjectMeta: cdv2.IdentityObjectMeta{ @@ -250,7 +250,7 @@ func runTestSuite(testdataDir, sharedTestdataDir string) { Version: "1.0.0", }, RepositoryContexts: []*types.UnstructuredTypedObject{}, - Provider: cdv2.InternalProvider, + Provider: "internal", ComponentReferences: []types.ComponentReference{ { Name: "my-referenced-component", @@ -271,7 +271,7 @@ func runTestSuite(testdataDir, sharedTestdataDir string) { Version: "1.0.0", }, RepositoryContexts: []*types.UnstructuredTypedObject{}, - Provider: cdv2.InternalProvider, + Provider: "internal", Resources: []types.Resource{ { IdentityObjectMeta: cdv2.IdentityObjectMeta{ diff --git a/pkg/landscaper/jsonschema/jsonschema_suite_test.go b/pkg/landscaper/jsonschema/jsonschema_suite_test.go index 832cf24f7..2103bcb19 100644 --- a/pkg/landscaper/jsonschema/jsonschema_suite_test.go +++ b/pkg/landscaper/jsonschema/jsonschema_suite_test.go @@ -868,7 +868,7 @@ func buildAndUploadComponentDescriptorWithArtifacts(ctx context.Context, host, n cd.Name = name cd.Version = version - cd.Provider = cdv2.InternalProvider + cd.Provider = "internal" cd.ComponentReferences = cdRefs cd.Resources = cdRes repoCtx := cdv2.OCIRegistryRepository{ diff --git a/pkg/landscaper/registry/components/cdutils/uri_test.go b/pkg/landscaper/registry/components/cdutils/uri_test.go index 970c76c08..205ea6e3b 100644 --- a/pkg/landscaper/registry/components/cdutils/uri_test.go +++ b/pkg/landscaper/registry/components/cdutils/uri_test.go @@ -49,7 +49,7 @@ var _ = Describe("URI", func() { Version: "1.0.0", }, RepositoryContexts: repositoryContexts, - Provider: cdv2.ExternalProvider, + Provider: "external", ComponentReferences: []types.ComponentReference{ { Name: "comp1", diff --git a/test/integration/core/registry.go b/test/integration/core/registry.go index 8e3a5de60..7d4c3a4b7 100644 --- a/test/integration/core/registry.go +++ b/test/integration/core/registry.go @@ -509,7 +509,7 @@ func buildAndUploadNginxComponentDescriptorWithArtifacts(ctx context.Context, f ) cd.Name = name cd.Version = version - cd.Provider = cdv2.InternalProvider + cd.Provider = "internal" repoCtx := cdv2.OCIRegistryRepository{ ObjectType: cdv2.ObjectType{ Type: cdv2.OCIRegistryType, @@ -592,7 +592,7 @@ func buildAndUploadComponentDescriptorsWithBlueprints(ctx context.Context, f *fr cd := &cdv2.ComponentDescriptor{} cd.Name = cdd.name cd.Version = cdd.version - cd.Provider = cdv2.InternalProvider + cd.Provider = "internal" utils.ExpectNoError(cdv2.InjectRepositoryContext(cd, &repoCtx)) // add blueprint diff --git a/vendor/github.com/gardener/component-spec/bindings-go/apis/v2/componentdescriptor.go b/vendor/github.com/gardener/component-spec/bindings-go/apis/v2/componentdescriptor.go index 1620955e3..e9aaae1ec 100644 --- a/vendor/github.com/gardener/component-spec/bindings-go/apis/v2/componentdescriptor.go +++ b/vendor/github.com/gardener/component-spec/bindings-go/apis/v2/componentdescriptor.go @@ -33,21 +33,12 @@ type Metadata struct { Version string `json:"schemaVersion"` } -// ProviderType describes the provider type of component in the origin's context. -// Defines whether the component is created by a third party or internally. +// ProviderType describes the provider of component in the origin's context. +// For example the name of an organisation or company. // +k8s:deepcopy-gen=true // +k8s:openapi-gen=true type ProviderType string -const ( - // InternalProvider defines a internal provider type - // which describes a internally maintained component in the origin's context. - InternalProvider ProviderType = "internal" - // ExternalProvider defines a external provider type - // which describes a component maintained by a third party vendor in the origin's context. - ExternalProvider ProviderType = "external" -) - // ResourceRelation describes the type of a resource. // Defines whether the component is created by a third party or internally. // +k8s:deepcopy-gen=true @@ -93,6 +84,8 @@ type ComponentSpec struct { ComponentReferences []ComponentReference `json:"componentReferences"` // Resources defines all resources that are created by the component and by a third party. Resources []Resource `json:"resources"` + //CreationTime defines the datetime the component was created + CreationTime string `json:"creationTime,omitempty"` } // ObjectMeta defines a object that is uniquely identified by its name and version. @@ -481,7 +474,7 @@ const ( NoDigest = "NO-DIGEST" ) -//NewExcludeFromSignatureDigest returns the special digest notation to indicate the resource content should not be part of the signature +// NewExcludeFromSignatureDigest returns the special digest notation to indicate the resource content should not be part of the signature func NewExcludeFromSignatureDigest() *DigestSpec { return &DigestSpec{ HashAlgorithm: NoDigest, diff --git a/vendor/github.com/gardener/component-spec/bindings-go/apis/v2/jsonscheme/bindata.go b/vendor/github.com/gardener/component-spec/bindings-go/apis/v2/jsonscheme/bindata.go index 7cb2fbd93..1b1dbbd53 100644 --- a/vendor/github.com/gardener/component-spec/bindings-go/apis/v2/jsonscheme/bindata.go +++ b/vendor/github.com/gardener/component-spec/bindings-go/apis/v2/jsonscheme/bindata.go @@ -1,6 +1,7 @@ -// Code generated for package jsonscheme by go-bindata DO NOT EDIT. (@generated) +// Code generated by go-bindata. DO NOT EDIT. // sources: // ../../../../language-independent/component-descriptor-v2-schema.yaml + package jsonscheme import ( @@ -37,47 +38,45 @@ func bindataRead(data []byte, name string) ([]byte, error) { type asset struct { bytes []byte - info os.FileInfo + info fileInfoEx +} + +type fileInfoEx interface { + os.FileInfo + MD5Checksum() string } type bindataFileInfo struct { - name string - size int64 - mode os.FileMode - modTime time.Time + name string + size int64 + mode os.FileMode + modTime time.Time + md5checksum string } -// Name return file name func (fi bindataFileInfo) Name() string { return fi.name } - -// Size return file size func (fi bindataFileInfo) Size() int64 { return fi.size } - -// Mode return file mode func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode } - -// Mode return file modify time func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime } - -// IsDir return file whether a directory +func (fi bindataFileInfo) MD5Checksum() string { + return fi.md5checksum +} func (fi bindataFileInfo) IsDir() bool { - return fi.mode&os.ModeDir != 0 + return false } - -// Sys return file is sys mode func (fi bindataFileInfo) Sys() interface{} { return nil } -var _LanguageIndependentComponentDescriptorV2SchemaYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\xed\x6f\xdb\x36\x13\xff\xae\xbf\xe2\xd0\x04\xa0\xd3\x44\x76\x9a\xe7\x29\x1e\xd4\x5f\x82\x3c\x2d\x36\x14\x1b\x1a\x20\xed\xf6\x61\x89\x57\xd0\xd2\xd9\x66\x26\x91\x1e\x49\xb9\x51\x5f\xfe\xf7\x81\xa4\xa8\x17\xdb\x52\x94\x38\x4d\xb7\x62\x9f\x22\x92\x77\xbf\x3b\x1e\xef\x8d\x8c\xf7\x59\x3c\x06\xb2\xd0\x7a\xa9\xc6\xa3\xd1\x9c\xca\x18\x39\xca\x61\x94\x88\x2c\x1e\xa9\x68\x81\x29\x55\xa3\x48\xa4\x4b\xc1\x91\xeb\x30\x46\x15\x49\xb6\xd4\x42\x86\xab\x13\x12\xec\x3b\x8a\x1a\xc2\xb5\x12\x3c\x74\xb3\x43\x21\xe7\xa3\x58\xd2\x99\x0e\x8f\xff\x57\x60\xed\x91\xc0\x43\x30\xc1\xc7\x40\x7e\x2c\x24\xc2\x4b\x2f\x03\x5e\x95\x32\x60\x75\x02\x8e\xcf\xb0\xcd\x18\x67\x86\x4b\x8d\x03\x80\x14\x35\x35\x7f\x01\x74\xbe\xc4\x31\x10\x31\xbd\xc6\x48\x13\x3b\xd5\x14\x51\x6a\x0f\x95\xf6\x96\x3f\xa6\x9a\x3a\x06\x89\x7f\x66\x4c\x62\xec\x10\x01\x42\x20\x4e\xee\xaf\x28\x15\x13\xdc\x51\x2d\xa5\x58\xa2\xd4\x0c\x95\xa7\x6b\x10\xf9\xc9\x52\x25\xa5\x25\xe3\x73\x12\x04\x00\x09\x9d\x62\xd2\xaa\xef\x16\xf1\x9c\xa6\x48\xaa\xe1\x8a\x26\x19\x5a\xa4\x72\x37\x6f\x68\x8a\x0d\x44\x2f\xce\x4c\xa5\xf4\xe6\x67\xe4\x73\xbd\x18\xc3\xc9\xf3\xe7\x4e\x7b\xaa\x35\x4a\x63\x90\xdf\x2f\x69\xf8\xf1\x38\x7c\x31\xbc\x0a\x27\x87\x97\xc3\x89\x19\x4e\x3e\x9d\x1c\xfd\xf7\xcb\xe8\x32\x74\x4b\xa3\xf7\xc3\xc9\xd3\x7d\x2b\x90\xc5\xc8\x35\xd3\xf9\x99\xd6\x92\x4d\x33\x8d\x3f\x61\xee\xe4\xa6\x8c\x97\x42\x5a\x44\x4c\x06\x97\xe1\xfb\xc3\xe2\xfb\xa9\x9f\x3c\x38\x75\xd0\x12\x13\x7a\x83\xf1\x5b\x4c\x57\x28\x1d\xe6\x1e\x68\xfa\x07\x72\x98\x49\x91\x82\xb2\x0b\xc6\x8f\x80\xf2\x18\x68\x7c\x9d\x29\x8d\x31\x68\x01\x34\x49\xc4\x07\xa0\x1c\x84\x3d\x66\x9a\x40\x82\x34\x66\x7c\x0e\x64\x45\x8e\x20\xa5\xd7\x42\x86\x82\x27\xf9\x91\x65\xb5\xe3\x61\xca\x78\x31\xeb\x65\x2d\x98\x82\x14\x29\x57\xa0\x17\x08\x33\x61\x50\x0d\x88\xb3\xa5\x02\x2a\xd1\x88\x82\x15\x4d\x58\xdc\xd4\x57\x79\x85\x9f\x0d\x4f\x86\xff\xa9\x7f\x87\x33\x21\x0e\xa7\x54\x16\x73\xab\x3a\xc1\x6a\x1b\xc5\xb3\xe1\x89\xff\x2a\xc9\x6a\xf4\xe5\x67\x83\xad\x6e\xec\xd5\xe4\x74\x70\xfc\xf9\xf2\x59\xf8\x62\x72\x15\x3f\x3d\x18\x9c\x8e\xaf\x86\xf5\x89\x83\xd3\xed\x53\xe1\x60\x70\x3a\xae\x26\x3f\x5f\xc5\xf6\x8c\xce\xc2\xdf\xc2\xc9\xe5\x71\xf8\xc2\x7f\x7b\xc8\x9e\xc4\x07\x5e\xe2\xe1\xa0\xbe\x70\x68\x41\x1a\x33\x96\xb2\xc5\xcf\x5a\xc3\xa5\x88\xc3\xdc\x44\x80\x1a\xc3\x27\xd8\x97\x38\x1b\x03\xd9\x1b\xd5\x92\xc4\x68\x9b\xdf\x12\xf8\xe2\xfc\x6e\x29\x14\xd3\x42\xe6\x2f\x05\xd7\x78\xa3\xef\x12\x99\x53\xaa\xf0\x17\x99\xd4\x82\xd3\xf0\xb5\x65\x88\x82\xba\x35\x37\xd4\x26\xbb\x49\x00\x90\x67\xe9\x18\x2e\x89\x88\xd8\x05\xce\x99\xd2\x32\x27\x13\xb3\x1d\x1a\x45\xa8\x54\xcf\x6c\x68\x14\xb2\x54\x30\x13\xb2\x60\x45\x05\x03\x33\xc2\x1b\x8d\xdc\xa4\x32\x75\xd0\xba\x7d\xb7\xd9\x00\x60\xce\xf4\x22\x9b\x9e\x75\xcb\x6e\x05\x28\x87\xe6\x2c\x9a\xe6\x94\x38\x6b\xb3\xe6\x9d\xec\xe4\x14\x24\x93\x62\xa1\x10\x74\x0b\xbb\xf1\xa4\x6e\x8a\x48\xa4\x29\xd3\x5d\xc9\x9e\x0b\x8e\xbb\xd8\x65\xc7\x7d\xbf\x11\x1c\x9d\x63\x28\x91\xc9\x08\x5f\x95\x41\x71\x07\x75\x4c\xfd\x29\x07\x2b\x57\xe0\xca\xb1\x41\x28\x07\xce\x85\x5a\x14\xe7\x65\x91\xea\x50\xbc\x7f\xf8\x16\x2c\x78\xa3\x25\x7d\x5d\x10\x8c\xef\x88\xe3\x41\x56\xb7\x54\xed\x4e\xd4\x46\x25\xb8\x57\x14\xcf\x99\x2e\x5d\xd3\x76\x07\x6a\x83\x95\x4a\x49\xf3\x8a\x93\x69\x4c\x6b\x44\x2d\x9a\x59\x2c\xcf\x54\xcf\x0c\x76\xcc\xf3\xf3\x59\x1d\x22\xdc\x0e\xe2\xf8\xc8\xed\x84\xf5\x24\xd0\x83\xdc\x74\x89\x9e\xd8\xf8\xa7\x8c\x2e\x7c\xbc\xdd\x9a\xb8\xa8\x89\x4d\x94\xc8\x23\xb4\x0d\x00\x0c\xaa\xb6\x34\x11\x11\x4d\x0e\x0a\x7f\x6f\x0b\x22\xef\x09\x6f\x31\xc1\x48\x0b\x79\x5f\xc7\xf9\x0a\xa7\x55\xef\xeb\x2e\xfc\x2e\xef\x6b\x97\x12\xa9\x6f\x73\xd9\x68\x29\xeb\x4d\x67\x77\xf3\xbb\xa5\x13\x6d\xdd\xe7\x56\x11\x5d\xc9\x01\xf6\x80\x46\x3a\xa3\x49\x92\x8f\x2b\x49\xa1\x2d\x5c\x1f\x46\xa0\x96\x18\x31\x9a\x80\x44\x43\x1f\x59\x21\xdf\x5d\x3e\xf9\x3a\x8e\x26\xd1\x85\xc9\xbb\x32\x5b\xdd\xb1\x67\xf0\x00\xaa\xf7\xe5\xa5\xf0\x23\xd8\xb3\xfc\x36\x58\x2b\x94\xa3\xa2\x0b\xcf\x94\x86\x94\xea\x68\x51\x73\x60\xb5\x51\x7a\x36\xdb\x87\x84\xea\xd2\x49\xed\x54\x3d\x79\xfd\xb3\x2b\xd2\x83\x96\x1e\x97\x6c\x1f\xc8\x9d\x1c\x58\xd5\x34\xb9\x43\xe8\x5d\xfc\xac\x0b\x90\x23\x20\xa6\xe3\x94\x9c\x26\xdf\xbc\x14\xf6\x2c\x84\x2d\x64\x22\x62\xff\x4f\xc4\x46\x1d\x6c\xa1\xb6\xbb\xff\x81\x25\xa8\x72\xa5\x31\xbd\x2b\xe7\x79\x53\x58\x00\x20\x22\xf6\x3a\xa5\xf3\x9d\x9a\x4e\x3b\x64\x06\xa5\x2c\x40\x0f\xd2\x8d\x36\x6f\x2b\xc5\xf1\x35\xc4\x74\xb5\xd2\x0d\xc3\xf6\xdc\x58\x63\x5b\x21\x90\x84\xe6\x3e\x50\x76\xdb\x0b\x90\x42\x1d\x02\x93\x6d\xd7\x85\x66\xd2\x3c\x33\xca\x37\x6b\xb3\x5e\x20\xa4\x94\xb3\x19\x2a\x4d\xba\x85\xa6\x18\x33\xfa\xae\xa1\x5c\x13\xfe\x9d\xc1\x32\x44\x2e\x31\x8b\x99\x45\x77\x56\x71\x19\xd5\xf9\xae\xd3\x40\x81\x16\xb7\x48\x8c\xd9\x1c\x95\xee\x12\xe7\x28\xbc\x28\x4d\xe5\x1c\x35\xc6\x10\x99\x3b\x34\xbf\x6d\x43\x8a\x7d\xec\xdc\x8b\x59\x07\xc6\x61\x9a\x6b\x54\x5e\xc6\xd4\x18\x7b\x1d\x97\x67\xe9\xd4\x1c\x68\x00\xd0\x1a\x49\x3b\xc4\xc0\x8c\x25\x58\x15\xb0\x5d\x3d\x66\x8b\x86\x95\xf7\x78\x51\x6d\x76\xf1\xeb\x75\x73\x80\x5e\x50\x0d\x4c\xd9\xbd\x1b\xf3\x33\x6e\xd7\x9e\x98\x45\xf5\x04\x62\x26\x6d\x77\x9b\xb7\x9e\x87\xb7\xdb\xf9\x3d\x62\xeb\x91\x0c\x76\xbe\x1e\x67\xdd\xce\xd9\x74\x4c\x1b\xef\xf0\x81\xe9\x45\x61\x9a\x28\x93\x12\xb9\x86\x6d\x0f\xc1\x5d\x56\xf2\x69\xf5\xa2\x68\x55\x76\x79\xbf\xad\xb7\xd2\xdb\x8c\xf8\xfd\x34\x2d\x8f\x7b\x8d\xf6\x67\xf4\xf8\x0d\x44\x5b\x23\x50\xab\xc4\xd6\x8b\xaa\x3b\xef\x0e\x31\x96\xf9\x17\xb2\x1d\xab\xb1\x51\xa6\x34\x55\xd6\xf1\x1a\x16\x00\xcc\x91\xa3\x64\xd1\x37\x7c\xc9\x2a\x34\x70\x8f\x59\xc5\xe0\xdf\x60\xfc\xfb\x06\x63\x75\x5e\x6e\xfe\xdb\xc6\x62\xc3\x7f\x9b\x6f\x2c\xbd\x9f\x56\xee\xfc\x96\xb2\xe9\x5b\x1b\xff\x6c\x50\xb5\xc5\xa5\x14\x2b\x16\x57\xe6\x0e\x81\x34\x2e\xd7\xcd\xf7\x99\xb2\x65\x56\x0d\xfc\x06\xc7\x6d\xfe\xda\xff\x79\xe6\xe1\x9d\x69\xd3\x14\x0f\xe3\x1b\x1b\xb8\x1e\xc0\x9b\xb7\xb7\x07\x33\x5e\xdc\x47\x1f\xf5\x6e\x5a\x1c\xe0\x03\x5d\xcd\xd7\x1e\xfd\x6b\xff\xb7\x58\xf7\xa2\x87\x11\xb8\x09\x5c\x9d\xf7\x7d\x77\xb6\xf1\x50\xdd\x7a\x25\xae\x3f\x67\x91\x3e\x0c\xeb\x5d\x5d\x2f\xa6\xb5\xe2\x63\xb3\xc9\x76\x93\xc2\xa7\x2f\x41\x10\xac\xa5\x96\x7a\xde\x08\x81\xa4\xe8\x7e\x78\x50\x8f\x6d\x12\x34\x23\xb7\xfa\x81\xc3\x56\x85\x3c\xc4\x5a\x4a\xeb\x3e\x20\x12\xfc\x15\x00\x00\xff\xff\xe5\xaa\x66\x7c\xef\x21\x00\x00") +var _LanguageIndependentComponentDescriptorV2SchemaYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x1a\x4b\x6f\xe3\xb8\xf9\xee\x5f\xf1\x61\x13\x80\xce\x24\xb2\x13\x17\x7b\x18\x5f\x82\x74\x17\x2d\x16\x2d\x36\x40\x66\xda\x43\x13\x77\x40\x4b\x9f\x6d\xa6\x12\xe9\x92\x94\x13\xcd\xe3\xbf\x17\x24\x45\x3d\x6c\x49\x7e\x25\x99\x2e\x30\x73\x98\x88\xd4\xf7\x7e\x93\xf2\x29\x8b\xc6\x40\x16\x5a\x2f\xd5\x78\x38\x9c\x53\x19\x21\x47\x39\x08\x63\x91\x46\x43\x15\x2e\x30\xa1\x6a\x18\x8a\x64\x29\x38\x72\x1d\x44\xa8\x42\xc9\x96\x5a\xc8\x60\x35\x22\xbd\x53\x07\x51\xa1\xf0\xa8\x04\x0f\xdc\xee\x40\xc8\xf9\x30\x92\x74\xa6\x87\xa3\xcb\xd1\x65\x70\x35\xca\x09\x92\x9e\x27\xc3\x04\x1f\x03\xf9\x6b\xce\x15\x7e\xf1\x7c\xe0\xd7\x82\x0f\xac\x46\x50\xa2\xcd\x18\x67\x06\x4b\x8d\x7b\x00\x09\x6a\x6a\xfe\x02\xe8\x6c\x89\x63\x20\x62\xfa\x88\xa1\x26\x76\xab\xce\xa2\xd0\x00\x4a\x0d\x2c\x7e\x44\x35\x75\x08\x12\xff\x9b\x32\x89\x91\xa3\x08\x10\x00\x71\x7c\xff\x89\x52\x31\xc1\x1d\xd4\x52\x8a\x25\x4a\xcd\x50\x79\xb8\x1a\x90\xdf\x2c\x44\x52\x5a\x32\x3e\x27\xbd\x1e\x40\x4c\xa7\x18\xb7\xca\xdb\xc0\x9e\xd3\x04\x49\xb9\x5c\xd1\x38\x45\x4b\xa9\xd0\xe6\x77\x9a\x60\x8d\xa2\x67\x67\xb6\x12\xfa\xfc\x77\xe4\x73\xbd\x18\xc3\xe8\xe7\x9f\x9d\xf4\x54\x6b\x94\xc6\x20\xff\xbe\xa7\xc1\xe7\xcb\xe0\xfd\xe0\x21\x98\x9c\xdf\x0f\x26\x66\xe9\xfe\x3b\x1f\xde\x07\xee\xdd\xf0\xd3\x60\xf2\xee\xd4\x72\x64\x11\x72\xcd\x74\x76\xa3\xb5\x64\xd3\x54\xe3\xdf\x30\x73\x8c\x13\xc6\x0b\x2e\x2d\x3c\x26\xfd\xfb\xe0\xd3\x79\xfe\xfc\xce\x6f\x9e\x5d\x3b\xd2\x12\x63\xfa\x8c\xd1\x07\x4c\x56\x28\x1d\xcd\x13\xd0\xf4\x3f\xc8\x61\x26\x45\x02\xca\xbe\x30\xc1\x04\x94\x47\x40\xa3\xc7\x54\x69\x8c\x40\x0b\xa0\x71\x2c\x9e\x80\x72\x10\xd6\xcf\x34\x86\x18\x69\xc4\xf8\x1c\xc8\x8a\x5c\x40\x42\x1f\x85\x0c\x04\x8f\xb3\x0b\x8b\x6a\xd7\x83\x84\xf1\x7c\xd7\xf3\x5a\x30\x05\x09\x52\xae\x40\x2f\x10\x66\xc2\x50\x35\x44\x9c\x31\x15\x50\x89\x86\x15\xac\x68\xcc\xa2\xba\xbc\xca\x0b\x7c\x35\x18\x0d\xfe\x54\x7d\x0e\x66\x42\x9c\x4f\xa9\xcc\xf7\x56\x55\x80\x55\x13\xc4\xd5\x60\xe4\x9f\x0a\xb0\x0a\x7c\xf1\x58\x43\xab\x1a\x7b\x35\xb9\xee\x5f\x7e\xbd\xbf\x0a\xde\x4f\x1e\xa2\x77\x67\xfd\xeb\xf1\xc3\xa0\xba\x71\x76\xdd\xbc\x15\xf4\xfb\xd7\xe3\x72\xf3\xeb\x43\x64\x7d\x74\x13\xfc\x2b\x98\xdc\x5f\x06\xef\xfd\xb3\x27\xb9\x23\xf0\x99\xe7\x78\xde\xaf\xbe\x38\xb7\x44\x6a\x3b\x16\xf2\x94\x34\xc5\x71\x53\xe8\xb5\xa6\x50\x9e\x9b\x99\xc9\x0a\x35\x86\x2f\x70\x2a\x71\x36\x06\x72\x32\xac\x14\x8e\x61\x53\x28\x13\xf8\xe6\x42\x71\x29\x14\xd3\x42\x66\xbf\x08\xae\xf1\x59\xef\x93\xad\x06\xaa\xad\x46\x58\x0a\x1d\xa5\x41\x84\xec\xae\x99\x37\x8d\xe3\xdb\x59\xc9\xa5\x51\xa3\x0d\xb1\xcb\xa2\xb1\x2e\xa7\x95\x74\x4a\x15\xfe\x43\xc6\xa4\xd8\xdb\x14\xd8\xfc\xcb\xc1\xaa\x5b\x8d\x75\xa6\x49\xc5\x66\x35\x69\x18\xa2\x52\x3b\x96\x6c\xc3\xde\x42\xc1\x4c\xc8\x1c\x15\x15\xf4\xcd\x0a\x9f\x35\x72\x53\x6f\xd5\xd9\x16\x7f\xf4\x00\xe6\x4c\x2f\xd2\xe9\x4d\x37\xef\x4e\x87\xda\xa5\xb1\x72\xc5\x6a\x76\x67\x76\x90\xc3\xfd\x36\xf2\x34\x19\xc3\x3d\x71\x02\x92\x49\xfe\x22\x67\xb4\x05\xdd\x04\x42\x37\x44\x28\x92\x84\xe9\xae\xb0\xe3\x82\xe3\x31\x76\x39\x52\xef\xdf\x05\x47\x32\x31\x82\x28\x91\xca\x10\x7f\x2d\x62\x7a\x0f\x71\x4c\x93\x2c\x16\x2b\xd7\x85\x8b\xb5\xa1\x50\x2c\x5c\x08\xb5\x08\xce\x8b\x4e\xda\x21\xf8\xee\xf5\x24\x47\xc1\x67\x2d\xe9\x6f\x39\xc0\x78\x4f\x3a\x9e\xc8\x6a\x7d\xb4\x68\x29\x02\x95\xb6\x44\x0e\x0c\xc3\x22\x06\xed\xac\xa2\x36\x50\xa9\x94\x34\x2b\x31\x99\xc6\xa4\x56\x32\x1a\x25\xb3\xb4\x3c\x52\xb5\x04\xd8\x35\xcf\x6e\x67\x55\x12\x2d\x35\xce\xe1\x91\xed\x80\xd5\x6c\xdf\x01\xdc\xcc\xad\x1e\xb8\x07\x10\xb1\x39\x2a\xfd\x61\x89\xe1\x1e\x21\xb8\xa0\x6a\x71\x13\xcf\x85\x64\x7a\x91\x94\x81\x29\x64\x42\x63\xa6\xa8\x61\xb4\xf9\xda\x4e\x73\x2d\xc1\x58\x23\xb8\xee\x04\xe7\x3e\x1f\xb6\x8d\x4c\x3a\x51\x2c\xe3\x16\x08\x93\x8a\x6c\xce\xa9\x4e\x25\xee\x69\x04\xda\xa1\xa1\x59\x25\x18\x31\xfa\xd1\xe7\xe3\xa6\xce\xf4\x68\xe1\xdd\x56\xc1\xa7\x84\xaa\xf7\x95\x8f\x0b\x74\x40\xae\xb9\x88\x99\x9d\xfa\x0a\xb5\x21\x1f\xb3\xb7\xda\xe7\xd0\x1a\xe5\x42\xac\x58\x16\xf4\xf6\x28\x4c\x35\x85\x1d\xbd\x2d\xd5\xa1\x8c\x6b\xaf\xd9\x9a\x1e\xad\x98\xb5\x78\xb0\x39\xa2\x64\x78\xe7\x9b\xcf\xd6\x2e\x4e\x4d\xa3\x42\x89\x3c\x44\x3b\xb1\x43\xbf\x3c\x4c\xc6\x22\xa4\xf1\x59\x5e\xfc\xdb\x3a\x8a\x2f\x8b\x1f\x30\xc6\x50\x0b\x79\x68\x15\x7d\x85\x8a\x56\x3d\x89\xdd\x79\x2d\x0f\xb5\x4b\x41\x69\xd7\xe3\x60\xed\x10\x58\x3d\x26\x76\x1f\x57\x1b\xce\x8e\xad\x7a\x36\xb2\xe8\xea\x94\x70\x02\x34\xd4\x29\x8d\xe3\x6c\x5c\x72\x0a\x6c\xa2\x3d\x0d\x41\x2d\x31\x64\x34\x06\x89\x06\x3e\xb4\x4c\xfe\xb8\xcd\xf5\xd5\x7a\xe4\x7a\x46\x0b\x8e\xd5\x1e\x19\x78\x4e\x3c\x8d\x2b\x43\x7c\x4b\x83\xab\x66\xbe\x3d\xe2\xb8\x74\x2b\x2b\xe4\x9e\x83\xb8\x27\xa0\x76\xbe\xb6\xc8\xe3\x11\x4e\x2c\xbe\x4d\xfa\x92\xca\x45\x7e\xfc\x4e\x95\x86\x84\xea\x70\x51\x49\x04\xb5\x31\xcf\x6d\xce\xe4\xb1\xed\x7c\x95\xad\xea\xa0\xf0\x63\xcc\x2b\xb4\x72\x45\xfb\x85\xa2\xd5\x11\x2b\x4f\x22\xce\x09\x3b\x0f\x9a\x36\x04\xc8\x05\x10\x73\x8c\x93\x9c\xc6\xdf\x7d\xec\xdc\x71\xe8\x6c\x01\x13\x21\xfb\x73\x2c\x36\x66\xce\x16\x68\xab\xfd\x5f\x58\x8c\x2a\x53\x1a\x93\x7d\x31\x6f\x9b\x98\xbd\x66\xc5\x10\x21\xfb\x2d\xa1\xf3\xa3\x0e\x8a\x76\xc9\x0c\x95\xa2\x4f\xbe\xc8\x09\xd2\xde\x9b\xcc\x99\xd2\x32\x2b\x62\xa8\xce\x66\xcb\xad\x4b\x69\xca\x1d\x15\xab\xa9\x15\x00\x89\x69\xe6\xf3\xf0\x38\x5d\x80\xe4\xe2\x10\x28\x2f\x02\x66\x6d\x43\xec\x8d\x11\xbe\x3e\x42\x98\x29\x36\xa1\x9c\xcd\x50\xe9\xf5\xf1\x75\x8d\xe9\x81\x33\xb2\xb3\x8a\x2b\xd8\x2e\x35\x9c\x04\x0a\xb4\xd8\xc2\x71\x3d\x40\x37\xd9\x39\x08\xcf\x4a\x53\x39\x47\x8d\x11\x84\x82\xeb\x62\x28\x6a\x25\xaf\xd8\xe7\x4e\x5d\xcc\x7b\x60\x1c\xa6\x99\x46\xe5\x79\x4c\x8d\xb1\xd7\xe9\xf2\x34\x99\x1a\x87\xf6\x00\x5a\x13\xf5\x88\x1c\x98\xb1\x18\xcb\xfe\x78\x6c\xc4\x34\x48\x58\x46\x8f\x67\xd5\x66\x17\xff\xbe\x6a\x0e\xd0\x0b\xaa\x81\x29\xab\xbb\x31\x3f\xe3\xf6\xdd\x4f\xe6\xa5\xfa\x09\x22\x26\xed\x10\x9e\xb5\xfa\xc3\xdb\xed\xf6\x80\xdc\x7a\x23\x83\xdd\xae\xe7\x59\x77\x70\xd6\x03\xd3\xe6\x3b\x3c\x31\xbd\xc8\x4d\x13\xa6\x52\x22\xd7\xd0\xf4\x85\xa9\xcb\x4a\xbe\xac\xde\xe5\x93\xd0\x31\x1f\x86\xaa\x13\x7f\x93\x11\x7f\xcc\x44\xdb\xfb\x88\x75\xc6\xdb\x0f\x22\x6d\x03\x45\xa5\xe5\xbe\x45\x93\x2f\xaf\xc1\x8e\xc8\xd5\xd4\xdf\x8e\x1f\xd9\xd5\x8d\x30\x85\x27\xd2\x8e\x9b\xf0\x1e\xc0\x1c\x39\x4a\x16\x7e\xc7\x5b\xec\x5c\x02\x77\x91\x9d\x2f\x7e\x24\xf5\xff\x41\x52\x97\x8e\x71\xfb\xdf\x37\xa7\x6b\x81\xfa\x16\x29\x5d\x34\xa4\x9d\x6f\xa4\xf6\xbe\x82\xda\x8c\xd1\x8d\x4f\x91\xaa\xf2\x72\x29\xc5\x8a\x45\xa5\x37\x03\x20\xb5\xbb\x84\xfa\xb5\x56\x31\xc2\xab\x1a\xfd\x1a\xc6\xb6\xb8\xdf\xfd\x56\xeb\x88\xa0\xdc\xd4\x79\xef\x18\xdb\xf8\x0a\xd2\x75\xd6\xdc\xf8\x52\x4c\xe0\xc4\x8f\x21\x71\x76\x01\x4f\x08\x82\xc7\x59\xfe\xeb\x08\x3b\xad\x0b\xee\xef\x9f\xbd\x0f\xb6\x64\xd1\xab\xe5\x4a\xee\xbe\x17\xba\x87\x58\xfb\x6c\xe8\xf1\x1b\x62\xe8\x65\x18\x6e\x12\x2e\x83\xe0\x50\xcd\x76\xf7\x7d\xf5\xee\x8e\xec\x18\x2c\xb5\x19\x73\x27\xa4\xb5\x16\x66\x6b\x49\xb3\x49\xe1\xcb\xb7\x5e\xaf\xb7\x56\x58\xaa\x55\x23\x00\x92\xa0\xfb\x7d\x55\x35\xb3\x49\xaf\x9e\xb7\xe5\xef\xb8\x1a\x05\xf2\x24\xd6\x0a\x5a\xb7\x83\x48\xf5\x53\x4d\x7d\x30\xa8\x38\xa4\xe6\x8c\xee\xcf\x1f\xa4\xf7\xbf\x00\x00\x00\xff\xff\xbc\x3c\x49\xda\x2b\x27\x00\x00") func LanguageIndependentComponentDescriptorV2SchemaYamlBytes() ([]byte, error) { return bindataRead( @@ -92,8 +91,16 @@ func LanguageIndependentComponentDescriptorV2SchemaYaml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "../../../../language-independent/component-descriptor-v2-schema.yaml", size: 8687, mode: os.FileMode(420), modTime: time.Unix(1610727054, 0)} + info := bindataFileInfo{ + name: "../../../../language-independent/component-descriptor-v2-schema.yaml", + size: 10026, + md5checksum: "", + mode: os.FileMode(420), + modTime: time.Unix(1681220532, 0), + } + a := &asset{bytes: bytes, info: info} + return a, nil } @@ -109,11 +116,12 @@ func Asset(name string) ([]byte, error) { } return a.bytes, nil } - return nil, fmt.Errorf("Asset %s not found", name) + return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist} } // MustAsset is like Asset but panics when Asset would return an error. // It simplifies safe initialization of global variables. +// nolint: deadcode func MustAsset(name string) []byte { a, err := Asset(name) if err != nil { @@ -124,8 +132,7 @@ func MustAsset(name string) []byte { } // AssetInfo loads and returns the asset info for the given name. -// It returns an error if the asset could not be found or -// could not be loaded. +// It returns an error if the asset could not be found or could not be loaded. func AssetInfo(name string) (os.FileInfo, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { @@ -135,10 +142,11 @@ func AssetInfo(name string) (os.FileInfo, error) { } return a.info, nil } - return nil, fmt.Errorf("AssetInfo %s not found", name) + return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist} } // AssetNames returns the names of the assets. +// nolint: deadcode func AssetNames() []string { names := make([]string, 0, len(_bindata)) for name := range _bindata { @@ -156,11 +164,13 @@ var _bindata = map[string]func() (*asset, error){ // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the // following hierarchy: -// data/ -// foo.txt -// img/ -// a.png -// b.png +// +// data/ +// foo.txt +// img/ +// a.png +// b.png +// // then AssetDir("data") would return []string{"foo.txt", "img"} // AssetDir("data/img") would return []string{"a.png", "b.png"} // AssetDir("foo.txt") and AssetDir("notexist") would return an error @@ -173,12 +183,20 @@ func AssetDir(name string) ([]string, error) { for _, p := range pathList { node = node.Children[p] if node == nil { - return nil, fmt.Errorf("Asset %s not found", name) + return nil, &os.PathError{ + Op: "open", + Path: name, + Err: os.ErrNotExist, + } } } } if node.Func != nil { - return nil, fmt.Errorf("Asset %s not found", name) + return nil, &os.PathError{ + Op: "open", + Path: name, + Err: os.ErrNotExist, + } } rv := make([]string, 0, len(node.Children)) for childName := range node.Children { @@ -192,13 +210,13 @@ type bintree struct { Children map[string]*bintree } -var _bintree = &bintree{nil, map[string]*bintree{ - "..": &bintree{nil, map[string]*bintree{ - "..": &bintree{nil, map[string]*bintree{ - "..": &bintree{nil, map[string]*bintree{ - "..": &bintree{nil, map[string]*bintree{ - "language-independent": &bintree{nil, map[string]*bintree{ - "component-descriptor-v2-schema.yaml": &bintree{LanguageIndependentComponentDescriptorV2SchemaYaml, map[string]*bintree{}}, +var _bintree = &bintree{Func: nil, Children: map[string]*bintree{ + "..": {Func: nil, Children: map[string]*bintree{ + "..": {Func: nil, Children: map[string]*bintree{ + "..": {Func: nil, Children: map[string]*bintree{ + "..": {Func: nil, Children: map[string]*bintree{ + "language-independent": {Func: nil, Children: map[string]*bintree{ + "component-descriptor-v2-schema.yaml": {Func: LanguageIndependentComponentDescriptorV2SchemaYaml, Children: map[string]*bintree{}}, }}, }}, }}, @@ -224,11 +242,7 @@ func RestoreAsset(dir, name string) error { if err != nil { return err } - err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) - if err != nil { - return err - } - return nil + return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) } // RestoreAssets restores an asset under the given directory recursively diff --git a/vendor/github.com/gardener/component-spec/bindings-go/apis/v2/validation/validation.go b/vendor/github.com/gardener/component-spec/bindings-go/apis/v2/validation/validation.go index 426448936..451947c19 100644 --- a/vendor/github.com/gardener/component-spec/bindings-go/apis/v2/validation/validation.go +++ b/vendor/github.com/gardener/component-spec/bindings-go/apis/v2/validation/validation.go @@ -160,10 +160,7 @@ func ValidateResource(fldPath *field.Path, res v2.Resource) field.ErrorList { func validateProvider(fldPath *field.Path, provider v2.ProviderType) *field.Error { if len(provider) == 0 { - return field.Required(fldPath, "provider must be set and one of (internal, external)") - } - if provider != v2.InternalProvider && provider != v2.ExternalProvider { - return field.Invalid(fldPath, "unknown provider type", "provider must be one of (internal, external)") + return field.Required(fldPath, "provider must be set to a non-empty string") } return nil } @@ -209,7 +206,7 @@ func ValidateComponentReferences(fldPath *field.Path, refs []v2.ComponentReferen id := string(ref.GetIdentityDigest()) if _, ok := refIDs[id]; ok { - allErrs = append(allErrs, field.Duplicate(refPath, "duplicate component reference name")) + // allErrs = append(allErrs, field.Duplicate(refPath, "duplicate component reference name")) continue } refIDs[id] = struct{}{} diff --git a/vendor/github.com/gardener/component-spec/bindings-go/oci/constants.go b/vendor/github.com/gardener/component-spec/bindings-go/oci/constants.go index f647c51f5..416ee8068 100644 --- a/vendor/github.com/gardener/component-spec/bindings-go/oci/constants.go +++ b/vendor/github.com/gardener/component-spec/bindings-go/oci/constants.go @@ -14,6 +14,10 @@ package oci +// ComponentDescriptorTarMimeTypeOCM is the new OCM mimetype for component-descriptor-blobs +// that are stored as tar. +const ComponentDescriptorTarMimeTypeOCM = "application/vnd.ocm.software.component-descriptor.v2+yaml+tar" + // ComponentDescriptorTarMimeType is the old mimetype for component-descriptor-blobs // that are stored as tar. const ComponentDescriptorTarMimeType = "application/vnd.gardener.cloud.cnudie.component-descriptor.v2+yaml+tar" @@ -35,7 +39,10 @@ var ComponentDescriptorMimeType = []string{ ComponentDescriptorJSONMimeType, } -// ComponentDescriptorConfigMimeType is the mimetype for component-descriptor-oci-cfg-blobs. +// ComponentDescriptorConfigMimeType is the new OCM mimetype for component-descriptor-oci-cfg-blobs. +const ComponentDescriptorConfigMimeTypeOCM = "application/vnd.ocm.software.component.config.v1+json" + +// ComponentDescriptorConfigMimeType is the deprecated mimetype for component-descriptor-oci-cfg-blobs. const ComponentDescriptorConfigMimeType = "application/vnd.gardener.cloud.cnudie.component.config.v1+json" // ComponentDescriptorLegacyConfigMimeType is the mimetype for the legacy component-descriptor-oci-cfg-blobs diff --git a/vendor/github.com/gardener/component-spec/bindings-go/oci/manifest.go b/vendor/github.com/gardener/component-spec/bindings-go/oci/manifest.go index f04cc44ab..6c0e85440 100644 --- a/vendor/github.com/gardener/component-spec/bindings-go/oci/manifest.go +++ b/vendor/github.com/gardener/component-spec/bindings-go/oci/manifest.go @@ -41,8 +41,8 @@ type BlobStore interface { // ManifestBuilder converts a component descriptor with local defined blobs // into a oci component descriptor with blobs as layers of the component descriptor. type ManifestBuilder struct { - store BlobStore - archive *ctf.ComponentArchive + store BlobStore + archive *ctf.ComponentArchive componentDescriptorStorageType string } @@ -122,15 +122,15 @@ func (b *ManifestBuilder) addComponentDescriptorDesc() (ocispecv1.Descriptor, er return ocispecv1.Descriptor{}, fmt.Errorf("unable to add component descriptor layer to internal store: %w", err) } return componentDescriptorDesc, nil - } else if b.componentDescriptorStorageType == ComponentDescriptorTarMimeType { + } else if b.componentDescriptorStorageType == ComponentDescriptorTarMimeType || b.componentDescriptorStorageType == ComponentDescriptorTarMimeTypeOCM { // create tar with component descriptor var buf bytes.Buffer tw := tar.NewWriter(&buf) if err := tw.WriteHeader(&tar.Header{ - Typeflag: tar.TypeReg, - Name: ctf.ComponentDescriptorFileName, - Size: int64(len(data)), - ModTime: time.Now(), + Typeflag: tar.TypeReg, + Name: ctf.ComponentDescriptorFileName, + Size: int64(len(data)), + ModTime: time.Now(), }); err != nil { return ocispecv1.Descriptor{}, fmt.Errorf("unable to add component descriptor header: %w", err) } diff --git a/vendor/github.com/gardener/component-spec/bindings-go/oci/resolve.go b/vendor/github.com/gardener/component-spec/bindings-go/oci/resolve.go index 38ecf5bea..ca44b37d1 100644 --- a/vendor/github.com/gardener/component-spec/bindings-go/oci/resolve.go +++ b/vendor/github.com/gardener/component-spec/bindings-go/oci/resolve.go @@ -54,6 +54,10 @@ func OCIRef(repoCtx v2.OCIRegistryRepository, name, version string) (string, err // add dummy protocol to correctly parse the the url baseUrl = "http://" + baseUrl } + + if len(baseUrl) > 2048 { + return "", fmt.Errorf("baseUrl too long (>2048)") + } u, err := url.Parse(baseUrl) if err != nil { return "", err @@ -194,7 +198,7 @@ func (r *Resolver) resolve(ctx context.Context, repoCtx v2.Repository, name, ver componentDescriptorBytes := componentDescriptorLayerBytes.Bytes() switch componentDescriptorLayer.MediaType { - case ComponentDescriptorTarMimeType, LegacyComponentDescriptorTarMimeType: + case ComponentDescriptorTarMimeTypeOCM, ComponentDescriptorTarMimeType, LegacyComponentDescriptorTarMimeType: componentDescriptorBytes, err = ReadComponentDescriptorFromTar(&componentDescriptorLayerBytes) if err != nil { return nil, nil, fmt.Errorf("unable to read component descriptor from tar: %w", err) @@ -260,8 +264,8 @@ func (r *Resolver) ToComponentArchive(ctx context.Context, repoCtx v2.Repository func (r *Resolver) getComponentConfig(ctx context.Context, ref string, manifest *ocispecv1.Manifest) (*ComponentDescriptorConfig, error) { if manifest.Config.MediaType != ComponentDescriptorConfigMimeType && - manifest.Config.MediaType != ComponentDescriptorLegacyConfigMimeType { - return nil, fmt.Errorf("unknown component config type '%s' expected '%s'", manifest.Config.MediaType, ComponentDescriptorConfigMimeType) + manifest.Config.MediaType != ComponentDescriptorLegacyConfigMimeType && manifest.Config.MediaType != ComponentDescriptorConfigMimeTypeOCM { + return nil, fmt.Errorf("unknown component config type '%s' expected '%s' or '%s'", manifest.Config.MediaType, ComponentDescriptorConfigMimeType, ComponentDescriptorConfigMimeTypeOCM) } var data bytes.Buffer diff --git a/vendor/github.com/gardener/landscaper/controller-utils/pkg/kubernetes/kubernetes.go b/vendor/github.com/gardener/landscaper/controller-utils/pkg/kubernetes/kubernetes.go index 6a2691e85..58fb75890 100644 --- a/vendor/github.com/gardener/landscaper/controller-utils/pkg/kubernetes/kubernetes.go +++ b/vendor/github.com/gardener/landscaper/controller-utils/pkg/kubernetes/kubernetes.go @@ -361,6 +361,29 @@ func HasLabelWithValue(obj metav1.Object, lab string, value string) bool { return val == value } +// HasAnnotation checks if the objects has a annotation +func HasAnnotation(obj metav1.Object, ann string) bool { + annotations := obj.GetAnnotations() + if annotations == nil { + return false + } + _, ok := annotations[ann] + return ok +} + +// HasAnnotationWithValue checks if the objects has a annotation with a value +func HasAnnotationWithValue(obj metav1.Object, ann string, value string) bool { + annotations := obj.GetAnnotations() + if annotations == nil { + return false + } + val, ok := annotations[ann] + if !ok { + return false + } + return val == value +} + // ConvertToRawExtension converts a object to a raw extension. // The type of the object is automatically set given the scheme. func ConvertToRawExtension(from runtime.Object, scheme *runtime.Scheme) (*runtime.RawExtension, error) { diff --git a/vendor/modules.txt b/vendor/modules.txt index 382804bc2..012f98ebd 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -167,7 +167,7 @@ github.com/gardener/component-cli/pkg/commands/componentarchive/input github.com/gardener/component-cli/pkg/commands/constants github.com/gardener/component-cli/pkg/logcontext github.com/gardener/component-cli/pkg/utils -# github.com/gardener/component-spec/bindings-go v0.0.66 +# github.com/gardener/component-spec/bindings-go v0.0.95 ## explicit; go 1.18 github.com/gardener/component-spec/bindings-go/apis github.com/gardener/component-spec/bindings-go/apis/v2