Skip to content

Conversation

@rytswd
Copy link
Member

@rytswd rytswd commented Oct 13, 2025

All the implementation logic is in place, as well as test coverage is near 100% test. There is only one function that's not being triggered due to the lack of envtest setup at the moment, and will be probably tackled in a separate PR.

Note that this now uses #15 and #23 for CRDs. Also, this must get the go.mod version reference update for api directory.

@rytswd rytswd marked this pull request as draft October 13, 2025 01:55
@rcambrj rcambrj changed the base branch from main to etcd-api-and-crd October 13, 2025 11:07
@rytswd rytswd changed the base branch from etcd-api-and-crd to main October 14, 2025 01:22
@rytswd rytswd changed the base branch from main to fix-crds-and-makefile October 14, 2025 01:30
@rytswd rytswd changed the title WIP: Add etcd controller code Add etcd controller code Oct 14, 2025
Comment on lines +259 to +267
// SetupWithManager sets up the controller with the Manager.
// TODO: This is missing test coverage, and will need to use envtest setup.
func (r *EtcdReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&multigresv1alpha1.Etcd{}).
Owns(&appsv1.StatefulSet{}).
Owns(&corev1.Service{}).
Complete(r)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the code path that's not yet tested.


require (
github.com/google/go-cmp v0.7.0
github.com/numtide/multigres-operator/api v0.0.0-20251010210109-0981dc938d36
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Ensure go.mod pulls in the correct version reference before merging

Some of the test cases have been moved around, formatted for better
clarity, extra test spec added, and unused dependencies removed.
@rytswd rytswd marked this pull request as ready for review October 14, 2025 02:28
Base automatically changed from fix-crds-and-makefile to main October 14, 2025 08:35
@rytswd rytswd merged commit 8f082d4 into main Oct 14, 2025
9 checks passed
@rytswd rytswd deleted the etcd-controller branch October 14, 2025 12:22
@rytswd
Copy link
Member Author

rytswd commented Oct 14, 2025

Ah I forgot to update the API go.mod reference, will follow up with another PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants