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 2020/05/22 23:15:58 UTC

[incubator-pinot] 01/01: Templatizing pinot helm chart configs, so it's possible to deploy multiple pinot helmCharts with different names in same namespace

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

xiangfu pushed a commit to branch pinot-helm-configmap-template
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit b1f2c40885ecd9438eb699efd22f9bc0a713cf80
Author: Xiang Fu <fx...@gmail.com>
AuthorDate: Fri May 22 16:15:36 2020 -0700

    Templatizing pinot helm chart configs, so it's possible to deploy multiple pinot helmCharts with different names in same namespace
---
 kubernetes/helm/pinot/templates/_helpers.tpl        | 21 +++++++++++++++++++++
 .../helm/pinot/templates/broker/configmap.yaml      |  2 +-
 .../helm/pinot/templates/broker/statefulset.yml     |  2 +-
 .../helm/pinot/templates/controller/configmap.yaml  |  2 +-
 .../pinot/templates/controller/statefulset.yaml     |  2 +-
 .../helm/pinot/templates/server/configmap.yaml      |  2 +-
 .../helm/pinot/templates/server/statefulset.yml     |  2 +-
 7 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/kubernetes/helm/pinot/templates/_helpers.tpl b/kubernetes/helm/pinot/templates/_helpers.tpl
index aa3a44c..74c50e9 100644
--- a/kubernetes/helm/pinot/templates/_helpers.tpl
+++ b/kubernetes/helm/pinot/templates/_helpers.tpl
@@ -141,3 +141,24 @@ The name of the pinot broker external service.
 {{- define "pinot.broker.external" -}}
 {{- printf "%s-external" (include "pinot.broker.fullname" .) | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
+
+{{/*
+The name of the pinot controller config.
+*/}}
+{{- define "pinot.controller.config" -}}
+{{- printf "%s-config" (include "pinot.controller.fullname" .) | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+The name of the pinot broker config.
+*/}}
+{{- define "pinot.broker.config" -}}
+{{- printf "%s-config" (include "pinot.broker.fullname" .) | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+The name of the pinot server config.
+*/}}
+{{- define "pinot.server.config" -}}
+{{- printf "%s-config" (include "pinot.server.fullname" .) | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/kubernetes/helm/pinot/templates/broker/configmap.yaml b/kubernetes/helm/pinot/templates/broker/configmap.yaml
index 7a1328e..9ed5dd5 100644
--- a/kubernetes/helm/pinot/templates/broker/configmap.yaml
+++ b/kubernetes/helm/pinot/templates/broker/configmap.yaml
@@ -20,7 +20,7 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: broker-config
+  name: {{ include "pinot.broker.config" . }}
 data:
   pinot-broker.conf: |-
     pinot.broker.client.queryPort={{ .Values.broker.port }}
diff --git a/kubernetes/helm/pinot/templates/broker/statefulset.yml b/kubernetes/helm/pinot/templates/broker/statefulset.yml
index 4c5fc1e..6ad996b 100644
--- a/kubernetes/helm/pinot/templates/broker/statefulset.yml
+++ b/kubernetes/helm/pinot/templates/broker/statefulset.yml
@@ -88,4 +88,4 @@ spec:
       volumes:
         - name: config
           configMap:
-            name: broker-config
+            name: {{ include "pinot.broker.config" . }}
diff --git a/kubernetes/helm/pinot/templates/controller/configmap.yaml b/kubernetes/helm/pinot/templates/controller/configmap.yaml
index 7e6cf87..69d24a8 100644
--- a/kubernetes/helm/pinot/templates/controller/configmap.yaml
+++ b/kubernetes/helm/pinot/templates/controller/configmap.yaml
@@ -20,7 +20,7 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: controller-config
+  name: {{ include "pinot.controller.config" . }}
 data:
   pinot-controller.conf: |-
     controller.helix.cluster.name={{ .Values.cluster.name }}
diff --git a/kubernetes/helm/pinot/templates/controller/statefulset.yaml b/kubernetes/helm/pinot/templates/controller/statefulset.yaml
index 8a7b8d5..5836b9d 100644
--- a/kubernetes/helm/pinot/templates/controller/statefulset.yaml
+++ b/kubernetes/helm/pinot/templates/controller/statefulset.yaml
@@ -75,7 +75,7 @@ spec:
       volumes:
       - name: config
         configMap:
-          name: controller-config
+          name: {{ include "pinot.controller.config" . }}
 {{- if not .Values.controller.persistence.enabled }}
       - name: data
         emptyDir: {}
diff --git a/kubernetes/helm/pinot/templates/server/configmap.yaml b/kubernetes/helm/pinot/templates/server/configmap.yaml
index 298fecd..c99e173 100644
--- a/kubernetes/helm/pinot/templates/server/configmap.yaml
+++ b/kubernetes/helm/pinot/templates/server/configmap.yaml
@@ -20,7 +20,7 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: server-config
+  name: {{ include "pinot.server.config" . }}
 data:
   pinot-server.conf: |-
     pinot.server.netty.port={{ .Values.server.ports.netty }}
diff --git a/kubernetes/helm/pinot/templates/server/statefulset.yml b/kubernetes/helm/pinot/templates/server/statefulset.yml
index ebcb74d..51efd73 100644
--- a/kubernetes/helm/pinot/templates/server/statefulset.yml
+++ b/kubernetes/helm/pinot/templates/server/statefulset.yml
@@ -82,7 +82,7 @@ spec:
       volumes:
         - name: config
           configMap:
-            name: server-config
+            name: {{ include "pinot.server.config" . }}
       {{- if not .Values.server.persistence.enabled }}
         - name: data
           emptyDir: {}


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