Skip to content

Commit

Permalink
Merge pull request #29 from vshn/fix-endpoint-url
Browse files Browse the repository at this point in the history
Add endpoint to Bucket status
  • Loading branch information
davidgubler authored Oct 26, 2022
2 parents fc3763c + dfd1a12 commit 3709436
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 65 deletions.
1 change: 1 addition & 0 deletions packages/composite/objectstorage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ parameters:
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
- ENDPOINT
- ENDPOINT_URL
- BUCKET_NAME
defaultCompositionRef:
name: ${pkg.appcat.composite.objectstorage:defaultCompositionRef}
Expand Down
14 changes: 4 additions & 10 deletions packages/composition/objectstorage/cloudscale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,12 @@ parameters:
region: ""
bucketDeletionPolicy: ${pkg.appcat.composition.objectstorage.cloudscale:bucketDeletionPolicy}
connectionDetails:
- fromFieldPath: spec.forProvider.endpointURL
- fromFieldPath: status.endpoint
type: FromFieldPath
name: ENDPOINT
- fromFieldPath: status.endpointURL
type: FromFieldPath
name: ENDPOINT_URL
- fromFieldPath: spec.forProvider.region
type: FromFieldPath
name: AWS_REGION
Expand All @@ -120,15 +123,6 @@ parameters:
- type: FromCompositeFieldPath
fromFieldPath: metadata.labels[crossplane.io/composite]
toFieldPath: spec.forProvider.credentialsSecretRef.name
# Set endpoint
- type: FromCompositeFieldPath
fromFieldPath: spec.parameters.region
toFieldPath: spec.forProvider.endpointURL
transforms:
- type: string
string:
fmt: "objects.%s.cloudscale.ch"
type: Format
# Set region
- type: FromCompositeFieldPath
fromFieldPath: spec.parameters.region
Expand Down
15 changes: 4 additions & 11 deletions packages/composition/objectstorage/exoscale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,18 @@ parameters:
spec:
forProvider:
bucketName: "" # patched
endpointURL: "" # patched
# The zone is exposed as region in XRD
zone: "" # patched
bucketDeletionPolicy: ${pkg.appcat.composition.objectstorage.exoscale:bucketDeletionPolicy}
providerConfigRef:
name: exoscale
connectionDetails:
- fromFieldPath: spec.forProvider.endpointURL
- fromFieldPath: status.endpoint
type: FromFieldPath
name: ENDPOINT
- fromFieldPath: status.endpointURL
type: FromFieldPath
name: ENDPOINT_URL
- fromFieldPath: spec.forProvider.zone
type: FromFieldPath
name: AWS_REGION
Expand All @@ -117,15 +119,6 @@ parameters:
- type: FromCompositeFieldPath
fromFieldPath: spec.parameters.bucketName
toFieldPath: spec.forProvider.bucketName
# Set endpoint
- type: FromCompositeFieldPath
fromFieldPath: spec.parameters.region
toFieldPath: spec.forProvider.endpointURL
transforms:
- type: string
string:
fmt: "sos-%s.exo.io"
type: Format
# Set region
- type: FromCompositeFieldPath
fromFieldPath: spec.parameters.region
Expand Down
2 changes: 1 addition & 1 deletion packages/provider/cloudscale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parameters:
provider-cloudscale:
registry: ghcr.io
repository: vshn/provider-cloudscale/provider
tag: v0.3.0
tag: v0.5.0

crossplane:
providers:
Expand Down
2 changes: 1 addition & 1 deletion packages/provider/exoscale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parameters:
provider-exoscale:
registry: ghcr.io
repository: vshn/provider-exoscale/provider
tag: v0.1.1
tag: v0.2.0

crossplane:
providers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
- ENDPOINT
- ENDPOINT_URL
- BUCKET_NAME
defaultCompositionRef:
name: cloudscale.objectbuckets.appcat.vshn.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
- ENDPOINT
- ENDPOINT_URL
- BUCKET_NAME
defaultCompositionRef:
name: exoscale.objectbuckets.appcat.vshn.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ spec:
endpointURL: ''
region: ''
connectionDetails:
- fromFieldPath: spec.forProvider.endpointURL
- fromFieldPath: status.endpoint
name: ENDPOINT
type: FromFieldPath
- fromFieldPath: status.endpointURL
name: ENDPOINT_URL
type: FromFieldPath
- fromFieldPath: spec.forProvider.region
name: AWS_REGION
type: FromFieldPath
Expand All @@ -114,14 +117,6 @@ spec:
- fromFieldPath: metadata.labels[crossplane.io/composite]
toFieldPath: spec.forProvider.credentialsSecretRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.region
toFieldPath: spec.forProvider.endpointURL
transforms:
- string:
fmt: objects.%s.cloudscale.ch
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.region
toFieldPath: spec.forProvider.region
transforms:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,16 @@ spec:
forProvider:
bucketDeletionPolicy: DeleteAll
bucketName: ''
endpointURL: ''
zone: ''
providerConfigRef:
name: exoscale
connectionDetails:
- fromFieldPath: spec.forProvider.endpointURL
- fromFieldPath: status.endpoint
name: ENDPOINT
type: FromFieldPath
- fromFieldPath: status.endpointURL
name: ENDPOINT_URL
type: FromFieldPath
- fromFieldPath: spec.forProvider.zone
name: AWS_REGION
type: FromFieldPath
Expand All @@ -112,14 +114,6 @@ spec:
- fromFieldPath: spec.parameters.bucketName
toFieldPath: spec.forProvider.bucketName
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.region
toFieldPath: spec.forProvider.endpointURL
transforms:
- string:
fmt: sos-%s.exo.io
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.region
toFieldPath: spec.forProvider.zone
type: FromCompositeFieldPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ metadata:
name: cloudscale
name: cloudscale
spec:
package: ghcr.io/vshn/provider-cloudscale/provider:v0.3.0
package: ghcr.io/vshn/provider-cloudscale/provider:v0.5.0
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ metadata:
name: exoscale
name: exoscale
spec:
package: ghcr.io/vshn/provider-exoscale/provider:v0.1.1
package: ghcr.io/vshn/provider-exoscale/provider:v0.2.0
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
- ENDPOINT
- ENDPOINT_URL
- BUCKET_NAME
defaultCompositionRef:
name: cloudscale.objectbuckets.appcat.vshn.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ spec:
endpointURL: ''
region: ''
connectionDetails:
- fromFieldPath: spec.forProvider.endpointURL
- fromFieldPath: status.endpoint
name: ENDPOINT
type: FromFieldPath
- fromFieldPath: status.endpointURL
name: ENDPOINT_URL
type: FromFieldPath
- fromFieldPath: spec.forProvider.region
name: AWS_REGION
type: FromFieldPath
Expand All @@ -114,14 +117,6 @@ spec:
- fromFieldPath: metadata.labels[crossplane.io/composite]
toFieldPath: spec.forProvider.credentialsSecretRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.region
toFieldPath: spec.forProvider.endpointURL
transforms:
- string:
fmt: objects.%s.cloudscale.ch
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.region
toFieldPath: spec.forProvider.region
transforms:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ spec:
bucketName: my-bucket-change-name
credentialsSecretRef:
namespace: syn-provider-cloudscale-secrets
endpointURL: objects.rma.cloudscale.ch
region: rma
providerConfigRef:
name: default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
- ENDPOINT
- ENDPOINT_URL
- BUCKET_NAME
defaultCompositionRef:
name: exoscale.objectbuckets.appcat.vshn.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,16 @@ spec:
forProvider:
bucketDeletionPolicy: DeleteAll
bucketName: ''
endpointURL: ''
zone: ''
providerConfigRef:
name: exoscale
connectionDetails:
- fromFieldPath: spec.forProvider.endpointURL
- fromFieldPath: status.endpoint
name: ENDPOINT
type: FromFieldPath
- fromFieldPath: status.endpointURL
name: ENDPOINT_URL
type: FromFieldPath
- fromFieldPath: spec.forProvider.zone
name: AWS_REGION
type: FromFieldPath
Expand All @@ -112,14 +114,6 @@ spec:
- fromFieldPath: spec.parameters.bucketName
toFieldPath: spec.forProvider.bucketName
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.region
toFieldPath: spec.forProvider.endpointURL
transforms:
- string:
fmt: sos-%s.exo.io
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.region
toFieldPath: spec.forProvider.zone
type: FromCompositeFieldPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ spec:
forProvider:
bucketDeletionPolicy: DeleteAll
bucketName: my-bucket-change-name
endpointURL: sos-rma.exo.io
zone: rma
providerConfigRef:
name: exoscale

0 comments on commit 3709436

Please sign in to comment.