Add multicluster awareness for lifecycle client #1211
Merged
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.
This is a first pass at adding multicluster awareness into our lifecycle client. It adds a few different methods for initializing a multicluster-aware lifecycle client while keeping the existing controller code almost untouched:
Managerfrom the multicluster-runtime project.Statefulsets andPods that are wrapped in a struct that also tracks which cluster the set/pod is associated with.Cluster-type generic (i.e. what we normally implement the v1/v2 to specify aGetClustersfunction that returns a list of all of the clusters it should reconcile resources in.My guess is that for any multicluster options we'll likely want to do something for the renderer generics similar to the existing
ClusterWithPoolsbut then do like aMulticlusterWithPoolsthat also takes a list of all of the clusters we're watching resources on (or we can refactor things to leverage a static list on the client at initialization time).So long as all tests pass and we're not too grossed out by this refactor, I'm fine with it... I'll add in tests for multicluster stuff as we actually start using it.