# Default values for kafka.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

## Image Info
## ref: https://hub.docker.com/r/confluentinc/cp-kafka
image:
  registry: docker.io
  repository: confluentinc/cp-kafka
  # Overrides the image tag whose default is the chart appVersion.
  tag: ""
  pullPolicy: IfNotPresent
imagePullSecrets:  []
nameOverride: ""
fullnameOverride: ""

## Kafka Cluster
replicaCount: 3
maxUnavailable: 1

## Kafka Configuration
## ref: https://docs.confluent.io/platform/current/installation/configuration/broker-configs.html
heapOpts: -XX:MaxRAMPercentage=75.0 -XX:InitialRAMPercentage=50.0
confluentSupportMetricsEnable: false
autoCreateTopicsEnable: true
deleteTopicEnable: true
offsetsTopicReplicationFactor: 3
numPartitions: 3
defaultReplicationFactor: 3
minInsyncReplicas: 2
uncleanLeaderElectionEnable: false
logFlushIntervalMessages: 10000
logFlushIntervalMs: 1000
logRetentionBytes: 1073741824
logRetentionCheckIntervalMs: 300000
# logRetentionHours: 168
logRetentionHours: 1
logSegmentBytes: 1073741824
# messageMaxBytes: 10485880000
messageMaxBytes: 10240000

## Kafka Docker Logging - log4j log levels
## ref: https://docs.confluent.io/platform/current/installation/docker/operations/logging.html#configure-docker-logging
log4jRootLoglevel: INFO
log4jLoggers: "kafka.authorizer.logger=INFO,kafka.controller=INFO"

## Ports used by Kafka
## ref: https://rmoff.net/2018/08/02/kafka-listeners-explained/
port:
  kafkaInternal: 9092
  kafkaExternal: 9094
externalAccess:
  enabled: true
  initNodePort: 32400
## turn to support nodePort in docker desktop
isDocker: true

## Kafka Broker Kerberos
## ref: https://docs.confluent.io/platform/current/kafka/authentication_sasl/authentication_sasl_gssapi.html#brokers
kerberos:
  enabled: false
  krb5Conf:
  keyTabSecret:
  testUserKeytabSecret:
  kafkaCltProperties:

## Authorization using ACLs
## ref: https://docs.confluent.io/platform/current/kafka/authorization.html
acls:
  enabled: false

## Zookeeper Configuration
## ref: https://docs.confluent.io/platform/current/zookeeper/deployment.html
zookeeper:
  ## If true, install the zookeeper chart
  enabled: true
  ## If the Zookeeper Chart is disabled a URL and port are required to connect
  url: ""

## Data Persistence
## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
data:
  storageClass: openebs-hostpath
  storageSize: 10Gi

## Configure Liveness and Readiness Probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
livenessProbe:
  enabled: true
  initialDelaySeconds: 300
  periodSeconds: 10
  timeoutSeconds: 5
  failureThreshold: 6
  successThreshold: 1
readinessProbe:
  enabled: true
  initialDelaySeconds: 120
  periodSeconds: 10
  timeoutSeconds: 5
  failureThreshold: 6
  successThreshold: 1

## Configure Pod Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
podSecurityContext:
  fsGroup: 1000

## Configure Container Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
securityContext:
  allowPrivilegeEscalation: false
  readOnlyRootFilesystem: true
  runAsUser: 1000
  runAsGroup: 1000
  capabilities:
    drop:
    - ALL

## Configure Resources for Containers
## ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources:
  limits:
    cpu: 1
    memory: 1400Mi
  requests:
    cpu: 250m
    memory: 512Mi
