Skip to content

Commit e45a76a

Browse files
authored
Merge pull request #51 from linode/fix-bucket-behavior
Fix bucket behavior
2 parents 2e8199c + f4160cd commit e45a76a

File tree

6 files changed

+114
-74
lines changed

6 files changed

+114
-74
lines changed

.github/workflows/e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
e2e:
9-
uses: upbound/uptest/.github/workflows/pr-comment-trigger.yml@main
9+
uses: upbound/official-providers-ci/.github/workflows/pr-comment-trigger.yml@main
1010
secrets:
1111
UPTEST_CLOUD_CREDENTIALS: ${{ secrets.UPTEST_CLOUD_CREDENTIALS }}
1212
UPTEST_DATASOURCE: ${{ secrets.UPTEST_DATASOURCE }}

apis/objectstorage/v1alpha1/zz_bucket_terraformed.go

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

apis/objectstorage/v1alpha1/zz_bucket_types.go

Lines changed: 5 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/objectstorage/v1alpha1/zz_generated.deepcopy.go

Lines changed: 8 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/objectstoragebucket/config.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,13 @@ package objectstoragebucket
22

33
import (
44
"github.com/crossplane/upjet/pkg/config"
5-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
65
)
76

87
// Configure configures individual resources by adding custom ResourceConfigurators.
98
func Configure(p *config.Provider) {
109
p.AddResourceConfigurator("linode_object_storage_bucket", func(r *config.Resource) {
1110
r.ShortGroup = "objectstorage"
1211
r.Kind = "Bucket"
13-
element, ok := r.TerraformResource.Schema["cert"].Elem.(*schema.Resource)
14-
if ok {
15-
element.Schema["certificate"].Sensitive = false
16-
element.Schema["private_key"].Sensitive = false
17-
}
18-
1912
r.References["access_key"] = config.Reference{
2013
Type: "Key",
2114
RefFieldName: "AccessKeyRef",

package/crds/objectstorage.linode.upbound.io_buckets.yaml

Lines changed: 99 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -161,16 +161,44 @@ spec:
161161
description: The cert used by this Object Storage Bucket.
162162
items:
163163
properties:
164-
certificate:
164+
certificateSecretRef:
165165
description: |-
166166
The Base64 encoded and PEM formatted SSL certificate.
167167
The Base64 encoded and PEM formatted SSL certificate.
168-
type: string
169-
privateKey:
168+
properties:
169+
key:
170+
description: The key to select.
171+
type: string
172+
name:
173+
description: Name of the secret.
174+
type: string
175+
namespace:
176+
description: Namespace of the secret.
177+
type: string
178+
required:
179+
- key
180+
- name
181+
- namespace
182+
type: object
183+
privateKeySecretRef:
170184
description: |-
171185
The private key associated with the TLS/SSL certificate.
172186
The private key associated with the TLS/SSL certificate.
173-
type: string
187+
properties:
188+
key:
189+
description: The key to select.
190+
type: string
191+
name:
192+
description: Name of the secret.
193+
type: string
194+
namespace:
195+
description: Namespace of the secret.
196+
type: string
197+
required:
198+
- key
199+
- name
200+
- namespace
201+
type: object
174202
type: object
175203
type: array
176204
cluster:
@@ -389,16 +417,47 @@ spec:
389417
description: The cert used by this Object Storage Bucket.
390418
items:
391419
properties:
392-
certificate:
420+
certificateSecretRef:
393421
description: |-
394422
The Base64 encoded and PEM formatted SSL certificate.
395423
The Base64 encoded and PEM formatted SSL certificate.
396-
type: string
397-
privateKey:
424+
properties:
425+
key:
426+
description: The key to select.
427+
type: string
428+
name:
429+
description: Name of the secret.
430+
type: string
431+
namespace:
432+
description: Namespace of the secret.
433+
type: string
434+
required:
435+
- key
436+
- name
437+
- namespace
438+
type: object
439+
privateKeySecretRef:
398440
description: |-
399441
The private key associated with the TLS/SSL certificate.
400442
The private key associated with the TLS/SSL certificate.
401-
type: string
443+
properties:
444+
key:
445+
description: The key to select.
446+
type: string
447+
name:
448+
description: Name of the secret.
449+
type: string
450+
namespace:
451+
description: Namespace of the secret.
452+
type: string
453+
required:
454+
- key
455+
- name
456+
- namespace
457+
type: object
458+
required:
459+
- certificateSecretRef
460+
- privateKeySecretRef
402461
type: object
403462
type: array
404463
cluster:
@@ -707,16 +766,44 @@ spec:
707766
description: The cert used by this Object Storage Bucket.
708767
items:
709768
properties:
710-
certificate:
769+
certificateSecretRef:
711770
description: |-
712771
The Base64 encoded and PEM formatted SSL certificate.
713772
The Base64 encoded and PEM formatted SSL certificate.
714-
type: string
715-
privateKey:
773+
properties:
774+
key:
775+
description: The key to select.
776+
type: string
777+
name:
778+
description: Name of the secret.
779+
type: string
780+
namespace:
781+
description: Namespace of the secret.
782+
type: string
783+
required:
784+
- key
785+
- name
786+
- namespace
787+
type: object
788+
privateKeySecretRef:
716789
description: |-
717790
The private key associated with the TLS/SSL certificate.
718791
The private key associated with the TLS/SSL certificate.
719-
type: string
792+
properties:
793+
key:
794+
description: The key to select.
795+
type: string
796+
name:
797+
description: Name of the secret.
798+
type: string
799+
namespace:
800+
description: Namespace of the secret.
801+
type: string
802+
required:
803+
- key
804+
- name
805+
- namespace
806+
type: object
720807
type: object
721808
type: array
722809
cluster:

0 commit comments

Comments
 (0)