apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: zookeeper
spec:
  selector:
    matchLabels:
      app: zookeeper
  serviceName: zookeeper
  replicas: 1
  podManagementPolicy: Parallel
  template:
    metadata:
      labels:
        tier: backend
        component: cache
        app: zookeeper
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "7000"
    spec:
      containers:
        - name: zookeeper
          image: bitnami/zookeeper:3-debian-10
          imagePullPolicy: Always
          ports:
            - containerPort: 2181
          env:
            - name: ALLOW_ANONYMOUS_LOGIN
              value: "yes"
            - name: ZOO_ENABLE_PROMETHEUS_METRICS
              value: "yes"
