Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup Composition 'Type' discriminator fields #2134

Merged
merged 5 commits into from
Feb 15, 2021
Merged

Conversation

negz
Copy link
Member

@negz negz commented Feb 12, 2021

Description of your changes

This PR:

  • Copies a few backward compatible changes over from apiextensions/v1 to apiextensions/v1beta1
  • Makes sure all Composition FooType types are named FooType, not TypeFoo.
  • Renames the "Value" ConnectionDetailType to "ValueFrom".
  • Marks 'value' connection details in our examples as such

I have:

  • 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

I haven't - they're all pretty trivial.

* Aligns on 'FooType' for all 'type' field... types.
* Replicates some changes from the v1 API that were missed in the v1beta1 API.

Signed-off-by: Nic Cope <negz@rk0n.org>
Just to keep with the 'From' theme of the other types.

Signed-off-by: Nic Cope <negz@rk0n.org>
Without this Crossplane assumes they're FromConnectionSecretKey type connection
details.

Signed-off-by: Nic Cope <negz@rk0n.org>
This maintains backward compatibiltiy with the behaviour we had before we let
API consumers explicitly declare their intended connection detail type.

Signed-off-by: Nic Cope <negz@rk0n.org>
Copy link
Member

@hasheddan hasheddan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @negz! Left a note (mainly for myself), that may be worth including in release notes :)

@@ -346,6 +347,7 @@ const (
type Transform struct {

// Type of the transform to be run.
// +kubebuilder:validation:Enum=map;math;string;convert
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting here while this is technically restricting the allowed value for this field at the API server, we are currently erroring out before creating any composed managed resources, so this change should not break any current consumers of this functionality 👍

@negz negz merged commit 619cd86 into crossplane:master Feb 15, 2021
@negz negz deleted the detailed branch February 15, 2021 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants