diff --git a/api/v1alpha1/componentsubscription_types.go b/api/v1alpha1/componentsubscription_types.go index bbb96cd..a1249af 100644 --- a/api/v1alpha1/componentsubscription_types.go +++ b/api/v1alpha1/componentsubscription_types.go @@ -8,6 +8,7 @@ import ( "fmt" "time" + "github.com/open-component-model/ocm-controller/api/v1alpha1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -49,28 +50,7 @@ type ComponentSubscriptionSpec struct { // Verify specifies a list signatures that must be verified before a ComponentVersion // is replicated. // +optional - Verify []Signature `json:"verify,omitempty"` -} - -// Signature defines the details of a signature to use for verification. -type Signature struct { - // Name specifies the name of the signature. An OCM component may have multiple - // signatures. - Name string `json:"name"` - - // PublicKey provides a reference to a Kubernetes Secret that contains a public key - // which will be used to validate the named signature. - //+optional - PublicKey SecretRef `json:"publicKey,omitempty"` - - // PublicKeyBlob defines an inlined public key. - //+optional - PublicKeyBlob []byte `json:"publicKeyBlob,omitempty"` -} - -// SecretRef clearly denotes that the requested option is a Secret. -type SecretRef struct { - SecretRef v1.LocalObjectReference `json:"secretRef"` + Verify []v1alpha1.Signature `json:"verify,omitempty"` } // OCMRepository specifies access details for an OCI based OCM Repository. @@ -89,7 +69,7 @@ type ComponentSubscriptionStatus struct { // LastAttemptedVersion defines the latest version encountered while checking component versions. // This might be different from last applied version which should be the latest applied/replicated version. // The difference might be caused because of semver constraint or failures during replication. - //+optional + // +optional LastAttemptedVersion string `json:"lastAttemptedVersion,omitempty"` // ObservedGeneration is the last reconciled generation. @@ -97,16 +77,16 @@ type ComponentSubscriptionStatus struct { ObservedGeneration int64 `json:"observedGeneration,omitempty"` // LastAppliedVersion defines the final version that has been applied to the destination component version. - //+optional + // +optional LastAppliedVersion string `json:"lastAppliedVersion,omitempty"` // ReplicatedRepositoryURL defines the final location of the reconciled Component. - //+optional + // +optional ReplicatedRepositoryURL string `json:"replicatedRepositoryURL,omitempty"` // Signature defines a set of internal keys that were used to sign the Component once transferred to the Destination. - //+optional - Signature []Signature `json:"signature,omitempty"` + // +optional + Signature []v1alpha1.Signature `json:"signature,omitempty"` // Digest contains the digest of the subscription's spec. Digest uint64 `json:"specDigest,omitempty"` diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 8c30d7f..42905fc 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -10,6 +10,7 @@ package v1alpha1 import ( + apiv1alpha1 "github.com/open-component-model/ocm-controller/api/v1alpha1" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -102,7 +103,7 @@ func (in *ComponentSubscriptionSpec) DeepCopyInto(out *ComponentSubscriptionSpec out.Interval = in.Interval if in.Verify != nil { in, out := &in.Verify, &out.Verify - *out = make([]Signature, len(*in)) + *out = make([]apiv1alpha1.Signature, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -124,7 +125,7 @@ func (in *ComponentSubscriptionStatus) DeepCopyInto(out *ComponentSubscriptionSt *out = *in if in.Signature != nil { in, out := &in.Signature, &out.Signature - *out = make([]Signature, len(*in)) + *out = make([]apiv1alpha1.Signature, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -182,40 +183,3 @@ func (in *Registry) DeepCopy() *Registry { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretRef) DeepCopyInto(out *SecretRef) { - *out = *in - out.SecretRef = in.SecretRef -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef. -func (in *SecretRef) DeepCopy() *SecretRef { - if in == nil { - return nil - } - out := new(SecretRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Signature) DeepCopyInto(out *Signature) { - *out = *in - out.PublicKey = in.PublicKey - if in.PublicKeyBlob != nil { - in, out := &in.PublicKeyBlob, &out.PublicKeyBlob - *out = make([]byte, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Signature. -func (in *Signature) DeepCopy() *Signature { - if in == nil { - return nil - } - out := new(Signature) - in.DeepCopyInto(out) - return out -} diff --git a/config/crd/bases/delivery.ocm.software_componentsubscriptions.yaml b/config/crd/bases/delivery.ocm.software_componentsubscriptions.yaml index 9c9c2ec..508f5a0 100644 --- a/config/crd/bases/delivery.ocm.software_componentsubscriptions.yaml +++ b/config/crd/bases/delivery.ocm.software_componentsubscriptions.yaml @@ -114,13 +114,12 @@ spec: type: string publicKey: description: PublicKey provides a reference to a Kubernetes - Secret that contains a public key which will be used to validate - the named signature. + Secret of contain a blob of a public key that which will be + used to validate the named signature. properties: secretRef: - description: LocalObjectReference contains enough information - to let you locate the referenced object inside the same - namespace. + description: SecretRef is a reference to a Secret that contains + a public key. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -128,15 +127,15 @@ spec: type: string type: object x-kubernetes-map-type: atomic - required: - - secretRef + value: + description: Value defines a PEM/base64 encoded public key + value. + format: byte + type: string type: object - publicKeyBlob: - description: PublicKeyBlob defines an inlined public key. - format: byte - type: string required: - name + - publicKey type: object type: array required: @@ -248,13 +247,12 @@ spec: type: string publicKey: description: PublicKey provides a reference to a Kubernetes - Secret that contains a public key which will be used to validate - the named signature. + Secret of contain a blob of a public key that which will be + used to validate the named signature. properties: secretRef: - description: LocalObjectReference contains enough information - to let you locate the referenced object inside the same - namespace. + description: SecretRef is a reference to a Secret that contains + a public key. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -262,15 +260,15 @@ spec: type: string type: object x-kubernetes-map-type: atomic - required: - - secretRef + value: + description: Value defines a PEM/base64 encoded public key + value. + format: byte + type: string type: object - publicKeyBlob: - description: PublicKeyBlob defines an inlined public key. - format: byte - type: string required: - name + - publicKey type: object type: array specDigest: diff --git a/controllers/componentsubscription_controller.go b/controllers/componentsubscription_controller.go index 06f7018..dab73dc 100644 --- a/controllers/componentsubscription_controller.go +++ b/controllers/componentsubscription_controller.go @@ -15,6 +15,7 @@ import ( "github.com/fluxcd/pkg/runtime/patch" rreconcile "github.com/fluxcd/pkg/runtime/reconcile" "github.com/mitchellh/hashstructure/v2" + ocmv1alpha1 "github.com/open-component-model/ocm-controller/api/v1alpha1" "github.com/open-component-model/ocm-controller/pkg/status" ocm2 "github.com/open-component-model/ocm/pkg/contexts/ocm" "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc" @@ -318,10 +319,12 @@ func (r *ComponentSubscriptionReconciler) signMpasComponent( return fmt.Errorf("failed to sign destination component: %w", err) } - obj.Status.Signature = []v1alpha1.Signature{ + obj.Status.Signature = []ocmv1alpha1.Signature{ { - Name: v1alpha1.InternalSignatureName, - PublicKeyBlob: pub, + Name: v1alpha1.InternalSignatureName, + PublicKey: ocmv1alpha1.PublicKey{ + Value: pub, + }, }, } diff --git a/docs/release_notes/v0.12.0.md b/docs/release_notes/v0.12.0.md new file mode 100644 index 0000000..8f7d1c2 --- /dev/null +++ b/docs/release_notes/v0.12.0.md @@ -0,0 +1,3 @@ +# Release 0.12.0 + +- Using ocm-controller for signature tracking (#97) diff --git a/go.mod b/go.mod index 9eddcb3..9982d53 100644 --- a/go.mod +++ b/go.mod @@ -32,7 +32,7 @@ require ( github.com/go-logr/logr v1.3.0 github.com/mitchellh/hashstructure/v2 v2.0.2 github.com/open-component-model/ocm v0.4.0 - github.com/open-component-model/ocm-controller v0.16.1 + github.com/open-component-model/ocm-controller v0.18.0 github.com/stretchr/testify v1.8.4 k8s.io/api v0.28.1 k8s.io/apimachinery v0.28.1 @@ -135,7 +135,7 @@ require ( github.com/ghodss/yaml v1.0.0 // indirect github.com/go-chi/chi v4.1.2+incompatible // indirect github.com/go-errors/errors v1.4.2 // indirect - github.com/go-jose/go-jose/v3 v3.0.0 // indirect + github.com/go-jose/go-jose/v3 v3.0.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.2.4 // indirect github.com/go-openapi/analysis v0.21.4 // indirect @@ -159,7 +159,7 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/certificate-transparency-go v1.1.6 // indirect github.com/google/gnostic v0.6.9 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-containerregistry v0.16.1 // indirect github.com/google/go-github/v45 v45.2.0 // indirect github.com/google/go-github/v50 v50.2.0 // indirect @@ -212,9 +212,9 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 // indirect github.com/oklog/ulid v1.3.1 // indirect - github.com/onsi/gomega v1.27.10 // indirect + github.com/onsi/gomega v1.30.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc4 // indirect + github.com/opencontainers/image-spec v1.1.0-rc5 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pborman/uuid v1.2.1 // indirect github.com/pelletier/go-toml v1.9.5 // indirect @@ -274,7 +274,7 @@ require ( go.uber.org/zap v1.25.0 // indirect golang.org/x/crypto v0.15.0 // indirect golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect - golang.org/x/mod v0.11.0 // indirect + golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.18.0 // indirect golang.org/x/oauth2 v0.14.0 // indirect golang.org/x/sync v0.3.0 // indirect @@ -282,7 +282,7 @@ require ( golang.org/x/term v0.14.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.9.3 // indirect + golang.org/x/tools v0.12.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.138.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -307,5 +307,5 @@ require ( sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect sigs.k8s.io/release-utils v0.7.4 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index 6d78a9d..f8cc31b 100644 --- a/go.sum +++ b/go.sum @@ -620,8 +620,8 @@ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= -github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= +github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= +github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -811,8 +811,9 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= github.com/google/go-containerregistry v0.16.1 h1:rUEt426sR6nyrL3gt+18ibRcvYpKYdpsa5ZW7MA08dQ= github.com/google/go-containerregistry v0.16.1/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= @@ -1160,8 +1161,8 @@ github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47 github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -1175,12 +1176,12 @@ github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeR github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= +github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/open-component-model/ocm v0.4.0 h1:S+rPJGoDnSvxhBn3QS2HXURxugTjCM4XWEJLZSaH6Ek= github.com/open-component-model/ocm v0.4.0/go.mod h1:7RAqaUMmA4BlwW5ZEUBm8amWIb1TL9FhNigNXQ6wiu0= -github.com/open-component-model/ocm-controller v0.16.1 h1:Vr04cTivp/kBYktTwDMG4FgmpIS+DdgxX1QnBdBp/hA= -github.com/open-component-model/ocm-controller v0.16.1/go.mod h1:lYax3VEjWAZ7qEr90opJQl+qm/gO3wIeoz1WSEdje2c= +github.com/open-component-model/ocm-controller v0.18.0 h1:xyT3mvs0l43nBuYFsLxJWBqibtu1IX2WB6Aa7KJZnzo= +github.com/open-component-model/ocm-controller v0.18.0/go.mod h1:VRwUK7eo+PJYx/XXFo7NvdjW3TsLLdtA1JXdhZzNMCo= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -1190,8 +1191,8 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.1.0-rc4 h1:oOxKUJWnFC4YGHCCMNql1x4YaDfYBTS5Y4x/Cgeo1E0= -github.com/opencontainers/image-spec v1.1.0-rc4/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= @@ -1629,8 +1630,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1938,8 +1939,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2205,5 +2206,6 @@ sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6Lv sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/pkg/ocm/ocm_test.go b/pkg/ocm/ocm_test.go index e3b7567..507e342 100644 --- a/pkg/ocm/ocm_test.go +++ b/pkg/ocm/ocm_test.go @@ -17,6 +17,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" + ocmv1alpha1 "github.com/open-component-model/ocm-controller/api/v1alpha1" ocmcontext "github.com/open-component-model/ocm-controller/pkg/fakes" "github.com/open-component-model/ocm/pkg/contexts/credentials/cpi" "github.com/open-component-model/ocm/pkg/contexts/oci/identity" @@ -446,11 +447,11 @@ func TestClient_VerifyComponent(t *testing.T) { Source: v1alpha1.OCMRepository{ URL: "localhost", }, - Verify: []v1alpha1.Signature{ + Verify: []ocmv1alpha1.Signature{ { Name: Signature, - PublicKey: v1alpha1.SecretRef{ - SecretRef: corev1.LocalObjectReference{ + PublicKey: ocmv1alpha1.PublicKey{ + SecretRef: &corev1.LocalObjectReference{ Name: secretName, }, }, @@ -508,11 +509,11 @@ func TestClient_VerifyComponentDifferentPublicKey(t *testing.T) { Source: v1alpha1.OCMRepository{ URL: "localhost", }, - Verify: []v1alpha1.Signature{ + Verify: []ocmv1alpha1.Signature{ { Name: Signature, - PublicKey: v1alpha1.SecretRef{ - SecretRef: corev1.LocalObjectReference{ + PublicKey: ocmv1alpha1.PublicKey{ + SecretRef: &corev1.LocalObjectReference{ Name: secretName, }, }, diff --git a/pkg/version/release.go b/pkg/version/release.go index b919888..df92b12 100644 --- a/pkg/version/release.go +++ b/pkg/version/release.go @@ -5,7 +5,7 @@ package version // ReleaseVersion is the version number in semver format "vX.Y.Z", prefixed with "v". -var ReleaseVersion = "v0.11.0" +var ReleaseVersion = "v0.12.0" // ReleaseCandidate is the release candidate ID in format "rc.X", which will be appended to the release version. var ReleaseCandidate = "rc.1"