apiVersion: apps/v1
kind: ReplicaSet
metadata:
 name: capsnet-fashion-rs
spec:
 replicas: 1
 selector:
  matchLabels:
   app: capsnet-fashion
 template:
  metadata:
   labels:
    app: capsnet-fashion
  spec:
   securityContext:
    # the group id of the owner of the actual directory behind the volume
    # This is actually a leaking abstraction, but the only solution that I have.
    # A better way would've been to have an appropriate ownership on the mounted dir, I guess...?
    supplementalGroups: [1000] 
   containers:
   - name: capsnet-fashion-ctr
     image: smurve/ellie_inference_webapp:latest
     volumeMounts:
     # name must match the volume name below
     - name: ellie
       mountPath: "/var/ellie"
     env:
     - name: MONGO_URL
       value: mongo1-svc:27017
     ports:
     - containerPort: 5000
   volumes:
   - name: ellie
     persistentVolumeClaim:
      claimName: ellie
   nodeSelector:
    capability: gpu

