-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstatefulset.yaml
60 lines (60 loc) · 1.56 KB
/
statefulset.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
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: jenkins
spec:
serviceName: jenkins
template:
spec:
serviceAccountName: jenkins
volumes:
- name: configuration-as-code
configMap:
name: configuration-as-code
containers:
- name: jenkins
image: localhost/jenkins-local
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
protocol: TCP
volumeMounts:
- name: configuration-as-code
mountPath: /var/jenkins_home/casc_configs/
- name: jenkins-storage
mountPath: /var/jenkins_home
env:
- name: JAVA_OPTS
value: >
-Xms1g
-Xmx1g
-XX:+UseG1GC
-XX:+DisableExplicitGC
-XX:+ParallelRefProcEnabled
-XX:+UseStringDeduplication
-XX:+UnlockExperimentalVMOptions
-XX:+UnlockDiagnosticVMOptions
-XX:G1NewSizePercent=20
-XX:G1SummarizeRSetStatsPeriod=1
-XX:+AlwaysPreTouch
-Djenkins.install.runSetupWizard=false
- name: CASC_JENKINS_CONFIG
value: /var/jenkins_home/casc_configs/JCasC.yaml
resources:
requests:
memory: "2Gi"
cpu: '1'
limits:
memory: "2Gi"
cpu: '1'
volumeClaimTemplates:
- metadata:
name: jenkins-storage
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 5Gi