apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: trow-set
spec:
  selector:
    matchLabels:
      app: trow
  serviceName: trow
  template:
    metadata:
      labels:
        app: trow
    spec:
      containers:
      - name: trow-pod
        image: containersol/trow:0.3
        args: 
          - "--no-tls" 
          - "-n" 
          - "myregistry.mydomain.io" 
          - "-u" 
          - "myuser" 
          - "--password-file" 
          - "/etc/trow/pass"
        imagePullPolicy: Always
        ports:
        - name: trow-http-port
          containerPort: 8000
        - name: trow-https-port
          containerPort: 8443
        volumeMounts:
        - name: data-vol
          mountPath: /data
        - name: trow-pass
          mountPath: /etc/trow
          readOnly: true
      volumes:
        - name: trow-pass
          secret:
            secretName: trow-pass
            items:
              - key: pass
                path: pass
      securityContext:             
        runAsUser: 333333
        runAsGroup: 333333
        fsGroup: 333333
  volumeClaimTemplates:
    - metadata:
        name: data-vol
      spec:
        accessModes: [ "ReadWriteOnce" ]
        resources:
          requests:
            storage: 20Gi
