You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celeborn.apache.org by et...@apache.org on 2024/12/16 08:58:46 UTC
(celeborn) branch main updated (58cd2c6fc -> 17df678c7)
This is an automated email from the ASF dual-hosted git repository.
ethanfeng pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git
omit 58cd2c6fc Add support for NodePort Service per Master replica
new 17df678c7 [CELEBORN-1780] Add support for NodePort Service per Master replica
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (58cd2c6fc)
\
N -- N -- N refs/heads/main (17df678c7)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
(celeborn) 01/01: [CELEBORN-1780] Add support for NodePort Service per Master replica
Posted by et...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ethanfeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git
commit 17df678c77b8295115448138dd67c5ba7ed16bca
Author: ShlomiTubul <sh...@placer.ai>
AuthorDate: Mon Dec 16 16:54:47 2024 +0800
[CELEBORN-1780] Add support for NodePort Service per Master replica
### What changes were proposed in this pull request?
This PR add support for NodePort svc per master replica, instead of only dealing on hostnet in master's when client is outside of k8s
### Why are the changes needed?
To better support external access
### Does this PR introduce _any_ user-facing change?
Added optional fields
### How was this patch tested?
locally on my cluster
Closes #2998 from shlomitubul/main.
Authored-by: ShlomiTubul <sh...@placer.ai>
Signed-off-by: mingji <fe...@alibaba-inc.com>
---
charts/celeborn/templates/master/service.yaml | 31 ++++++++++++++++++++++++++
charts/celeborn/tests/master/service_test.yaml | 26 +++++++++++++++++++++
charts/celeborn/values.yaml | 12 ++++++++++
3 files changed, 69 insertions(+)
diff --git a/charts/celeborn/templates/master/service.yaml b/charts/celeborn/templates/master/service.yaml
index 73a7c229b..6032b7e2e 100644
--- a/charts/celeborn/templates/master/service.yaml
+++ b/charts/celeborn/templates/master/service.yaml
@@ -15,6 +15,37 @@ See the License for the specific language governing permissions and
limitations under the License.
*/ -}}
+{{ if .Values.additionalNodePortServicePerReplica.enabled }}
+{{ range $i, $e := until (int .Values.masterReplicas) }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "celeborn.masterServiceName" $ }}-{{ $i }}
+ labels:
+ {{- include "celeborn.labels" $ | nindent 4 }}
+ annotations:
+ {{- include "celeborn.masterMetricsAnnotation" $ | nindent 4 }}
+ {{- with index $.Values.additionalNodePortServicePerReplica.annotations (printf "master-replica-%d" $i) }}
+ {{- range $key, $value := . }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ {{- end }}
+spec:
+ selector:
+ {{- include "celeborn.selectorLabels" $ | nindent 4 }}
+ app.kubernetes.io/role: master
+ apps.kubernetes.io/pod-index: "{{ $i }}"
+ ports:
+ - port: {{ $.Values.additionalNodePortServicePerReplica.port }}
+ targetPort: {{ $.Values.additionalNodePortServicePerReplica.port }}
+ nodePort: {{ add $.Values.additionalNodePortServicePerReplica.nodePortStartRange $i }}
+ protocol: TCP
+ name: celeborn-master
+ type: NodePort
+{{ end -}}
+{{ end -}}
+---
apiVersion: v1
kind: Service
metadata:
diff --git a/charts/celeborn/tests/master/service_test.yaml b/charts/celeborn/tests/master/service_test.yaml
index e3322ab86..49fba72de 100644
--- a/charts/celeborn/tests/master/service_test.yaml
+++ b/charts/celeborn/tests/master/service_test.yaml
@@ -52,3 +52,29 @@ tests:
- equal:
path: spec.ports[0].targetPort
value: 9097
+ - it: Should create NodePort service for each master replica
+ set:
+ masterReplicas: 3
+ additionalNodePortServicePerReplica:
+ enabled: true
+ port: 9097
+ nodePortStartRange: 30100
+ asserts:
+ - documentSelector:
+ path: metadata.name
+ value: celeborn-master-svc-0
+ equal:
+ path: spec.ports[0].nodePort
+ value: 30100
+ - documentSelector:
+ path: metadata.name
+ value: celeborn-master-svc-1
+ equal:
+ path: spec.ports[0].nodePort
+ value: 30101
+ - documentSelector:
+ path: metadata.name
+ value: celeborn-master-svc-2
+ equal:
+ path: spec.ports[0].nodePort
+ value: 30102
\ No newline at end of file
diff --git a/charts/celeborn/values.yaml b/charts/celeborn/values.yaml
index f94f80cdd..81ac0059a 100644
--- a/charts/celeborn/values.yaml
+++ b/charts/celeborn/values.yaml
@@ -49,6 +49,18 @@ service:
type: ClusterIP
# -- Specifies service port
port: 9097
+ # -- Specifies service annotations
+ annotations: {}
+
+# -- Specifies whether to create additional NodePort service for each master replica
+additionalNodePortServicePerReplica:
+ enabled: false
+ # -- Specifies service port
+ port: 9097
+ # -- Specifies nodeport start range
+ nodePortStartRange: 30000
+ # -- when using NodePort service type, you can specify map of annotations for each master replica
+ annotations: {}
cluster:
# -- Specifies Kubernetes cluster name