You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/01/18 18:16:56 UTC

[GitHub] merlimat commented on a change in pull request #1047: Add StatefulSet option for BookKeeper on Google Kubernetes Engine

merlimat commented on a change in pull request #1047: Add StatefulSet option for BookKeeper on Google Kubernetes Engine
URL: https://github.com/apache/incubator-pulsar/pull/1047#discussion_r162426300
 
 

 ##########
 File path: kubernetes/google-kubernetes-engine/bookie.yaml
 ##########
 @@ -17,120 +17,153 @@
 # under the License.
 #
 
+## Credits to Franck Cuny : https://github.com/fcuny/distributedlog-on-k8s/blob/master/bookkeeper.statefulset.yaml
 
+# SSDs for bookie journal storage
+apiVersion: storage.k8s.io/v1
+kind: StorageClass
+metadata:
+  name: bookie-ssd
+provisioner: kubernetes.io/gce-pd
+parameters:
+  type: pd-ssd
+  zones: us-central1-a
+---
+# HDDs for bookie ledger storage
+apiVersion: storage.k8s.io/v1
+kind: StorageClass
+metadata:
+  name: bookie-hdd
+provisioner: kubernetes.io/gce-pd
+parameters:
+  type: pd-standard
+  zones: us-central1-a
+---
 apiVersion: v1
 kind: ConfigMap
 metadata:
-    name: bookie-config
+  name: bookie-config
 data:
-    PULSAR_MEM: "\" -Xms4g -Xmx4g -XX:MaxDirectMemorySize=4g\""
-    PULSAR_GC: "\" -XX:+UseG1GC \""
-    dbStorage_writeCacheMaxSizeMb: "1024"
-    dbStorage_readAheadCacheMaxSizeMb: "1024"
-    zkServers: zk-0.zookeeper,zk-1.zookeeper,zk-2.zookeeper
-    statsProviderClass: org.apache.bookkeeper.stats.PrometheusMetricsProvider
+  PULSAR_MEM: "\" -Xms4g -Xmx4g -XX:MaxDirectMemorySize=4g\""
+  PULSAR_GC: "\" -XX:+UseG1GC \""
+  dbStorage_writeCacheMaxSizeMb: "1024"
+  dbStorage_readAheadCacheMaxSizeMb: "1024"
+  zkServers: zk-0.zookeeper,zk-1.zookeeper,zk-2.zookeeper
+  statsProviderClass: org.apache.bookkeeper.stats.PrometheusMetricsProvider
 ---
-
-## BookKeeper servers need to access the local disks and the pods
-## 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
-apiVersion: extensions/v1beta1
-kind: DaemonSet
+# A headless service to create DNS records
+apiVersion: v1
+kind: Service
 metadata:
-    name: bookie
-    labels:
-        app: pulsar
-        component: bookkeeper
+  name: bookkeeper
+  labels:
+    app: pulsar
+    component: bookkeeper
+  annotations:
+    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
 
 Review comment:
   Is this annotation needed? I think is only required for ZK since basically it means to add the nodes to DNS even before the `isReady()` scripts is happy. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services