# file name: customized-values-pulsar.yaml
components:
  functions: false
  proxy: false
  toolset: false
  pulsar_manager: false

# default image tag for pulsar images
# uses chart's appVersion when unspecified
defaultPulsarImageTag: 2.10.4

images:
  zookeeper:
    repository: apachepulsar/pulsar
  bookie:
    repository: apachepulsar/pulsar
  autorecovery:
    repository: apachepulsar/pulsar
  broker:
    repository: apachepulsar/pulsar

zookeeper:
  replicaCount: 3
  podManagementPolicy: OrderedReady
  podMonitor:
    enabled: false
  restartPodsOnConfigMapChange: true
  annotations:
    # This is workaround until https://github.com/apache/pulsar-helm-chart/pull/348 is merged
    # Needed on deployments that don't set custom annotations and use restartPodsOnConfigMapChange=truw
    foo: bar
  # IMPORTANT: If you're upgrading from version < 2.10, enable this option or the upgrade will fail
  # securityContext:
  #   fsGroupChangePolicy: "Always"
  volumes:
    data:
      name: data
      size: 2Gi
      storageClassName: mystorageclass

bookkeeper:
  replicaCount: 3
  podMonitor:
    enabled: false
  restartPodsOnConfigMapChange: true
  resources:
    requests:
      cpu: 0.2
      memory: 128Mi
  # IMPORTANT: If you're upgrading from version < 2.10, enable this option or the upgrade will fail
  # securityContext:
  #   fsGroupChangePolicy: "Always"
  volumes:
    journal:
      name: journal
      size: 5Gi
      storageClassName: mystorageclass
    ledgers:
      name: ledgers
      size: 5Gi
      storageClassName: mystorageclass

  configData:
    PULSAR_GC: >
      -XX:+UseG1GC
      -XX:MaxGCPauseMillis=10
      -XX:+ParallelRefProcEnabled
      -XX:+UnlockExperimentalVMOptions
      -XX:+DoEscapeAnalysis
      -XX:ParallelGCThreads=4
      -XX:ConcGCThreads=4
      -XX:G1NewSizePercent=50
      -XX:+DisableExplicitGC
      -XX:-ResizePLAB
      -XX:+ExitOnOutOfMemoryError
      -XX:+PerfDisableSharedMem      
    PULSAR_MEM: >
            -Xms128m -Xmx256m -XX:MaxDirectMemorySize=128m

autorecovery:
  podMonitor:
    enabled: false
  restartPodsOnConfigMapChange: true
  configData:
    BOOKIE_MEM: >
            -Xms64m -Xmx128m -XX:MaxDirectMemorySize=128m

pulsar_metadata:
  image:
    repository: apachepulsar/pulsar

broker:
  replicaCount: 2
  podMonitor:
    enabled: false
  restartPodsOnConfigMapChange: true
  resources:
    requests:
      cpu: 0.2
      memory: 256Mi
  configData:
    PULSAR_MEM: >
            -Xms128m -Xmx256m -XX:MaxDirectMemorySize=128m
    managedLedgerDefaultEnsembleSize: "2"
    managedLedgerDefaultWriteQuorum: "2"
    managedLedgerDefaultAckQuorum: "2"
    subscriptionExpirationTimeMinutes: "5"
    systemTopicEnabled: "true"
    topicLevelPoliciesEnabled: "true"

proxy:
  podMonitor:
    enabled: false

kube-prometheus-stack:
  enabled: false
