Skip to content

Commit

Permalink
feat(crd): use unstructured type inplace of typed crd instance
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
AmitKumarDas committed Jan 4, 2021
1 parent 6206cd1 commit 0b041f0
Show file tree
Hide file tree
Showing 22 changed files with 2,480 additions and 639 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ testv:
@go test ./... -cover -v -args --logtostderr -v=2

.PHONY: integration-test
integration-test:
integration-test:
# Uncomment to list verbose output
# @go test ./... -cover --tags=integration -v -args --logtostderr -v=1
@go test ./... -cover --tags=integration

.PHONY: e2e-test
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module mayadata.io/d-operators
go 1.13

require (
github.com/ghodss/yaml v1.0.0
github.com/go-resty/resty/v2 v2.2.0
github.com/google/go-cmp v0.4.0
github.com/pkg/errors v0.9.1
Expand Down
Loading

0 comments on commit 0b041f0

Please sign in to comment.