---
# Source: openwhisk/templates/couchdb-init-cm.yaml
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: kafka
  labels:
    app: nuvolaris-kafka
spec:
  serviceName: nuvolaris-kafka
  replicas: 1
  selector:
    matchLabels:
      app: nuvolaris-kafka
  template:
    metadata:
      labels:
        app: nuvolaris-kafka
    spec:
#      volumes:
#        - name: kafka-storage
#          persistentVolumeClaim:
#            claimName: kafka-pv-claim
      containers:
        - name: kafka-container
          image: bashj79/kafka-kraft
          ports:
            - containerPort: 9092
              name: kafka
            - containerPort: 9093
              name: kafka-ssl
          env:
            - name: REPLICAS
              value: '1'
            - name: SERVICE
              value: nuvolaris-kafka
            - name: NAMESPACE
              value: default
#            - name: SHARE_DIR
#              value: /mnt/kafka
#          volumeMounts:
#            - name: kafka-storage
#              mountPath: /mnt/kafka

