You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2022/11/25 19:24:18 UTC

[pinot] branch master updated: add v1 ingress in helm chart (#9862)

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

xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 4303ad9d82 add v1 ingress in helm chart (#9862)
4303ad9d82 is described below

commit 4303ad9d82e7b46185e2399bca8b182b97d0cdc9
Author: José Hisse <jh...@users.noreply.github.com>
AuthorDate: Fri Nov 25 16:24:10 2022 -0300

    add v1 ingress in helm chart (#9862)
---
 .../helm/pinot/templates/broker/ingress.yaml       | 34 ++++++++++++++++++++++
 .../helm/pinot/templates/controller/ingress.yaml   | 34 ++++++++++++++++++++++
 kubernetes/helm/pinot/values.yaml                  | 10 +++++++
 3 files changed, 78 insertions(+)

diff --git a/kubernetes/helm/pinot/templates/broker/ingress.yaml b/kubernetes/helm/pinot/templates/broker/ingress.yaml
index 139dd152d9..80aa8fe426 100644
--- a/kubernetes/helm/pinot/templates/broker/ingress.yaml
+++ b/kubernetes/helm/pinot/templates/broker/ingress.yaml
@@ -30,4 +30,38 @@ spec:
 {{- end }}
 
 {{- if .Values.broker.ingress.v1.enabled -}}
+{{- $ingressPath := .Values.broker.ingress.v1.path -}}
+{{- $serviceName := include "pinot.broker.fullname" . -}}
+{{- $servicePort := .Values.broker.service.port -}}
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: {{ $serviceName }}
+{{- if .Values.broker.ingress.v1.annotations }}
+  annotations:
+{{ toYaml .Values.broker.ingress.v1.annotations | indent 4 }}
+{{- end }}
+  labels:
+{{- include "pinot.brokerLabels" . | nindent 4 }}
+spec:
+{{- if .Values.broker.ingress.v1.ingressClassName }}
+  ingressClassName: {{ .Values.broker.ingress.v1.ingressClassName }}
+{{- end }}
+{{- if .Values.broker.ingress.v1.tls }}
+  tls:
+{{ toYaml .Values.broker.ingress.v1.tls | indent 4 }}
+{{- end }}
+  rules:
+    {{- range .Values.broker.ingress.v1.hosts }}
+    - host: {{ . }}
+      http:
+        paths:
+          - path: {{ $ingressPath }}
+            pathType: Prefix
+            backend:
+              service:
+                name: {{ $serviceName }}
+                port:
+                  number: {{ $servicePort }}
+    {{- end }}
 {{- end }}
diff --git a/kubernetes/helm/pinot/templates/controller/ingress.yaml b/kubernetes/helm/pinot/templates/controller/ingress.yaml
index 104bd88382..449a84e678 100644
--- a/kubernetes/helm/pinot/templates/controller/ingress.yaml
+++ b/kubernetes/helm/pinot/templates/controller/ingress.yaml
@@ -30,4 +30,38 @@ spec:
 {{- end }}
 
 {{- if .Values.controller.ingress.v1.enabled -}}
+{{- $ingressPath := .Values.controller.ingress.v1.path -}}
+{{- $serviceName := include "pinot.controller.fullname" . -}}
+{{- $servicePort := .Values.controller.service.port -}}
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: {{ $serviceName }}
+{{- if .Values.controller.ingress.v1.annotations }}
+  annotations:
+{{ toYaml .Values.controller.ingress.v1.annotations | indent 4 }}
+{{- end }}
+  labels:
+{{- include "pinot.controllerLabels" . | nindent 4 }}
+spec:
+{{- if .Values.controller.ingress.v1.ingressClassName }}
+  ingressClassName: {{ .Values.controller.ingress.v1.ingressClassName }}
+{{- end }}
+{{- if .Values.controller.ingress.v1.tls }}
+  tls:
+{{ toYaml .Values.controller.ingress.v1.tls | indent 4 }}
+{{- end }}
+  rules:
+    {{- range .Values.controller.ingress.v1.hosts }}
+    - host: {{ . }}
+      http:
+        paths:
+          - path: {{ $ingressPath }}
+            pathType: Prefix
+            backend:
+              service:
+                name: {{ $serviceName }}
+                port:
+                  number: {{ $servicePort }}
+    {{- end }}
 {{- end }}
diff --git a/kubernetes/helm/pinot/values.yaml b/kubernetes/helm/pinot/values.yaml
index 1416241d06..54aaa638d1 100644
--- a/kubernetes/helm/pinot/values.yaml
+++ b/kubernetes/helm/pinot/values.yaml
@@ -131,6 +131,11 @@ controller:
       hosts: [ ]
     v1:
       enabled: false
+      ingressClassName: ""
+      annotations: {}
+      tls: []
+      path: /
+      hosts: []
 
   resources:
     requests:
@@ -226,6 +231,11 @@ broker:
       hosts: []
     v1:
       enabled: false
+      ingressClassName: ""
+      annotations: {}
+      tls: []
+      path: /
+      hosts: []
 
   resources:
     requests:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org