
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: zookeeper
spec:
  serviceName: zookeeper
  replicas: 1
  updateStrategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: zookeeper
      component: zookeeper
  podManagementPolicy: Parallel
  template:
    metadata:
      labels:
        app: zookeeper
        component: zookeeper
    spec:
      containers:
      - name: zookeeper
        image: flokkr/zookeeper:3.6.1
        envFrom:
        - configMapRef:
            name: zookeeper-config
        volumeMounts:
        - name: krb5conf
          mountPath: /etc/krb5.conf
          subPath: krb5.conf
        - name: jaas
          mountPath: /etc/zookeeper-jaas
        - name: keytabs
          mountPath: /etc/security/keytabs
      volumes:
      - name: krb5conf
        configMap:
          name: krb5-conf
      - name: jaas
        configMap:
          name: zookeeper-jaas
      - name: keytabs
        secret:
          secretName: zookeeper-keytabs
