Advertisement
puggan

sentry-kafka.yaml

May 3rd, 2021
812
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.92 KB | None | 0 0
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4.   annotations: { }
  5.   name: sentry-kafka
  6.   namespace: sentry
  7. spec:
  8.   replicas: 1
  9.   selector:
  10.     matchLabels:
  11.       app: sentry-kafka
  12.   template:
  13.     metadata:
  14.       labels:
  15.         app: sentry-kafka
  16.     spec:
  17.       enableServiceLinks: false
  18.       containers:
  19.         - image: confluentinc/cp-kafka:5.5.0
  20.           imagePullPolicy: IfNotPresent
  21.           name: sentry-kafka
  22.           ports:
  23.             - containerPort: 9092
  24.           env:
  25.             - name: 'KAFKA_BROKER_ID'
  26.               value: '1'
  27.             - name: 'KAFKA_ZOOKEEPER_CONNECT'
  28.               value: 'sentry-zookeeper:2181'
  29.             - name: 'KAFKA_ADVERTISED_LISTENERS'
  30.               value: 'PLAINTEXT://sentry-kafka:9092'
  31.             - name: 'KAFKA_ADVERTISED_HOST_NAME'
  32.               value: 'sentry-kafka'
  33.             - name: 'KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR'
  34.               value: '1'
  35.             - name: 'KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS'
  36.               value: '1'
  37.             - name: 'KAFKA_LOG_RETENTION_HOURS'
  38.               value: '24'
  39.             - name: 'KAFKA_MESSAGE_MAX_BYTES'
  40.               value: '50000000'
  41.             - name: 'KAFKA_MAX_REQUEST_SIZE'
  42.               value: '50000000'
  43.             - name: 'CONFLUENT_SUPPORT_METRICS_ENABLE'
  44.               value: 'false'
  45.             - name: 'KAFKA_LOG4J_LOGGERS'
  46. #              value: 'kafka.cluster=WARN,kafka.controller=WARN,kafka.coordinator=WARN,kafka.log=WARN,kafka.server=WARN,kafka.zookeeper=WARN,state.change.logger=WARN'
  47.               value: 'kafka.cluster=DEBUG,kafka.controller=DEBUG,kafka.coordinator=DEBUG,kafka.log=DEBUG,kafka.server=DEBUG,kafka.zookeeper=DEBUG,state.change.logger=DEBUG'
  48.             - name: 'KAFKA_LOG4J_ROOT_LOGLEVEL'
  49. #              value: 'WARN'
  50.               value: 'DEBUG'
  51.             - name: 'KAFKA_TOOLS_LOG4J_LOGLEVEL'
  52. #              value: 'WARN'
  53.               value: 'DEBUG'
  54.           volumeMounts:
  55.             - mountPath: /var/lib/kafka/data
  56.               name: sentry-kafka-data
  57.             - mountPath: /var/lib/kafka/log
  58.               name: sentry-kafka-logs
  59.             - mountPath: /etc/kafka/secrets
  60.               name: sentry-common-secrets
  61.       volumes:
  62.         - name: sentry-kafka-data
  63.           hostPath:
  64.             path: /home/minikube/data/sentry/kafka/data
  65.             type: Directory
  66.         - name: sentry-kafka-logs
  67.           hostPath:
  68.             path: /home/minikube/data/sentry/kafka/logs
  69.             type: Directory
  70.         - name: sentry-common-secrets
  71.           hostPath:
  72.             path: /home/minikube/data/sentry/common/secrets
  73.             type: Directory
  74. ---
  75. apiVersion: v1
  76. kind: Service
  77. metadata:
  78.   annotations: { }
  79.   labels:
  80.     app: sentry-kafka
  81.   name: sentry-kafka
  82.   namespace: sentry
  83. spec:
  84.   ports:
  85.     - port: 9092
  86.       protocol: TCP
  87.       targetPort: 9092
  88.       name: kafka
  89.   selector:
  90.     app: sentry-kafka
  91.   type: ClusterIP
  92.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement