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

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


The following commit(s) were added to refs/heads/master by this push:
     new 547b7d9cbd6 Replace Helm chart's generic Bookkeeper platform property 
with specific properties (#3798)
547b7d9cbd6 is described below

commit 547b7d9cbd60cec16477672bc12a5a708a834c07
Author: Billy Romansky <[email protected]>
AuthorDate: Sun Apr 10 21:09:47 2022 -0400

    Replace Helm chart's generic Bookkeeper platform property with specific 
properties (#3798)
---
 deploy/kubernetes/helm/templates/bookie.yaml | 14 +++++++-------
 deploy/kubernetes/helm/values.yaml.template  | 16 ++++++++--------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/deploy/kubernetes/helm/templates/bookie.yaml 
b/deploy/kubernetes/helm/templates/bookie.yaml
index abd6b518d7a..02ee6b49aac 100644
--- a/deploy/kubernetes/helm/templates/bookie.yaml
+++ b/deploy/kubernetes/helm/templates/bookie.yaml
@@ -45,7 +45,7 @@ data:
   BK_journalMaxBackups: "{{ .Values.bookieJournalMaxBackups }}"
   BK_journalMaxSizeMB: "{{ .Values.bookieJournalMaxSizeMB }}"
   BK_logSizeLimit: "{{ int64 .Values.bookieLogSizeLimit }}"
-  {{- if or (eq .Values.platform "gke") (eq .Values.platform "minikube") }}
+  {{- if .Values.bookkeeper.useHostNameAsBookieID }}
   BK_useHostNameAsBookieID: "true"
   {{- end }}
   # TODO: Issue 458: https://github.com/apache/bookkeeper/issues/458
@@ -60,7 +60,7 @@ data:
 ## cannot be moved across different nodes.
 ## For this reason, we run BK as a daemon set, one for each node in the
 ## cluster, unless restricted by label selectors
-{{- if or (eq .Values.platform "gke") (eq .Values.platform "minikube") }}
+{{- if .Values.bookkeeper.useStatefulSet }}
 apiVersion: apps/v1
 kind: StatefulSet
 {{- else }}
@@ -79,7 +79,7 @@ spec:
       app: {{ .Release.Name }}-bookkeeper
       component: {{ .Release.Name }}-bookie
       cluster: {{ .Release.Name }}-bookkeeper
-{{- if or (eq .Values.platform "gke") (eq .Values.platform "minikube") }}
+{{- if .Values.bookkeeper.createReplicas }}
   serviceName: {{ .Release.Name }}-bookie
   replicas: {{ $bookieReplicas }}
 {{- end }}
@@ -97,7 +97,7 @@ spec:
         prometheus.io/port: "8000"
 
     spec:
-{{- if eq .Values.platform "gke" }}
+{{- if .Values.bookkeeper.affinityPods }}
       # Make sure multiple pods of bookkeeper don't get scheduled on the
       # same node, unless there are no other available nodes
       affinity:
@@ -154,7 +154,7 @@ spec:
             - name: ledgers-disk
               mountPath: /bookkeeper/data/ledgers
 
-{{- if or (eq .Values.platform "aws") (eq .Values.platform "baremetal") }}
+{{- if .Values.bookkeeper.useHostPath }}
       volumes:
           # Mount local disks
         - name: journal-disk
@@ -165,7 +165,7 @@ spec:
             path: /bookkeeper/data/ledgers
 {{- end }}
 
-{{- if or (eq .Values.platform "gke") (eq .Values.platform "minikube") }}
+{{- if .Values.bookkeeper.useVolumeClaimTemplate }}
   volumeClaimTemplates:
     - metadata:
         name: journal-disk
@@ -206,7 +206,7 @@ spec:
 apiVersion: v1
 kind: Service
 metadata:
-  {{- if or (eq .Values.platform "gke") (eq .Values.platform "minikube") }}
+  {{- if .Values.bookkeeper.tolerateUnreadyEndpoints }}
   annotations:
     service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
   {{- end }}
diff --git a/deploy/kubernetes/helm/values.yaml.template 
b/deploy/kubernetes/helm/values.yaml.template
index 8814bdfb362..7bb14204d4a 100644
--- a/deploy/kubernetes/helm/values.yaml.template
+++ b/deploy/kubernetes/helm/values.yaml.template
@@ -19,14 +19,6 @@
 # This is a YAML-formatted file.
 # Declare variables to be passed into your templates.
 
-# The environment where Heron will be running
-# The following values are valid:
-# "aws" - Amazon Web Services
-# "gke" - Google Kubernetes Engine
-# "minikube" - Kubernetes on a single local node
-# "baremetal" - On-premise cluster
-platform: minikube
-
 # Heron image to use
 image: apache/heron:VERSION
 
@@ -105,6 +97,14 @@ bookkeeper:
   storageClassName: "none"
   prometheus:
     enabled: false
+  # Optional Variables
+  useHostNameAsBookieID: true
+  useStatefulSet: true
+  createReplicas: true
+  affinityPods: false
+  useHostPath: false
+  useVolumeClaimTemplate: true
+  tolerateUnreadyEndpoints: true
 
 zookeeper:
   enabled: true

Reply via email to