Skip to content

Commit 41dc93d

Browse files
Merge pull request #474 from juliocamarero/fix_crd_validation
Fix crd validation: Key should not be required anymore in bundle source resources
2 parents 68fec39 + 18ba82c commit 41dc93d

9 files changed

Lines changed: 48 additions & 53 deletions

File tree

‎deploy/charts/trust-manager/templates/crd-trust.cert-manager.io_bundles.yaml‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ spec:
8181
This field must not be true when `Key` is set.
8282
type: boolean
8383
key:
84-
description: Key is the key of the entry in the object's `data` field to be used.
84+
description: Key of the entry in the object's `data` field to be used.
8585
type: string
8686
name:
8787
description: |-
@@ -134,8 +134,6 @@ spec:
134134
type: object
135135
type: object
136136
x-kubernetes-map-type: atomic
137-
required:
138-
- key
139137
type: object
140138
inLine:
141139
description: InLine is a simple string to append as the source data.
@@ -151,7 +149,7 @@ spec:
151149
This field must not be true when `Key` is set.
152150
type: boolean
153151
key:
154-
description: Key is the key of the entry in the object's `data` field to be used.
152+
description: Key of the entry in the object's `data` field to be used.
155153
type: string
156154
name:
157155
description: |-
@@ -204,8 +202,6 @@ spec:
204202
type: object
205203
type: object
206204
x-kubernetes-map-type: atomic
207-
required:
208-
- key
209205
type: object
210206
useDefaultCAs:
211207
description: |-

‎docs/api/api.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,9 +633,9 @@ type SourceObjectKeySelector struct {
633633
//+optional
634634
Selector *metav1.LabelSelector `json:"selector,omitempty"`
635635

636-
// KeySelector is the key of the entry in the objects' `data` field to be referenced.
636+
// Key of the entry in the object's `data` field to be used.
637637
//+optional
638-
KeySelector `json:",inline,omitempty"`
638+
Key string `json:"key,omitempty"`
639639

640640
// IncludeAllKeys is a flag to include all keys in the object's `data` field to be used. False by default.
641641
// This field must not be true when `Key` is set.
@@ -645,7 +645,7 @@ type SourceObjectKeySelector struct {
645645
```
646646

647647
<a name="SourceObjectKeySelector.DeepCopy"></a>
648-
### func \(\*SourceObjectKeySelector\) [DeepCopy](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/zz_generated.deepcopy.go#L339>)
648+
### func \(\*SourceObjectKeySelector\) [DeepCopy](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/zz_generated.deepcopy.go#L338>)
649649

650650
```go
651651
func (in *SourceObjectKeySelector) DeepCopy() *SourceObjectKeySelector

‎pkg/apis/trust/v1alpha1/types_bundle.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ type SourceObjectKeySelector struct {
169169
//+optional
170170
Selector *metav1.LabelSelector `json:"selector,omitempty"`
171171

172-
// KeySelector is the key of the entry in the objects' `data` field to be referenced.
172+
// Key of the entry in the object's `data` field to be used.
173173
//+optional
174-
KeySelector `json:",inline,omitempty"`
174+
Key string `json:"key,omitempty"`
175175

176176
// IncludeAllKeys is a flag to include all keys in the object's `data` field to be used. False by default.
177177
// This field must not be true when `Key` is set.

‎pkg/apis/trust/v1alpha1/zz_generated.deepcopy.go‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pkg/bundle/bundle_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ func Test_Reconcile(t *testing.T) {
113113
},
114114
Spec: trustapi.BundleSpec{
115115
Sources: []trustapi.BundleSource{
116-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: sourceConfigMapName, KeySelector: trustapi.KeySelector{Key: sourceConfigMapKey}}},
117-
{Secret: &trustapi.SourceObjectKeySelector{Name: sourceSecretName, KeySelector: trustapi.KeySelector{Key: sourceSecretKey}}},
116+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: sourceConfigMapName, Key: sourceConfigMapKey}},
117+
{Secret: &trustapi.SourceObjectKeySelector{Name: sourceSecretName, Key: sourceSecretKey}},
118118
{InLine: ptr.To(dummy.TestCertificate3)},
119119
},
120120
Target: trustapi.BundleTarget{ConfigMap: &trustapi.KeySelector{Key: targetKey}},

‎pkg/bundle/source_test.go‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func Test_buildSourceBundle(t *testing.T) {
8383
},
8484
"if single ConfigMap source which doesn't exist, return notFoundError": {
8585
sources: []trustapi.BundleSource{
86-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", KeySelector: trustapi.KeySelector{Key: "key"}}},
86+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", Key: "key"}},
8787
},
8888
objects: []runtime.Object{},
8989
expData: "",
@@ -92,7 +92,7 @@ func Test_buildSourceBundle(t *testing.T) {
9292
},
9393
"if single ConfigMap source whose key doesn't exist, return notFoundError": {
9494
sources: []trustapi.BundleSource{
95-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", KeySelector: trustapi.KeySelector{Key: "key"}}},
95+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", Key: "key"}},
9696
},
9797
objects: []runtime.Object{&corev1.ConfigMap{ObjectMeta: metav1.ObjectMeta{Name: "configmap"}}},
9898
expData: "",
@@ -101,7 +101,7 @@ func Test_buildSourceBundle(t *testing.T) {
101101
},
102102
"if single ConfigMap source referencing single key, return data": {
103103
sources: []trustapi.BundleSource{
104-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", KeySelector: trustapi.KeySelector{Key: "key"}}},
104+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", Key: "key"}},
105105
},
106106
objects: []runtime.Object{&corev1.ConfigMap{
107107
ObjectMeta: metav1.ObjectMeta{Name: "configmap"},
@@ -126,7 +126,7 @@ func Test_buildSourceBundle(t *testing.T) {
126126
"if single ConfigMap source, return data even when order changes": {
127127
// Test uses the same data as the previous one but with different order
128128
sources: []trustapi.BundleSource{
129-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", KeySelector: trustapi.KeySelector{Key: "key"}}},
129+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", Key: "key"}},
130130
},
131131
objects: []runtime.Object{&corev1.ConfigMap{
132132
ObjectMeta: metav1.ObjectMeta{Name: "configmap"},
@@ -138,7 +138,7 @@ func Test_buildSourceBundle(t *testing.T) {
138138
},
139139
"if selects no ConfigMap sources, should return an error": {
140140
sources: []trustapi.BundleSource{
141-
{ConfigMap: &trustapi.SourceObjectKeySelector{KeySelector: trustapi.KeySelector{Key: "key"}, Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"selects-nothing": "true"}}}},
141+
{ConfigMap: &trustapi.SourceObjectKeySelector{Key: "key", Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"selects-nothing": "true"}}}},
142142
},
143143
objects: []runtime.Object{},
144144
expData: "",
@@ -147,8 +147,8 @@ func Test_buildSourceBundle(t *testing.T) {
147147
},
148148
"if selects at least one ConfigMap source, return data": {
149149
sources: []trustapi.BundleSource{
150-
{ConfigMap: &trustapi.SourceObjectKeySelector{KeySelector: trustapi.KeySelector{Key: "key"}, Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"trust-bundle.certs": "includes"}}}},
151-
{ConfigMap: &trustapi.SourceObjectKeySelector{KeySelector: trustapi.KeySelector{Key: "key"}, Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"selects-nothing": "true"}}}},
150+
{ConfigMap: &trustapi.SourceObjectKeySelector{Key: "key", Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"trust-bundle.certs": "includes"}}}},
151+
{ConfigMap: &trustapi.SourceObjectKeySelector{Key: "key", Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"selects-nothing": "true"}}}},
152152
},
153153
objects: []runtime.Object{&corev1.ConfigMap{
154154
ObjectMeta: metav1.ObjectMeta{Name: "configmap", Labels: map[string]string{"trust-bundle.certs": "includes"}},
@@ -182,7 +182,7 @@ func Test_buildSourceBundle(t *testing.T) {
182182
},
183183
"if ConfigMap and InLine source, return concatenated data": {
184184
sources: []trustapi.BundleSource{
185-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", KeySelector: trustapi.KeySelector{Key: "key"}}},
185+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", Key: "key"}},
186186
{InLine: ptr.To(dummy.TestCertificate2)},
187187
},
188188
objects: []runtime.Object{&corev1.ConfigMap{
@@ -195,7 +195,7 @@ func Test_buildSourceBundle(t *testing.T) {
195195
},
196196
"if single Secret source exists which doesn't exist, should return not found error": {
197197
sources: []trustapi.BundleSource{
198-
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", KeySelector: trustapi.KeySelector{Key: "key"}}},
198+
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", Key: "key"}},
199199
},
200200
objects: []runtime.Object{},
201201
expData: "",
@@ -204,7 +204,7 @@ func Test_buildSourceBundle(t *testing.T) {
204204
},
205205
"if single Secret source whose key doesn't exist, return notFoundError": {
206206
sources: []trustapi.BundleSource{
207-
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", KeySelector: trustapi.KeySelector{Key: "key"}}},
207+
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", Key: "key"}},
208208
},
209209
objects: []runtime.Object{&corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: "secret"}}},
210210
expData: "",
@@ -226,7 +226,7 @@ func Test_buildSourceBundle(t *testing.T) {
226226
},
227227
"if single Secret source referencing single key, return data": {
228228
sources: []trustapi.BundleSource{
229-
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", KeySelector: trustapi.KeySelector{Key: "key"}}},
229+
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", Key: "key"}},
230230
},
231231
objects: []runtime.Object{&corev1.Secret{
232232
ObjectMeta: metav1.ObjectMeta{Name: "secret"},
@@ -250,7 +250,7 @@ func Test_buildSourceBundle(t *testing.T) {
250250
},
251251
"if Secret and InLine source, return concatenated data": {
252252
sources: []trustapi.BundleSource{
253-
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", KeySelector: trustapi.KeySelector{Key: "key"}}},
253+
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", Key: "key"}},
254254
{InLine: ptr.To(dummy.TestCertificate1)},
255255
},
256256
objects: []runtime.Object{&corev1.Secret{
@@ -263,9 +263,9 @@ func Test_buildSourceBundle(t *testing.T) {
263263
},
264264
"if Secret, ConfigMap and InLine source, return concatenated data": {
265265
sources: []trustapi.BundleSource{
266-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", KeySelector: trustapi.KeySelector{Key: "key"}}},
266+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", Key: "key"}},
267267
{InLine: ptr.To(dummy.TestCertificate3)},
268-
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", KeySelector: trustapi.KeySelector{Key: "key"}}},
268+
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", Key: "key"}},
269269
},
270270
objects: []runtime.Object{
271271
&corev1.ConfigMap{
@@ -283,8 +283,8 @@ func Test_buildSourceBundle(t *testing.T) {
283283
},
284284
"if source Secret exists, but not ConfigMap, return not found error": {
285285
sources: []trustapi.BundleSource{
286-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", KeySelector: trustapi.KeySelector{Key: "key"}}},
287-
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", KeySelector: trustapi.KeySelector{Key: "key"}}},
286+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", Key: "key"}},
287+
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", Key: "key"}},
288288
},
289289
objects: []runtime.Object{
290290
&corev1.ConfigMap{
@@ -298,8 +298,8 @@ func Test_buildSourceBundle(t *testing.T) {
298298
},
299299
"if source ConfigMap exists, but not Secret, return not found error": {
300300
sources: []trustapi.BundleSource{
301-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", KeySelector: trustapi.KeySelector{Key: "key"}}},
302-
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", KeySelector: trustapi.KeySelector{Key: "key"}}},
301+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", Key: "key"}},
302+
{Secret: &trustapi.SourceObjectKeySelector{Name: "secret", Key: "key"}},
303303
},
304304
objects: []runtime.Object{
305305
&corev1.Secret{
@@ -358,7 +358,7 @@ func Test_buildSourceBundle(t *testing.T) {
358358
},
359359
"if has JKS target, return binaryData with encoded JKS": {
360360
sources: []trustapi.BundleSource{
361-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", KeySelector: trustapi.KeySelector{Key: "key"}}},
361+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", Key: "key"}},
362362
},
363363
formats: &trustapi.AdditionalFormats{
364364
JKS: &trustapi.JKS{
@@ -377,7 +377,7 @@ func Test_buildSourceBundle(t *testing.T) {
377377
},
378378
"if has JKS target with arbitrary password, return binaryData with encoded JKS": {
379379
sources: []trustapi.BundleSource{
380-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", KeySelector: trustapi.KeySelector{Key: "key"}}},
380+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", Key: "key"}},
381381
},
382382
formats: &trustapi.AdditionalFormats{
383383
JKS: &trustapi.JKS{
@@ -397,7 +397,7 @@ func Test_buildSourceBundle(t *testing.T) {
397397
},
398398
"if has PKCS12 target, return binaryData with encoded PKCS12": {
399399
sources: []trustapi.BundleSource{
400-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", KeySelector: trustapi.KeySelector{Key: "key"}}},
400+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", Key: "key"}},
401401
},
402402
formats: &trustapi.AdditionalFormats{
403403
PKCS12: &trustapi.PKCS12{
@@ -416,7 +416,7 @@ func Test_buildSourceBundle(t *testing.T) {
416416
},
417417
"if has PKCS12 target with arbitrary password, return binaryData with encoded PKCS12": {
418418
sources: []trustapi.BundleSource{
419-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", KeySelector: trustapi.KeySelector{Key: "key"}}},
419+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "configmap", Key: "key"}},
420420
},
421421
formats: &trustapi.AdditionalFormats{
422422
PKCS12: &trustapi.PKCS12{

‎pkg/webhook/validation_test.go‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ func Test_validate(t *testing.T) {
5555
Spec: trustapi.BundleSpec{
5656
Sources: []trustapi.BundleSource{
5757
{
58-
ConfigMap: &trustapi.SourceObjectKeySelector{Name: "test", KeySelector: trustapi.KeySelector{Key: "test"}},
58+
ConfigMap: &trustapi.SourceObjectKeySelector{Name: "test", Key: "test"},
5959
InLine: ptr.To("test"),
6060
},
6161
{InLine: ptr.To("test")},
6262
{
63-
ConfigMap: &trustapi.SourceObjectKeySelector{Name: "test", KeySelector: trustapi.KeySelector{Key: "test"}},
64-
Secret: &trustapi.SourceObjectKeySelector{Name: "test", KeySelector: trustapi.KeySelector{Key: "test"}},
63+
ConfigMap: &trustapi.SourceObjectKeySelector{Name: "test", Key: "test"},
64+
Secret: &trustapi.SourceObjectKeySelector{Name: "test", Key: "test"},
6565
},
6666
},
6767
Target: trustapi.BundleTarget{ConfigMap: &trustapi.KeySelector{Key: "test"}},
@@ -144,9 +144,9 @@ func Test_validate(t *testing.T) {
144144
bundle: &trustapi.Bundle{
145145
Spec: trustapi.BundleSpec{
146146
Sources: []trustapi.BundleSource{
147-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "", KeySelector: trustapi.KeySelector{Key: ""}}},
147+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "", Key: ""}},
148148
{InLine: ptr.To("test")},
149-
{Secret: &trustapi.SourceObjectKeySelector{Name: "", KeySelector: trustapi.KeySelector{Key: ""}}},
149+
{Secret: &trustapi.SourceObjectKeySelector{Name: "", Key: ""}},
150150
},
151151
Target: trustapi.BundleTarget{ConfigMap: &trustapi.KeySelector{Key: "test"}},
152152
},
@@ -162,9 +162,9 @@ func Test_validate(t *testing.T) {
162162
bundle: &trustapi.Bundle{
163163
Spec: trustapi.BundleSpec{
164164
Sources: []trustapi.BundleSource{
165-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "some-config-map", Selector: &metav1.LabelSelector{}, KeySelector: trustapi.KeySelector{Key: "test"}}},
165+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "some-config-map", Selector: &metav1.LabelSelector{}, Key: "test"}},
166166
{InLine: ptr.To("test")},
167-
{Secret: &trustapi.SourceObjectKeySelector{Name: "some-secret", Selector: &metav1.LabelSelector{}, KeySelector: trustapi.KeySelector{Key: "test"}}},
167+
{Secret: &trustapi.SourceObjectKeySelector{Name: "some-secret", Selector: &metav1.LabelSelector{}, Key: "test"}},
168168
},
169169
Target: trustapi.BundleTarget{ConfigMap: &trustapi.KeySelector{Key: "test"}},
170170
},
@@ -178,9 +178,9 @@ func Test_validate(t *testing.T) {
178178
bundle: &trustapi.Bundle{
179179
Spec: trustapi.BundleSpec{
180180
Sources: []trustapi.BundleSource{
181-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "some-config-map", KeySelector: trustapi.KeySelector{Key: "test"}, IncludeAllKeys: true}},
181+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "some-config-map", Key: "test", IncludeAllKeys: true}},
182182
{InLine: ptr.To("test")},
183-
{Secret: &trustapi.SourceObjectKeySelector{Name: "some-secret", KeySelector: trustapi.KeySelector{Key: "test"}, IncludeAllKeys: true}},
183+
{Secret: &trustapi.SourceObjectKeySelector{Name: "some-secret", Key: "test", IncludeAllKeys: true}},
184184
},
185185
Target: trustapi.BundleTarget{ConfigMap: &trustapi.KeySelector{Key: "test"}},
186186
},
@@ -196,7 +196,7 @@ func Test_validate(t *testing.T) {
196196
Spec: trustapi.BundleSpec{
197197
Sources: []trustapi.BundleSource{
198198
{InLine: ptr.To("test")},
199-
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "test-bundle", KeySelector: trustapi.KeySelector{Key: "test"}}},
199+
{ConfigMap: &trustapi.SourceObjectKeySelector{Name: "test-bundle", Key: "test"}},
200200
},
201201
Target: trustapi.BundleTarget{ConfigMap: &trustapi.KeySelector{Key: "test"}},
202202
},
@@ -211,7 +211,7 @@ func Test_validate(t *testing.T) {
211211
Spec: trustapi.BundleSpec{
212212
Sources: []trustapi.BundleSource{
213213
{InLine: ptr.To("test")},
214-
{Secret: &trustapi.SourceObjectKeySelector{Name: "test-bundle", KeySelector: trustapi.KeySelector{Key: "test"}}},
214+
{Secret: &trustapi.SourceObjectKeySelector{Name: "test-bundle", Key: "test"}},
215215
},
216216
Target: trustapi.BundleTarget{Secret: &trustapi.KeySelector{Key: "test"}},
217217
},

‎test/env/data.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ func newTestBundle(ctx context.Context, cl client.Client, opts bundlectrl.Option
111111
Sources: []trustapi.BundleSource{
112112
{
113113
ConfigMap: &trustapi.SourceObjectKeySelector{
114-
Name: configMap.Name,
115-
KeySelector: trustapi.KeySelector{Key: td.Sources.ConfigMap.Key},
114+
Name: configMap.Name,
115+
Key: td.Sources.ConfigMap.Key,
116116
},
117117
},
118118

119119
{
120120
Secret: &trustapi.SourceObjectKeySelector{
121-
Name: secret.Name,
122-
KeySelector: trustapi.KeySelector{Key: td.Sources.Secret.Key},
121+
Name: secret.Name,
122+
Key: td.Sources.Secret.Key,
123123
},
124124
},
125125

‎test/integration/bundle/suite.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ var _ = Describe("Integration", func() {
174174

175175
Expect(komega.Update(testBundle, func() {
176176
testBundle.Spec.Sources = append(testBundle.Spec.Sources, trustapi.BundleSource{
177-
ConfigMap: &trustapi.SourceObjectKeySelector{Name: "new-bundle-source", KeySelector: trustapi.KeySelector{Key: "new-source-key"}},
177+
ConfigMap: &trustapi.SourceObjectKeySelector{Name: "new-bundle-source", Key: "new-source-key"},
178178
})
179179
})()).To(Succeed())
180180

@@ -219,7 +219,7 @@ var _ = Describe("Integration", func() {
219219

220220
Expect(komega.Update(testBundle, func() {
221221
testBundle.Spec.Sources = append(testBundle.Spec.Sources, trustapi.BundleSource{
222-
Secret: &trustapi.SourceObjectKeySelector{Name: "new-bundle-source", KeySelector: trustapi.KeySelector{Key: "new-source-key"}},
222+
Secret: &trustapi.SourceObjectKeySelector{Name: "new-bundle-source", Key: "new-source-key"},
223223
})
224224
})()).To(Succeed())
225225

0 commit comments

Comments
 (0)