linode / provider-linode

Provider Linode is a Crossplane provider for managing Linode Akamai Cloud Computing resources.
Apache License 2.0
12 stars 9 forks source link

Expose configurability of terraform provider #40

Closed tchinmai7 closed 3 months ago

tchinmai7 commented 3 months ago

Description of your changes

  1. Exposes all configurable options currently exposed by the linode terraform provider
  2. Adds some validation for invalid configs

Was mostly motivated by the ability to delete buckets with objects in them. Ended up making a generic system. To test force deletes, apply these objects after running make local-deploy on the branch

  1. Your crossplane provider-linode secret
    
    apiVersion: v1
    data:
    credentials: $base64({"token": your token}) # Replace this 
    kind: Secret
    metadata:
    name: linode-api-token
    namespace: default
    type: Opaque
2.  ProviderConfig

apiVersion: linode.upbound.io/v1beta1 kind: ProviderConfig metadata: name: default spec: credentials: source: Secret secretRef: name: linode-api-token namespace: default key: credentials config: obj_bucket_force_delete: true obj_use_temp_keys: true

3. A bucket

apiVersion: objectstorage.linode.upbound.io/v1alpha1 kind: Bucket metadata: name: test-bucket spec: forProvider: label: test-1 cluster: us-sea-1 providerConfigRef: name: default


4. Verify that the bucket is created in cloud manager, and upload some objects to it. 
5. `k delete bucket  test-bucket` - Verify that the bucket gets cleaned up
<!--
Briefly describe what this pull request does. Be sure to direct your reviewers'
attention to anything that needs special consideration.

We love pull requests that resolve an open Crossplane issue. If yours does, you
can uncomment the below line to indicate which issue your PR fixes, for example
"Fixes #500":

-->
Fixes #

I have:

- [x] Read and followed Crossplane's [contribution process].
- [ ] Run `make reviewable test` to ensure this PR is ready for review.

### How has this code been tested

<!--
Before reviewers can be confident in the correctness of this pull request, it
needs to tested and shown to be correct. Briefly describe the testing that has
already been done or which is planned for this change.
-->

[contribution process]: https://git.io/fj2m9