-
Notifications
You must be signed in to change notification settings - Fork 72
Create a package for scheme setup #322
Copy link
Copy link
Closed
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Metadata
Metadata
Assignees
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.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:
kubectlscheme - https://github.com/kubernetes/kubectl/blob/197123726db24c61aa0f78d1f0ba6e91a2ec2f35/pkg/scheme/install.go