chore: data catalog: create fe container for dataservices (OP-241)#2178
Open
chore: data catalog: create fe container for dataservices (OP-241)#2178
Conversation
Contributor
Author
How to use the Graphite Merge QueueAdd the label main-merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Graphite Automations"Add anton/matt/sergey/kristina as reviwers on operator PRs" took an action on this PR • (02/03/26)2 reviewers were added to this PR based on Anton Bykov's automation. |
58f3ee7 to
c1c14a0
Compare
Comment on lines
38
to
49
| dataServicesContainers, err := discovery.GetClusterContainersByClusterUID(ctx, r.Manager.GetClient(), ownerUid, r.container.Namespace, weka.WekaContainerModeDataServices) | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| foundDataServicesNeighbor := false | ||
| for _, dsContainer := range dataServicesContainers { | ||
| if dsContainer.GetNodeAffinity() == nodeName { | ||
| foundDataServicesNeighbor = true | ||
| break | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
you can use this func from KubeService to get container on the exact node:
GetWekaContainersSimple(ctx context.Context, namespace, node string, labels map[string]string) ([]v1alpha1.WekaContainer, error)
462c5d0 to
9e9414f
Compare
6c5bf9f to
f2aecdd
Compare
…re datasvc and alocate port 14611
59f5791 to
ef78fbf
Compare
Comment on lines
+49
to
+58
| // Check if sibling FE container already exists on the same node | ||
| // Note: We don't filter by node in the query because newly created containers | ||
| // don't have status.nodeAffinity set yet. Instead, we filter the results manually. | ||
| feContainers, err := r.KubeService.GetWekaContainersSimple(ctx, r.container.Namespace, "", map[string]string{ | ||
| domain.WekaLabelClusterId: ownerUid, | ||
| domain.WekaLabelMode: weka.WekaContainerModeDataServicesFe, | ||
| }) | ||
| if err != nil { | ||
| return err | ||
| } |
Collaborator
There was a problem hiding this comment.
why not to set nodeName as the filter (instead of empty line + filtering manually)?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

No description provided.