apiVersion: apps/v1
kind: Deployment
metadata:
annotations: { }
name: sentry-kafka
namespace: sentry
spec:
replicas: 1
selector:
matchLabels:
app: sentry-kafka
template:
metadata:
labels:
app: sentry-kafka
spec:
enableServiceLinks: false
containers:
- image: confluentinc/cp-kafka:5.5.0
imagePullPolicy: IfNotPresent
name: sentry-kafka
ports:
- containerPort: 9092
env:
- name: 'KAFKA_BROKER_ID'
value: '1'
- name: 'KAFKA_ZOOKEEPER_CONNECT'
value: 'sentry-zookeeper:2181'
- name: 'KAFKA_ADVERTISED_LISTENERS'
value: 'PLAINTEXT://sentry-kafka:9092'
- name: 'KAFKA_ADVERTISED_HOST_NAME'
value: 'sentry-kafka'
- name: 'KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR'
value: '1'
- name: 'KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS'
value: '1'
- name: 'KAFKA_LOG_RETENTION_HOURS'
value: '24'
- name: 'KAFKA_MESSAGE_MAX_BYTES'
value: '50000000'
- name: 'KAFKA_MAX_REQUEST_SIZE'
value: '50000000'
- name: 'CONFLUENT_SUPPORT_METRICS_ENABLE'
value: 'false'
- name: 'KAFKA_LOG4J_LOGGERS'
# value: 'kafka.cluster=WARN,kafka.controller=WARN,kafka.coordinator=WARN,kafka.log=WARN,kafka.server=WARN,kafka.zookeeper=WARN,state.change.logger=WARN'
value: 'kafka.cluster=DEBUG,kafka.controller=DEBUG,kafka.coordinator=DEBUG,kafka.log=DEBUG,kafka.server=DEBUG,kafka.zookeeper=DEBUG,state.change.logger=DEBUG'
- name: 'KAFKA_LOG4J_ROOT_LOGLEVEL'
# value: 'WARN'
value: 'DEBUG'
- name: 'KAFKA_TOOLS_LOG4J_LOGLEVEL'
# value: 'WARN'
value: 'DEBUG'
volumeMounts:
- mountPath: /var/lib/kafka/data
name: sentry-kafka-data
- mountPath: /var/lib/kafka/log
name: sentry-kafka-logs
- mountPath: /etc/kafka/secrets
name: sentry-common-secrets
volumes:
- name: sentry-kafka-data
hostPath:
path: /home/minikube/data/sentry/kafka/data
type: Directory
- name: sentry-kafka-logs
hostPath:
path: /home/minikube/data/sentry/kafka/logs
type: Directory
- name: sentry-common-secrets
hostPath:
path: /home/minikube/data/sentry/common/secrets
type: Directory
---
apiVersion: v1
kind: Service
metadata:
annotations: { }
labels:
app: sentry-kafka
name: sentry-kafka
namespace: sentry
spec:
ports:
- port: 9092
protocol: TCP
targetPort: 9092
name: kafka
selector:
app: sentry-kafka
type: ClusterIP
Comments