apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: nexus
    app.kubernetes.io/instance: nexus
    app.kubernetes.io/name: nexus
    app.kubernetes.io/part-of: nexus
  name: nexus
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nexus
  template:
    metadata:
      labels:
        app: nexus
    spec:
      containers:
      - name: nexus
        image: quay.io/siamaksade/nexus3:3.16.2
        env:
        - name: CONTEXT_PATH
          value: /
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 8081
          protocol: TCP
        livenessProbe:
          exec:
            command:
            - echo
            - ok
          failureThreshold: 3
          initialDelaySeconds: 30
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /
            port: 8081
            scheme: HTTP
          initialDelaySeconds: 30
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        resources:
          limits:
            memory: 4Gi
            cpu: 2
          requests:
            memory: 512Mi
            cpu: 200m
        terminationMessagePath: /dev/termination-log
        volumeMounts:
        - mountPath: /nexus-data
          name: nexus-data
      volumes:
      - name: nexus-data
        persistentVolumeClaim:
          claimName: nexus-pv
