apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: graphdb-statefulset
  labels:
    app: graphdb
spec:
  serviceName: "graphdb-service"
  replicas: 1
  selector:
    matchLabels:
      app: graphdb

  template:
    metadata:
      name: graphdb-pod
      labels:
        app: graphdb
    spec:
      containers:
        - name: graphdb
          image: neo4j:3.5.3
          ports:
            - containerPort: 7687
          envFrom:
            - secretRef:
                name: graphdb-secrets
          volumeMounts:
          - name: www
            mountPath: /data

  volumeClaimTemplates:
  - metadata:
      name: www
    spec:
      accessModes: [ "ReadWriteOnce" ]
      resources:
        requests:
          storage: 1Gi
