-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: scale-out new replicas through data actions #8425
base: main
Are you sure you want to change the base?
Conversation
a680c98
to
8649377
Compare
8649377
to
0055daf
Compare
cmd/kbagent/main.go
Outdated
@@ -41,7 +41,8 @@ import ( | |||
) | |||
|
|||
const ( | |||
defaultPort = 3501 | |||
defaultHTTPPort = 3501 | |||
defaultStreamingPort = 3502 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you consider using a single port to serve both kinds of actions? we can use the websocket protocol for data streaming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will make the data streaming protocol more constrained and complicated if sharing a same port.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it won't be constrained because http is just a transport layer. but the advantage is that it only uses one port, it's useful when the cluster is deployed under the host network. I'm fine with both, just raise an option for consideration.
74b814d
to
0cd4a4a
Compare
0cd4a4a
to
87cf581
Compare
|
||
anyPod := func() []*corev1.Pod { | ||
i := rand.Int() % len(pods) | ||
return []*corev1.Pod{pods[i]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the target pod is random, will it affect multiple reconciles?
and it is better to use an available pod rather than a failed pod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The controller does not check the availability of target Pods, and leaving it to the Addon and Action to choose, because the controller has no way of knowing which pods meet the availability requirement for a specific action.
rolePods = append(rolePods, pods[i]) | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and if the target role pods are not available(such as seconaday), can we select a fallback pod?
7253759
to
a13e5c2
Compare
c09b36d
to
871a813
Compare
871a813
to
6e7035d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8425 +/- ##
==========================================
- Coverage 61.27% 60.67% -0.61%
==========================================
Files 351 354 +3
Lines 41752 41821 +69
==========================================
- Hits 25584 25375 -209
- Misses 13870 14187 +317
+ Partials 2298 2259 -39
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
No description provided.