You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

nexus-deploy.yaml 1.8 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # cat nexus3/nexus3.yaml
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. labels:
  6. k8s-app: ci4s-nexus3
  7. name: ci4s-nexus3
  8. namespace: ci4s-test
  9. spec:
  10. replicas: 1
  11. selector:
  12. matchLabels:
  13. k8s-app: ci4s-nexus3
  14. template:
  15. metadata:
  16. labels:
  17. k8s-app: ci4s-nexus3
  18. name: ci4s-nexus3
  19. namespace: ci4s-test
  20. spec:
  21. containers:
  22. - name: ci4s-nexus3
  23. image: sonatype/nexus3:3.29.2
  24. imagePullPolicy: IfNotPresent
  25. env:
  26. - name: http_proxy
  27. value: http://172.20.32.253:3128
  28. - name: https_proxy
  29. value: http://172.20.32.253:3128
  30. ports:
  31. - containerPort: 8081
  32. name: web
  33. protocol: TCP
  34. livenessProbe:
  35. httpGet:
  36. path: /
  37. port: 8081
  38. initialDelaySeconds: 540
  39. periodSeconds: 30
  40. failureThreshold: 6
  41. readinessProbe:
  42. httpGet:
  43. path: /
  44. port: 8081
  45. initialDelaySeconds: 540
  46. periodSeconds: 30
  47. failureThreshold: 6
  48. # resources:
  49. # limits:
  50. # cpu: 1000m
  51. # memory: 2Gi
  52. # requests:
  53. # cpu: 500m
  54. # memory: 512Mi
  55. volumeMounts:
  56. - name: nexus-data
  57. mountPath: /nexus-data
  58. volumes:
  59. - name: nexus-data
  60. persistentVolumeClaim:
  61. claimName: ci4s-nexus-data-pvc
  62. ---
  63. apiVersion: v1
  64. kind: Service
  65. metadata:
  66. name: nexus3
  67. namespace: ci4s-test
  68. labels:
  69. k8s-app: nexus3
  70. spec:
  71. selector:
  72. k8s-app: nexus3
  73. type: NodePort
  74. ports:
  75. - name: web
  76. protocol: TCP
  77. port: 8081
  78. targetPort: 8081
  79. nodePort: 31211
  80. - name: dockerpod
  81. protocol: TCP
  82. port: 8082
  83. targetPort: 8082
  84. nodePort: 31212