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

feat(crd): use unstructured type inplace of typed crd instance #187

Merged
merged 1 commit into from
Jan 4, 2021

Conversation

AmitKumarDas
Copy link

@AmitKumarDas AmitKumarDas commented Jan 1, 2021

This commit makes exhaustive changes to handle CRD instances. CRD instances make use of unstructured types instead of typed instances. Both CRD versions i.e. v1beta1 & v1 are supported.

Unstructured instances have proved to be generic & testable versus the typed counterparts especially for CRD schemas that can differ from each other. In other words, CRD schemas have a
majority schemaless section that is well handled via unstructured type.

This commit also includes a number of integration test cases to avoid bug injections if any.

This closes #186 partially. A better approach will be to use latest version of d-operators with clients that make use of unstructured instances
directly instead of yaml strings that get converted to go structures.

This commit is also a breaking change, since some of the structures have been modified. Clients that are already making use of this structure need to be modified accordingly.

Signed-off-by: AmitKumarDas amit.das@mayadata.io

Copy link

@mittachaitu mittachaitu left a comment

Choose a reason for hiding this comment

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

Changes are good

pkg/recipe/crd.go Show resolved Hide resolved
pkg/recipe/crd_v1.go Show resolved Hide resolved
This commit makes exhaustive changes to handle CRD instances.
CRD instances make use of unstructured types instead of typed
instances. Both CRD versions i.e. v1beta1 & v1 are supported.

Unstructured instances have proved to be generic & testable
versus the typed counterparts especially for CRD schemas that
can differ from each other. In other words, CRD schemas have a
majority schemaless section that is well handled via
unstructured type.

This commit also includes a number of integration test cases
to avoid bug injections if any.

This closes mayadata-io#186
partially. A better approach will be to use latest version of
d-operators with clients that make use of unstructured instances
directly instead of yaml strings that get converted to go
structures.

This commit is also a breaking change, since some of the
structures have been modified. Clients that are already making use
of this structure need to be modified accordingly.

Signed-off-by: AmitKumarDas <amit.das@mayadata.io>
@AmitKumarDas AmitKumarDas merged commit 5fc998d into mayadata-io:master Jan 4, 2021
@AmitKumarDas AmitKumarDas deleted the code-63 branch January 4, 2021 13:21
@AmitKumarDas
Copy link
Author

🎉 This PR is included in version 1.29.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(apply): unable to apply K8s CRD using recipe
2 participants