You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uniffle.apache.org by xi...@apache.org on 2023/01/31 07:10:06 UTC
[incubator-uniffle] branch master updated: [operator] add RSS_IP for coordinator (#523)
This is an automated email from the ASF dual-hosted git repository.
xianjin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 7ccf298f [operator] add RSS_IP for coordinator (#523)
7ccf298f is described below
commit 7ccf298f15030825ea8706b4d54da949af44d549
Author: advancedxy <xi...@apache.org>
AuthorDate: Tue Jan 31 15:09:59 2023 +0800
[operator] add RSS_IP for coordinator (#523)
### What changes were proposed in this pull request?
`NODE_NAME` and `RSS_IP` env variables are set in coordinator's container.
### Why are the changes needed?
In a complex K8S env, there might be multiple interfaces/ips in the container env. Uniffle cannot detect which
ip should be used automatically. It's better to specify the correct container ip here.
Also we are passing RSS_IP to shuffle server, coordinator and shuffle server should align this behavior.
This PR fixes #522
### Does this PR introduce _any_ user-facing change?
NO
### How was this patch tested?
Manually verify
---
.../pkg/controller/sync/coordinator/coordinator.go | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/deploy/kubernetes/operator/pkg/controller/sync/coordinator/coordinator.go b/deploy/kubernetes/operator/pkg/controller/sync/coordinator/coordinator.go
index d31aba65..5ce3a562 100644
--- a/deploy/kubernetes/operator/pkg/controller/sync/coordinator/coordinator.go
+++ b/deploy/kubernetes/operator/pkg/controller/sync/coordinator/coordinator.go
@@ -287,6 +287,24 @@ func generateMainContainerENV(rss *unifflev1alpha1.RemoteShuffleService) []corev
Name: controllerconstants.ServiceNameEnv,
Value: controllerconstants.CoordinatorServiceName,
},
+ {
+ Name: controllerconstants.NodeNameEnv,
+ ValueFrom: &corev1.EnvVarSource{
+ FieldRef: &corev1.ObjectFieldSelector{
+ APIVersion: "v1",
+ FieldPath: "spec.nodeName",
+ },
+ },
+ },
+ {
+ Name: controllerconstants.RssIPEnv,
+ ValueFrom: &corev1.EnvVarSource{
+ FieldRef: &corev1.ObjectFieldSelector{
+ APIVersion: "v1",
+ FieldPath: "status.podIP",
+ },
+ },
+ },
}
for _, e := range rss.Spec.Coordinator.Env {
if !defaultENVs.Has(e.Name) {