Skip to content

Commit 5fc998d

Browse files
author
Amit Kumar Das
authored
feat(crd): use unstructured type inplace of typed crd instance (#187)
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 <[email protected]>
1 parent 6206cd1 commit 5fc998d

22 files changed

+2480
-639
lines changed

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ testv:
3535
@go test ./... -cover -v -args --logtostderr -v=2
3636

3737
.PHONY: integration-test
38-
integration-test:
38+
integration-test:
39+
# Uncomment to list verbose output
40+
# @go test ./... -cover --tags=integration -v -args --logtostderr -v=1
3941
@go test ./... -cover --tags=integration
4042

4143
.PHONY: e2e-test

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module mayadata.io/d-operators
33
go 1.13
44

55
require (
6+
github.com/ghodss/yaml v1.0.0
67
github.com/go-resty/resty/v2 v2.2.0
78
github.com/google/go-cmp v0.4.0
89
github.com/pkg/errors v0.9.1

0 commit comments

Comments
 (0)