[mysql_controller] simplify mysql controller with indexer and ListOptions #95
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Use
client.MatchingFields
Set Index for
spec.mysqlName
inmain.go
andmysql_controller_test.go
Use
actions/setup-go@v3
instead of v2 in GitHub ActionsChange the install command from
go get
togo install
inMakefile
Upgrade kustomize to v4.5.2 to fix (ref: Support go 1.16 module aware install with version kubernetes-sigs/kustomize#3618)
Indexing
Indexes may be added to caches using a FieldIndexer. This allows you to easily and efficiently look up objects with certain properties. You can then make use of the index by specifying a field selector on calls to List on the Reader corresponding to the given Cache.