apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: nexus-oss
  name: nexus-oss
spec:
  replicas: 1
  strategy: {}
  selector:
    matchLabels:
      app: nexus-oss
  template:
    metadata:
      labels:
        app: nexus-oss
    spec:
      containers:
      - env:
        - name: foobar
          value: fred
        - name: INSTALL4J_ADD_VM_PARAMS
          value: "-Djava.util.prefs.userRoot=/userRoot"
        image: sonatype/nexus3:3.17.0
        name: nexus-oss
        ports:
        - containerPort: 8081
        volumeMounts:
        - mountPath: /nexus-data
          name: nexus-data-claim
        - mountPath: /userRoot
          name: nexus-user-root-claim
        - mountPath: /blob-store
          name: nexus-blob-store-claim
        resources:
          limits:
            memory: "6Gi"
            cpu: "4"
          requests:
            memory: "4Gi"
            cpu: "3"
        readinessProbe:
          tcpSocket:
            port: 8081
          initialDelaySeconds: 60
          periodSeconds: 10
      restartPolicy: Always
      volumes:
      - name: nexus-data-claim
        persistentVolumeClaim:
          claimName: nexus-data-claim
      - name: nexus-user-root-claim
        persistentVolumeClaim:
          claimName: nexus-user-root-claim
      - name: nexus-blob-store-claim
        persistentVolumeClaim:
          claimName: nexus-blob-store-claim
