Skip to content

Commit

Permalink
Merged in feature/add_antiaffinity_topologykey_param-2.7.0 (pull requ…
Browse files Browse the repository at this point in the history
…est #2)

Feature/add antiaffinity topologykey param 2.7.0

Approved-by: Volodymyr Goldetskyi
  • Loading branch information
lfuso authored and volodymyr-goldetskyi-sag committed May 26, 2021
2 parents cfdb6e2 + 75d78c6 commit 2370388
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 41 deletions.
5 changes: 4 additions & 1 deletion charts/pulsar/templates/autorecovery-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,8 @@ spec:
{{- include "pulsar.autorecovery.certs.volumeMounts" . | nindent 8 }}
volumes:
{{- include "pulsar.autorecovery.certs.volumes" . | nindent 6 }}
{{- if .Values.imagePullSecret }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
{{- end }}
{{- end }}

4 changes: 4 additions & 0 deletions charts/pulsar/templates/bookkeeper-cluster-initialize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@ spec:
volumes:
{{- include "pulsar.toolset.certs.volumes" . | nindent 6 }}
restartPolicy: Never
{{- if .Values.imagePullSecret }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
{{- end }}
{{- end }}
{{- end }}
8 changes: 6 additions & 2 deletions charts/pulsar/templates/bookkeeper-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ spec:
operator: In
values:
- {{ .Values.bookkeeper.component }}
topologyKey: "kubernetes.io/hostname"
topologyKey: "{{ default "kubernetes.io/hostname" .Values.bookkeeper.affinity.anti_affinity_topology_key }}"
{{ else }}
{{ .Values.bookkeeper.affinity.type }}:
- weight: 100
Expand All @@ -94,7 +94,7 @@ spec:
operator: In
values:
- {{ .Values.bookkeeper.component }}
topologyKey: "kubernetes.io/hostname"
topologyKey: "{{ default "kubernetes.io/hostname" .Values.bookkeeper.affinity.anti_affinity_topology_key }}"
{{ end }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.bookkeeper.gracePeriod }}
Expand Down Expand Up @@ -179,6 +179,10 @@ spec:
emptyDir: {}
{{- end }}
{{- include "pulsar.bookkeeper.certs.volumes" . | nindent 6 }}
{{- if .Values.imagePullSecret }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
{{- end }}
{{- if and (and .Values.persistence .Values.volumes.persistence) .Values.bookkeeper.volumes.persistence}}
volumeClaimTemplates:
- metadata:
Expand Down
4 changes: 4 additions & 0 deletions charts/pulsar/templates/broker-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,8 @@ spec:
{{- end}}
{{- end}}
{{- include "pulsar.broker.certs.volumes" . | nindent 6 }}
{{- if .Values.imagePullSecret }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/pulsar/templates/proxy-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,8 @@ spec:
path: tls.key
{{- end}}
{{- end}}
{{- if .Values.imagePullSecret }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/pulsar/templates/pulsar-cluster-initialize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,9 @@ spec:
volumes:
{{- include "pulsar.toolset.certs.volumes" . | nindent 6 }}
restartPolicy: Never
{{- if .Values.imagePullSecret }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/pulsar/templates/toolset-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,8 @@ spec:
path: ca.crt
{{- end}}
{{- include "pulsar.toolset.certs.volumes" . | nindent 6 }}
{{- if .Values.imagePullSecret }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
{{- end }}
{{- end }}
8 changes: 6 additions & 2 deletions charts/pulsar/templates/zookeeper-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
operator: In
values:
- {{ .Values.zookeeper.component }}
topologyKey: "kubernetes.io/hostname"
topologyKey: "{{ default "kubernetes.io/hostname" .Values.zookeeper.affinity.anti_affinity_topology_key }}"
{{ else }}
{{ .Values.zookeeper.affinity.type }}:
- weight: 100
Expand All @@ -91,7 +91,7 @@ spec:
operator: In
values:
- {{ .Values.zookeeper.component }}
topologyKey: "kubernetes.io/hostname"
topologyKey: "{{ default "kubernetes.io/hostname" .Values.zookeeper.affinity.anti_affinity_topology_key }}"
{{ end }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.zookeeper.gracePeriod }}
Expand Down Expand Up @@ -200,6 +200,10 @@ spec:
name: "{{ template "pulsar.fullname" . }}-keytool-configmap"
defaultMode: 0755
{{- end}}
{{- if .Values.imagePullSecret }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
{{- end }}
{{- if and (and .Values.persistence .Values.volumes.persistence) .Values.zookeeper.volumes.persistence }}
volumeClaimTemplates:
- metadata:
Expand Down
107 changes: 71 additions & 36 deletions charts/pulsar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ namespaceCreate: false
## clusterDomain as defined for your k8s cluster
clusterDomain: cluster.local

imagePullSecret: stageregsecret

###
### Global Settings
###
Expand Down Expand Up @@ -93,9 +95,9 @@ components:
# broker
broker: true
# functions
functions: true
functions: false
# proxy
proxy: true
proxy: false
# toolset
toolset: true
# pulsar manager
Expand Down Expand Up @@ -136,28 +138,28 @@ extra:
## Control what images to use for each component
images:
zookeeper:
repository: apachepulsar/pulsar-all
tag: 2.6.1
repository: c8y-pulsar
tag: 2.7.0
pullPolicy: IfNotPresent
bookie:
repository: apachepulsar/pulsar-all
tag: 2.6.1
repository: c8y-pulsar
tag: 2.7.0
pullPolicy: IfNotPresent
autorecovery:
repository: apachepulsar/pulsar-all
tag: 2.6.1
repository: c8y-pulsar
tag: 2.7.0
pullPolicy: IfNotPresent
broker:
repository: apachepulsar/pulsar-all
tag: 2.6.1
repository: c8y-pulsar
tag: 2.7.0
pullPolicy: IfNotPresent
proxy:
repository: apachepulsar/pulsar-all
tag: 2.6.1
repository: c8y-pulsar
tag: 2.7.0
pullPolicy: IfNotPresent
functions:
repository: apachepulsar/pulsar-all
tag: 2.6.1
repository: c8y-pulsar
tag: 2.7.0
prometheus:
repository: prom/prometheus
tag: v2.17.2
Expand Down Expand Up @@ -309,8 +311,11 @@ zookeeper:
gracePeriod: 30
resources:
requests:
memory: 256Mi
cpu: 0.1
memory: 512Mi
cpu: 0.3
limits:
memory: 512Mi
cpu: 0.3
volumes:
# use a persistent volume or emptyDir
persistence: true
Expand All @@ -334,7 +339,7 @@ zookeeper:
##
configData:
PULSAR_MEM: >
-Xms64m -Xmx128m
-Xms128m -Xmx256m
PULSAR_GC: >
-XX:+UseG1GC
-XX:MaxGCPauseMillis=10
Expand Down Expand Up @@ -375,7 +380,10 @@ bookkeeper:
# requests:
# memory: 4Gi
# cpu: 2
replicaCount: 4
# limits:
# memory: 4Gi
# cpu: 2
replicaCount: 3
updateStrategy:
type: RollingUpdate
podManagementPolicy: Parallel
Expand Down Expand Up @@ -417,8 +425,11 @@ bookkeeper:
gracePeriod: 30
resources:
requests:
memory: 512Mi
cpu: 0.2
memory: 2048Mi
cpu: 2
limits:
memory: 2048Mi
cpu: 2
volumes:
# use a persistent volume or emptyDir
persistence: true
Expand All @@ -439,7 +450,7 @@ bookkeeper:
# provisioner: kubernetes.io/gce-pd
ledgers:
name: ledgers
size: 50Gi
size: 200Gi
local_storage: true
## If you already have an existent storage class and want to reuse it, you can specify its name with the option below
##
Expand All @@ -458,9 +469,9 @@ bookkeeper:
configData:
# we use `bin/pulsar` for starting bookie daemons
PULSAR_MEM: >
-Xms128m
-Xmx256m
-XX:MaxDirectMemorySize=256m
-Xms256m
-Xmx1024m
-XX:MaxDirectMemorySize=512m
PULSAR_GC: >
-XX:+UseG1GC
-XX:MaxGCPauseMillis=10
Expand All @@ -482,8 +493,8 @@ bookkeeper:
-Xloggc:/var/log/bookie-gc.log
-XX:G1LogLevel=finest
# configure the memory settings based on jvm memory settings
dbStorage_writeCacheMaxSizeMb: "32"
dbStorage_readAheadCacheMaxSizeMb: "32"
dbStorage_writeCacheMaxSizeMb: "64"
dbStorage_readAheadCacheMaxSizeMb: "64"
dbStorage_rocksDB_writeBufferSizeMB: "8"
dbStorage_rocksDB_blockCacheSize: "8388608"
## Bookkeeper Service
Expand Down Expand Up @@ -523,7 +534,10 @@ autorecovery:
resources:
requests:
memory: 64Mi
cpu: 0.05
cpu: 0.5
limits:
memory: 64Mi
cpu: 0.5
## Bookkeeper auto-recovery configmap
## templates/autorecovery-configmap.yaml
##
Expand All @@ -542,7 +556,7 @@ pulsar_metadata:
image:
# the image used for running `pulsar-cluster-initialize` job
repository: apachepulsar/pulsar-all
tag: 2.6.1
tag: 2.7.0
pullPolicy: IfNotPresent
## set an existing configuration store
# configurationStore:
Expand Down Expand Up @@ -602,14 +616,17 @@ broker:
gracePeriod: 30
resources:
requests:
memory: 512Mi
cpu: 0.2
memory: 3072Mi
cpu: 2
limits:
memory: 3072Mi
cpu: 2
## Broker configmap
## templates/broker-configmap.yaml
##
configData:
PULSAR_MEM: >
-Xms128m -Xmx256m -XX:MaxDirectMemorySize=256m
-Xms512m -Xmx2048m -XX:MaxDirectMemorySize=512m
PULSAR_GC: >
-XX:+UseG1GC
-XX:MaxGCPauseMillis=10
Expand All @@ -625,8 +642,8 @@ broker:
-XX:-ResizePLAB
-XX:+ExitOnOutOfMemoryError
-XX:+PerfDisableSharedMem
managedLedgerDefaultEnsembleSize: "2"
managedLedgerDefaultWriteQuorum: "2"
managedLedgerDefaultEnsembleSize: "3"
managedLedgerDefaultWriteQuorum: "3"
managedLedgerDefaultAckQuorum: "2"
## Broker service
## templates/broker-service.yaml
Expand Down Expand Up @@ -693,14 +710,17 @@ proxy:
gracePeriod: 30
resources:
requests:
memory: 128Mi
cpu: 0.2
memory: 1024Mi
cpu: 2
limits:
memory: 1024Mi
cpu: 2
## Proxy configmap
## templates/proxy-configmap.yaml
##
configData:
PULSAR_MEM: >
-Xms64m -Xmx64m -XX:MaxDirectMemorySize=64m
-Xms128m -Xmx512 -XX:MaxDirectMemorySize=128m
PULSAR_GC: >
-XX:+UseG1GC
-XX:MaxGCPauseMillis=10
Expand Down Expand Up @@ -769,6 +789,9 @@ dashboard:
requests:
memory: 1Gi
cpu: 250m
limits:
memory: 1Gi
cpu: 250m
## Dashboard service
## templates/dashboard-service.yaml
##
Expand Down Expand Up @@ -808,6 +831,9 @@ toolset:
requests:
memory: 256Mi
cpu: 0.1
limits:
memory: 256Mi
cpu: 0.1
## Bastion configmap
## templates/bastion-configmap.yaml
##
Expand Down Expand Up @@ -842,6 +868,9 @@ prometheus:
requests:
memory: 256Mi
cpu: 0.1
limits:
memory: 256Mi
cpu: 0.1
volumes:
# use a persistent volume or emptyDir
persistence: true
Expand Down Expand Up @@ -881,6 +910,9 @@ grafana:
requests:
memory: 250Mi
cpu: 0.1
limits:
memory: 250Mi
cpu: 0.1
## Grafana service
## templates/grafana-service.yaml
##
Expand Down Expand Up @@ -933,6 +965,9 @@ pulsar_manager:
requests:
memory: 250Mi
cpu: 0.1
limits:
memory: 250Mi
cpu: 0.1
configData:
REDIRECT_HOST: "http://127.0.0.1"
REDIRECT_PORT: "9527"
Expand Down

0 comments on commit 2370388

Please sign in to comment.