This is an automated email from the ASF dual-hosted git repository.

ulyssesyou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new f5e8152  [KYUUBI #1389] Refine helm service template to support 
LoadBalancer type
f5e8152 is described below

commit f5e8152a9e9def3507b0ed9648b6661021a4e43e
Author: sunfangbin <[email protected]>
AuthorDate: Tue Nov 16 12:04:55 2021 +0800

    [KYUUBI #1389] Refine helm service template to support LoadBalancer type
    
    ### _Why are the changes needed?_
    The helm service template is currently hard-coded with `NodePort`, we 
should make it configurable to support other service type such as 
`LoadBalancer`.
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including 
negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run 
test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests)
 locally before make a pull request
    
    Closes #1389 from murong00/branch-1389.
    
    Closes #1389
    
    5855c546 [sunfangbin] Refine toYaml usage
    d659ad4c [sunfangbin] Refine helm service template to support LoadBalancer 
type
    
    Authored-by: sunfangbin <[email protected]>
    Signed-off-by: ulysses-you <[email protected]>
---
 docker/helm/templates/kyuubi-configmap.yaml |  2 ++
 docker/helm/templates/kyuubi-service.yaml   | 13 ++++++++++---
 docker/helm/values.yaml                     |  1 +
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/docker/helm/templates/kyuubi-configmap.yaml 
b/docker/helm/templates/kyuubi-configmap.yaml
index 9a653b9..983af07 100644
--- a/docker/helm/templates/kyuubi-configmap.yaml
+++ b/docker/helm/templates/kyuubi-configmap.yaml
@@ -19,6 +19,8 @@ apiVersion: v1
 kind: ConfigMap
 metadata:
   name: kyuubi-defaults
+  labels:
+    app: {{ template "kyuubi.name" . }}
 data:
   kyuubi-defaults.conf: |
     #
diff --git a/docker/helm/templates/kyuubi-service.yaml 
b/docker/helm/templates/kyuubi-service.yaml
index 396b082..8d3423e 100644
--- a/docker/helm/templates/kyuubi-service.yaml
+++ b/docker/helm/templates/kyuubi-service.yaml
@@ -18,13 +18,20 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: kyuubi-nodeport
+  name: kyuubi-svc
+  labels:
+    app: {{ template "kyuubi.name" . }}
+  {{- with .Values.service.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
 spec:
   ports:
-    - nodePort: {{ .Values.service.port }}
+    - name: http
+      nodePort: {{ .Values.service.port }}
       port: {{ .Values.server.bind.port }}
       protocol: TCP
-  type: NodePort
+  type: {{ .Values.service.type }}
   selector:
     app: {{ template "kyuubi.name" . }}
     release: {{ .Release.Name }}
\ No newline at end of file
diff --git a/docker/helm/values.yaml b/docker/helm/values.yaml
index 93df2a4..b8356d0 100644
--- a/docker/helm/values.yaml
+++ b/docker/helm/values.yaml
@@ -42,6 +42,7 @@ service:
   #   vim kube-apiserver.yaml (usually under path: /etc/kubernetes/manifests/)
   #   add or change line 'service-node-port-range=1-32767' under kube-apiserver
   port: 30009
+  annotations: {}
 
 resources: {}
   # Used to specify resource, default unlimited.

Reply via email to