-
Notifications
You must be signed in to change notification settings - Fork 2
/
repo.eclipse.org.yml
130 lines (130 loc) · 3.56 KB
/
repo.eclipse.org.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#*******************************************************************************
# Copyright (c) 2019 Eclipse Foundation and others.
# This program and the accompanying materials are made available
# under the terms of the Eclipse Public License 2.0
# which is available at http://www.eclipse.org/legal/epl-v20.html,
# or the MIT License which is available at https://opensource.org/licenses/MIT.
# SPDX-License-Identifier: EPL-2.0 OR MIT
#*******************************************************************************
apiVersion: v1
kind: Namespace
metadata:
name: repo-eclipse-org
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
namespace: repo-eclipse-org
name: nexus
spec:
replicas: 1
selector:
matchLabels:
app: nexus
serviceName: nexus
template:
metadata:
labels:
app: nexus
name: nexus
spec:
terminationGracePeriodSeconds: 60
containers:
- name: nexus
image: eclipsecbi/nexus:2.15.1-02
imagePullPolicy: Always
livenessProbe:
exec:
command:
- /bin/bash
- -c
- "test \"$(curl -fs -H 'Accept: application/json' http://localhost:8081/service/local/status | jq -r '.data.state')\" == 'STARTED'"
periodSeconds: 30
timeoutSeconds: 60
readinessProbe:
exec:
command:
- /bin/bash
- -c
- "test \"$(curl -fs -H 'Accept: application/json' http://localhost:8081/service/local/status | jq -r '.data.state')\" == 'STARTED'"
periodSeconds: 10
timeoutSeconds: 30
startupProbe:
httpGet:
path: /service/local/status
port: 8081
periodSeconds: 10
failureThreshold: 360
ports:
- containerPort: 8081
protocol: TCP
resources:
requests:
cpu: "2"
limits:
cpu: "4"
memory: 8Gi
volumeMounts:
- mountPath: /var/nexus/work
name: nexus-work
- mountPath: /tmp/nexus
name: nexus-tmp
env:
- name: JAVA_OPTS
# -XX:+UseContainerSupport -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle are set in parent image via JAVA_TOOL_OPTIONS
# sun.zip.disableMemoryMapping=true is necessary until it starts running on jdk9 and latter (see https://bugs.java.com/bugdatabase/view_bug.do?bug_id=7129299)
value: >-
-XshowSettings:vm
-Dsun.zip.disableMemoryMapping=true
-Djava.io.tmpdir=/tmp/nexus
-Dorg.sonatype.nexus.proxy.maven.routing.Config.prefixFileMaxSize=500000
volumes:
- name: nexus-tmp
emptyDir: {}
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nexus-work
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1000Gi
volumeMode: Filesystem
---
apiVersion: v1
kind: Service
metadata:
namespace: repo-eclipse-org
name: nexus
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8081
selector:
app: nexus
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
namespace: repo-eclipse-org
annotations:
haproxy.router.openshift.io/timeout: 60s
haproxy.router.openshift.io/disable_cookies: 'true'
name: nexus
spec:
host: repo.eclipse.org
path: /
port:
targetPort: http
tls:
insecureEdgeTerminationPolicy: Redirect
termination: edge
to:
kind: "Service"
name: "nexus"
weight: 100