forked from dbolkensteyn/kubernetes-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sonarqube.yaml
62 lines (62 loc) · 1.42 KB
/
sonarqube.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
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: sonarqube-deployment
labels:
app: sonarqube
spec:
replicas: 1
selector:
matchLabels:
app: sonarqube
template:
metadata:
labels:
app: sonarqube
spec:
containers:
- name: sonarqube
image: sonarqube:6.7
ports:
- containerPort: 9000
env:
- name: SONARQUBE_JDBC_USERNAME
valueFrom:
secretKeyRef:
name: sonarqube-jdbc
key: user
- name: SONARQUBE_JDBC_PASSWORD
valueFrom:
secretKeyRef:
name: sonarqube-jdbc
key: pass
- name: SONARQUBE_JDBC_URL
valueFrom:
secretKeyRef:
name: sonarqube-jdbc
key: url
command: ["sh", "-c"]
args:
- echo "sonar.log.level=TRACE" >> $SONARQUBE_HOME/conf/sonar.properties &&
$SONARQUBE_HOME/bin/run.sh
resources:
requests:
cpu: 0.51
memory: "2G"
readinessProbe:
exec:
command: ["sh", "-c", "curl -s http://localhost:9000/api/system/status | grep \\\"status\\\":\\\"UP\\\""]
initialDelaySeconds: 30
periodSeconds: 5
---
kind: Service
apiVersion: v1
metadata:
name: sonarqube-service
spec:
type: LoadBalancer
selector:
app: sonarqube
ports:
- protocol: TCP
port: 9000