Skip to content

Commit

Permalink
Merge pull request #12 from kafkaesque-io/enhancements
Browse files Browse the repository at this point in the history
Various fixes and enhancements
  • Loading branch information
cdbartholomew authored Mar 1, 2020
2 parents cedfedc + cc090b6 commit 69fff9e
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 21 deletions.
2 changes: 1 addition & 1 deletion helm-chart-sources/pulsar/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ appVersion: "1.0"
description: Apache Pulsar Helm chart for Kubernetes
name: pulsar
icon: https://kafkaesque.io/wp-content/uploads/2019/04/color_logo_with_background.svg
version: 1.0.11
version: 1.0.12
2 changes: 1 addition & 1 deletion helm-chart-sources/pulsar/ci/gcp-storage-no-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ bookkeeper:

broker:
component: broker
replicaCount: 2
replicaCount: 1
resources:
requests:
memory: 512Mi
Expand Down
84 changes: 84 additions & 0 deletions helm-chart-sources/pulsar/ci/storj-no-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@

persistence: no
enableTests: yes
extra:
autoRecovery: no
bastion: yes

image:
broker:
# If using tiered storage, use pulsar-all image for broker
repository: apachepulsar/pulsar-all

storageOffload:

bucket: tiered-storage
region: us-east-1
maxBlockSizeInBytes: "64000000"
readBufferSizeInBytes: "1000000"
## The following are default values for the cluster. They can be changed
## on each namespace.
managedLedgerOffloadDeletionLagMs: "60000"
managedLedgerOffloadAutoTriggerSizeThresholdBytes: "1000"

# For AWS S3
# ======
# You must create an IAM account with access to the bucket and
# generate keys for that account.
#
driver: s3
accessKey: 2J7EJY4xTK6uHKqnCE4nAhdGfXqy
accessSecret: 4YeYwYdsoFFpvtNFuncWcTVqSTPL
## For s3 compatible services, need to specify the endpoint but
## not needed for AWS
serviceEndpoint: http://127.0.0.1:7777

zookeeper:
resources:
requests:
memory: 512Mi
cpu: 0.3
configData:
PULSAR_MEM: "\"-Xms512m -Xmx512m -Dcom.sun.management.jmxremote -Djute.maxbuffer=10485760 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:+DisableExplicitGC -XX:+PerfDisableSharedMem -Dzookeeper.forceSync=no\""

bookkeeper:
replicaCount: 2
resources:
requests:
memory: 512Mi
cpu: 0.3
configData:
PULSAR_MEM: "\"-Xms512m -Xmx512m -XX:MaxDirectMemorySize=512m -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintHeapAtGC -verbosegc -XX:G1LogLevel=finest\""

broker:
component: broker
replicaCount: 1
resources:
requests:
memory: 1000Mi
cpu: 0.3
configData:
PULSAR_MEM: "\"-Xms512m -Xmx1000m -XX:MaxDirectMemorySize=1000m -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem\""

function:
replicaCount: 1
resources:
requests:
memory: 512Mi
cpu: 0.3
configData:
PULSAR_MEM: "\"-Xms512m -Xmx512m -XX:MaxDirectMemorySize=512m -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem\""

proxy:
replicaCount: 1
resources:
requests:
memory: 512Mi
cpu: 0.3
wsResources:
requests:
memory: 512Mi
cpu: 0.3
configData:
PULSAR_MEM: "\"-Xms512m -Xmx512m -XX:MaxDirectMemorySize=512m\""

2 changes: 1 addition & 1 deletion helm-chart-sources/pulsar/ci/test-notls-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bookkeeper:

broker:
component: broker
replicaCount: 2
replicaCount: 1
resources:
requests:
memory: 400Mi
Expand Down
2 changes: 1 addition & 1 deletion helm-chart-sources/pulsar/ci/test-tls-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ bookkeeper:

broker:
component: broker
replicaCount: 2
replicaCount: 1
resources:
requests:
memory: 400Mi
Expand Down
25 changes: 24 additions & 1 deletion helm-chart-sources/pulsar/templates/broker-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,30 @@ data:
s3ManagedLedgerOffloadBucket: "{{ .Values.storageOffload.bucket }}"
s3ManagedLedgerOffloadRegion: "{{ .Values.storageOffload.region }}"
AWS_ACCESS_KEY_ID: "{{ .Values.storageOffload.accessKey }}"
AWS_SECRET_ACCESS_KEY: "{{ .Values.storageOffload.accessSecret }}"
AWS_SECRET_ACCESS_KEY: "{{ .Values.storageOffload.accessSecret }}"
{{- if .Values.storageOffload.managedLedgerOffloadAutoTriggerSizeThresholdBytes }}
managedLedgerOffloadAutoTriggerSizeThresholdBytes: "{{ .Values.storageOffload.managedLedgerOffloadAutoTriggerSizeThresholdBytes }}"
{{- end }}
{{- if .Values.storageOffload.managedLedgerOffloadDeletionLagMs }}
managedLedgerOffloadDeletionLagMs: "{{ .Values.storageOffload.managedLedgerOffloadDeletionLagMs }}"
{{- end }}
{{- if .Values.storageOffload.maxBlockSizeInBytes }}
s3ManagedLedgerOffloadMaxBlockSizeInBytes: "{{ .Values.storageOffload.maxBlockSizeInBytes }}"
{{- end }}
{{- if .Values.storageOffload.readBufferSizeInBytes }}
s3ManagedLedgerOffloadReadBufferSizeInBytes: "{{ .Values.storageOffload.readBufferSizeInBytes }}"
{{- end }}
{{- end }}
{{- if eq .Values.storageOffload.driver "s3" }}
managedLedgerOffloadDriver: "{{ .Values.storageOffload.driver }}"
s3ManagedLedgerOffloadBucket: "{{ .Values.storageOffload.bucket }}"
s3ManagedLedgerOffloadRegion: "{{ .Values.storageOffload.region }}"
AWS_ACCESS_KEY_ID: "{{ .Values.storageOffload.accessKey }}"
AWS_SECRET_ACCESS_KEY: "{{ .Values.storageOffload.accessSecret }}"
s3ManagedLedgerOffloadServiceEndpoint: "{{ .Values.storageOffload.serviceEndpoint }}"
{{- if .Values.storageOffload.managedLedgerOffloadAutoTriggerSizeThresholdBytes }}
managedLedgerOffloadAutoTriggerSizeThresholdBytes: "{{ .Values.storageOffload.managedLedgerOffloadAutoTriggerSizeThresholdBytes }}"
{{- end }}
{{- if .Values.storageOffload.managedLedgerOffloadDeletionLagMs }}
managedLedgerOffloadDeletionLagMs: "{{ .Values.storageOffload.managedLedgerOffloadDeletionLagMs }}"
{{- end }}
Expand Down
19 changes: 11 additions & 8 deletions helm-chart-sources/pulsar/templates/broker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ spec:
{{- end }}
{{- end }}
initContainers:
# This init container will wait for zookeeper to be ready before
# deploying the bookies
- name: wait-zookeeper-ready
# This init container will wait for bookkeeper to be ready before
# deploying the broker
- name: wait-bookkeeper-ready
image: "{{ .Values.image.broker.repository }}:{{ .Values.image.broker.tag }}"
imagePullPolicy: {{ .Values.image.broker.pullPolicy }}
command: ["sh", "-c"]
args:
- >-
until bin/pulsar zookeeper-shell -server {{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }} ls /admin/clusters | grep "^\[.*{{ template "pulsar.fullname" . }}.*\]"; do
until nslookup {{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ add (.Values.bookkeeper.replicaCount | int) -1 }}.{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}.{{ .Release.Namespace }}; do
sleep 3;
done;
containers:
Expand All @@ -130,8 +130,11 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.broker.probe }}
readinessProbe:
tcpSocket:
port: {{ .Values.broker.probe.port }}
exec:
command:
- /pulsar/bin/pulsar-admin
- brokers
- healthcheck
initialDelaySeconds: {{ .Values.broker.probe.initial }}
periodSeconds: {{ .Values.broker.probe.period }}
livenessProbe:
Expand All @@ -140,8 +143,8 @@ spec:
- /pulsar/bin/pulsar-admin
- brokers
- healthcheck
initialDelaySeconds: 60
periodSeconds: 20
initialDelaySeconds: {{ .Values.broker.probe.initial }}
periodSeconds: {{ .Values.broker.probe.period }}
{{- end }}
{{- if .Values.broker.resources }}
resources:
Expand Down
8 changes: 4 additions & 4 deletions helm-chart-sources/pulsar/templates/proxy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ spec:
secretName: token-websocket
{{- end }}
initContainers:
# This init container will wait for zookeeper to be ready before
# deploying the bookies
- name: wait-zookeeper-ready
# This init container will wait for bookkeeper to be ready before
# deploying the booproxykies
- name: wait-bookkeeper-ready
image: "{{ .Values.image.proxy.repository }}:{{ .Values.image.proxy.tag }}"
imagePullPolicy: {{ .Values.image.proxy.pullPolicy }}
command: ["sh", "-c"]
args:
- >-
until bin/pulsar zookeeper-shell -server {{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }} ls /admin/clusters | grep "^\[.*{{ template "pulsar.fullname" . }}.*\]"; do
until nslookup {{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ add (.Values.bookkeeper.replicaCount | int) -1 }}.{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}.{{ .Release.Namespace }}; do
sleep 3;
done;
containers:
Expand Down
3 changes: 3 additions & 0 deletions helm-chart-sources/pulsar/templates/proxy-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ metadata:
component: {{ .Values.proxy.component }}
cluster: {{ template "pulsar.fullname" . }}
annotations:
{{- if .Values.proxy.service.annotations }}
{{ toYaml .Values.proxy.service.annotations | indent 4 }}
{{- end }}
{{- if .Values.extra.dnsOnProxy }}
external-dns.alpha.kubernetes.io/hostname: {{ .Values.dnsName }}
{{- end }}
Expand Down
14 changes: 10 additions & 4 deletions helm-chart-sources/pulsar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,15 @@ storageOffload: {}
# driver: aws-s3
# accessKey: <access-key>
# accessSecret: <secret-key>
## For s3 compatible services, need to specify the endpoint but
## not needed for AWS
# serviceEndpoint: s3-compatible

# For S3 Compatible
# =================
# Need to create access and secret key for S3 compatible service
#
# driver: s3
# accessKey: <access-key>
# accessSecret: <secret-key>
# serviceEndpoint: host:port

## For Google Cloud Storage
## ====================
Expand Down Expand Up @@ -342,7 +348,7 @@ broker:
functionsWorkerEnabled: no
probe:
port: 8080
initial: 10
initial: 30
period: 10
resources:
requests:
Expand Down

0 comments on commit 69fff9e

Please sign in to comment.