-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnexus.yaml
124 lines (124 loc) · 2.88 KB
/
nexus.yaml
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
---
apiVersion: v1
kind: Template
metadata:
name: nexus
annotations:
openshift.io/display-name: Nexus Persistent Template
description: Creates a Nexus with configuration and artifacts stored in a persistent
volume.
iconClass: icon-nexus
tags: instant-app
labels:
app: nexus
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
name: ${APPLICATION_NAME}
spec:
selector:
name: ${APPLICATION_NAME}
replicas: 1
template:
metadata:
labels:
name: "${APPLICATION_NAME}"
spec:
serviceAccountName: "${APPLICATION_NAME}"
containers:
- image: "${NEXUS_IMAGE}"
imagePullPolicy: Always
name: "${APPLICATION_NAME}"
volumeMounts:
- mountPath: /nexus-data
name: nexus-data
volumes:
- name: nexus-data
persistentVolumeClaim:
claimName: nexus-data
triggers:
- imageChangeParams:
automatic: true
containerNames:
- ${APPLICATION_NAME}
from:
kind: ImageStreamTag
name: ${APPLICATION_NAME}:latest
type: ImageChange
- type: ConfigChange
- apiVersion: v1
kind: ImageStream
metadata:
labels:
name: "${APPLICATION_NAME}"
app: "${APPLICATION_NAME}"
name: "${APPLICATION_NAME}"
spec:
tags:
- from:
kind: DockerImage
name: "${CONTAINER_IMAGE}:${CONTAINER_IMAGE_VERSION}"
importPolicy: {}
name: "${CONTAINER_IMAGE_VERSION}"
- apiVersion: v1
kind: ServiceAccount
metadata:
creationTimestamp: null
labels:
template: "${APPLICATION_NAME}"
name: "${APPLICATION_NAME}"
- apiVersion: v1
kind: Service
metadata:
name: "${APPLICATION_NAME}"
spec:
ports:
- name: 8081-tcp
port: 8081
protocol: TCP
targetPort: 8081
selector:
deploymentconfig: "${APPLICATION_NAME}"
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nexus-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "${VOLUME_CAPACITY}"
- apiVersion: v1
kind: Route
metadata:
labels:
name: "${APPLICATION_NAME}"
app: "${APPLICATION_NAME}"
name: "${APPLICATION_NAME}"
spec:
to:
kind: Service
name: "${APPLICATION_NAME}"
weight: 100
wildcardPolicy: None
parameters:
- name: APPLICATION_NAME
required: true
value: nexus
- description: Volume space available for data, e.g. 512Mi, 2Gi
name: VOLUME_CAPACITY
required: true
value: 1Gi
- description: Sonatype Nexus version
displayName: Sonatype Nexus version
name: CONTAINER_IMAGE_VERSION
required: true
value: latest
- description: The Container Image to use for the ImageStream
displayName: Nexus Container Image
name: CONTAINER_IMAGE
value: docker.io/sonatype/nexus3
labels:
template: nexus-persistent-template