# cat nexus3/nexus3.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    k8s-app: ci4s-nexus3
  name: ci4s-nexus3
  namespace: ci4s-test
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: ci4s-nexus3
  template:
    metadata:
      labels:
        k8s-app: ci4s-nexus3
      name: ci4s-nexus3
      namespace: ci4s-test
    spec:
      containers:
      - name: ci4s-nexus3
        image: sonatype/nexus3:3.29.2
        imagePullPolicy: IfNotPresent
        env:
          - name: http_proxy
            value: http://172.20.32.253:3128
          - name: https_proxy
            value: http://172.20.32.253:3128
        ports:
          - containerPort: 8081
            name: web
            protocol: TCP
        livenessProbe:
          httpGet:
            path: /
            port: 8081
          initialDelaySeconds: 540
          periodSeconds: 30
          failureThreshold: 6
        readinessProbe:
          httpGet:
            path: /
            port: 8081
          initialDelaySeconds: 540
          periodSeconds: 30
          failureThreshold: 6
#        resources:
#          limits:
#            cpu: 1000m
#            memory: 2Gi
#          requests:
#            cpu: 500m
#            memory: 512Mi
        volumeMounts:
        - name: nexus-data
          mountPath: /nexus-data
      volumes:
        - name: nexus-data
          persistentVolumeClaim:
            claimName: ci4s-nexus-data-pvc
---
apiVersion: v1
kind: Service
metadata:
  name: nexus3
  namespace: ci4s-test
  labels:
    k8s-app: nexus3
spec:
  selector:
    k8s-app: nexus3
  type: NodePort
  ports:
    - name: web
      protocol: TCP
      port: 8081
      targetPort: 8081
      nodePort: 31211
    - name: dockerpod
      protocol: TCP
      port: 8082
      targetPort: 8082
      nodePort: 31212
