apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: samba-app
  namespace: samba-system
spec:
  serviceName: samba-app-svc
  replicas: 1
  selector:
    matchLabels:
      app: samba-app
  template:
    metadata:
      labels:
        app: samba-app
    spec:
      containers:
        - name: samba
          image: steffenblake/alpine-samba:1.0.0
          ports:
            - containerPort: 445
          volumeMounts:
            - name: samba-pvc
              mountPath: /share
            - name: samba-config-volume
              mountPath: /etc/samba/smb.conf
              subPath: smb.conf
      volumes:
      - name: samba-pvc
        persistentVolumeClaim:
          claimName: samba-pvc
      - name: samba-config-volume
        configMap:
          name: samba-config