Skip to content

Commit

Permalink
Add bookkeeper service and other fixes (apache#3026)
Browse files Browse the repository at this point in the history
* Add bookkeeper service and other fixes

- Add the topologyKey for the pod affinity for bookies
- Fixed a misspelling in the name of the ledgers disk
- Fixed the selector in the proxy service to select proxy pods

Signed-off-by: Byron Ruth <[email protected]>

* Update bookkeeper service comment to note DNS

Signed-off-by: Byron Ruth <[email protected]>
  • Loading branch information
bruth authored and merlimat committed Nov 21, 2018
1 parent 4e10472 commit ac97846
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
32 changes: 28 additions & 4 deletions deployment/kubernetes/google-kubernetes-engine/bookie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ metadata:
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-ssd
zones: us-central1-a
zones: us-east1-b
---
# HDDs for bookie ledger storage
apiVersion: storage.k8s.io/v1
Expand All @@ -37,7 +37,7 @@ metadata:
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-standard
zones: us-central1-a
zones: us-east1-b
---
apiVersion: v1
kind: ConfigMap
Expand Down Expand Up @@ -67,7 +67,7 @@ spec:
labels:
app: pulsar
component: bookkeeper
cluster: pulsar-gke
cluster: us-east
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8000"
Expand All @@ -78,6 +78,7 @@ spec:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
topologyKey: "kubernetes.io/hostname"
labelSelector:
matchExpressions:
- key: "app"
Expand Down Expand Up @@ -143,7 +144,7 @@ spec:
storage: 10Gi
storageClassName: bookie-ssd
- metadata:
name: ledger-disk
name: ledgers-disk
annotations:
volume.alpha.kubernetes.io/storage-class: default
labels:
Expand All @@ -155,6 +156,29 @@ spec:
storage: 10Gi
storageClassName: bookie-hdd


---
##
## Bookie headless service.
## This is required for resolving intra-cluser hostnames (via k8s DNS)
## from the brokers.
##
apiVersion: v1
kind: Service
metadata:
name: bookkeeper
labels:
app: pulsar
component: bookkeeper
spec:
ports:
- port: 3181
name: server
clusterIP: None
selector:
app: pulsar
component: bookkeeper

---
##
## Run BookKeeper auto-recovery from a different set of containers
Expand Down
2 changes: 1 addition & 1 deletion deployment/kubernetes/google-kubernetes-engine/proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ spec:
protocol: TCP
selector:
app: pulsar
component: broker
component: proxy

0 comments on commit ac97846

Please sign in to comment.