Create a package for scheme setup #322
Labels
good first issue
Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
kind/cleanup
Categorizes issue or PR as related to cleaning up code, process, or technical debt.
We already have multiple places where we setup scheme:
operator-controller/cmd/manager/main.go
Lines 49 to 53 in fa84c73
operator-controller/cmd/resolutioncli/main.go
Lines 62 to 65 in fa84c73
operator-controller/internal/controllers/suite_test.go
Lines 70 to 74 in fa84c73
And more will be introduced (e.g #286 adds a new one, see
test/operator-framework-e2e/operator_framework_test.go
).To avoid having this repeated setup and inconsistent schemas we should consider creating a scheme package in the project which will be setting up a scheme. In rest of the places we will just be able to import already constructed scheme.
Example:
kubectl
scheme - https://github.com/kubernetes/kubectl/blob/197123726db24c61aa0f78d1f0ba6e91a2ec2f35/pkg/scheme/install.goThe text was updated successfully, but these errors were encountered: