-
Notifications
You must be signed in to change notification settings - Fork 201
Expand file tree
/
Copy pathsonarqube-template.yaml
More file actions
178 lines (178 loc) · 4.36 KB
/
Copy pathsonarqube-template.yaml
File metadata and controls
178 lines (178 loc) · 4.36 KB
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
kind: Template
apiVersion: v1
metadata:
annotations:
description: The SonarQube OpenShift template
tags: instant-app,sonarqube
name: sonarqube
message: "Login to SonarQube with the default admin user: admin/admin"
objects:
- apiVersion: v1
kind: Service
metadata:
name: sonarqube
labels:
app: sonarqube
spec:
ports:
- name: sonarqube
port: 9000
protocol: TCP
targetPort: 9000
selector:
app: sonarqube
deploymentconfig: sonarqube
sessionAffinity: None
type: ClusterIP
- apiVersion: v1
kind: Route
metadata:
annotations:
description: Route for SonarQube's http service.
name: sonarqube
labels:
app: sonarqube
spec:
to:
kind: Service
name: sonarqube
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: sonarqube
name: sonarqube
spec:
tags:
- annotations:
description: The SonarQube Docker image
tags: sonarqube
from:
kind: DockerImage
name: openshiftdemos/sonarqube:${SONARQUBE_VERSION}
importPolicy: {}
name: ${SONARQUBE_VERSION}
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: sonarqube
deploymentconfig: sonarqube
name: sonarqube
spec:
replicas: 1
selector:
app: sonarqube
deploymentconfig: sonarqube
strategy:
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
annotations:
openshift.io/container.sonarqube.image.entrypoint: '["./bin/run.sh"]'
creationTimestamp: null
labels:
app: sonarqube
deploymentconfig: sonarqube
spec:
containers:
- image: ' '
imagePullPolicy: IfNotPresent
name: sonarqube
ports:
- containerPort: 9000
protocol: TCP
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 60
periodSeconds: 20
successThreshold: 1
httpGet:
port: 9000
path: /
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 60
periodSeconds: 20
successThreshold: 1
httpGet:
port: 9000
path: /
timeoutSeconds: 5
resources:
requests:
cpu: 200m
memory: 1Gi
limits:
cpu: 1
memory: 2Gi
terminationMessagePath: /dev/termination-log
volumeMounts:
- mountPath: /opt/sonarqube/data
name: sonarqube-data
- mountPath: /opt/sonarqube/extensions
name: sonarqube-extensions
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: sonarqube-data
persistentVolumeClaim:
claimName: sonarqube-data
- name: sonarqube-extensions
persistentVolumeClaim:
claimName: sonarqube-extensions
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- sonarqube
from:
kind: ImageStreamTag
name: sonarqube:${SONARQUBE_VERSION}
type: ImageChange
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: sonarqube-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: ${SONAR_DATA_VOLUME_CAPACITY}
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: sonarqube-extensions
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: ${SONAR_EXTENSIONS_VOLUME_CAPACITY}
parameters:
- displayName: SonarQube version
value: "6.7"
name: SONARQUBE_VERSION
required: true
- description: Volume space available for SonarQube Data
displayName: SonarQube Volume Capacity
name: SONAR_DATA_VOLUME_CAPACITY
required: true
value: 1Gi
- description: Volume space available for SonarQube Extensions (used for plugins)
displayName: SonarQube Extensions (plugins) Volume Capacity
name: SONAR_EXTENSIONS_VOLUME_CAPACITY
required: true
value: 1Gi