Skip to content

Commit 6ce41c8

Browse files
committed
Add storage limits
1 parent 95ca59a commit 6ce41c8

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pipeline {
33
agent {
44
kubernetes {
55
yamlFile 'kubernetesPod.yaml'
6+
workspaceVolume dynamicPVC(accessModes: 'ReadWriteOnce', requestsSize: '40Gi')
67
}
78
}
89

@@ -20,7 +21,7 @@ pipeline {
2021

2122
configFileProvider([configFile(fileId: 'maven-settings-rsb', variable: 'MAVEN_SETTINGS_RSB')]) {
2223

23-
sh 'mvn -B -s $MAVEN_SETTINGS_RSB -U clean install deploy -DskipTests=true'
24+
sh 'mvn -B -s $MAVEN_SETTINGS_RSB -Dmaven.repo.local=/home/jenkins/agent/m2 -U clean install deploy -DskipTests=true'
2425

2526
}
2627
}

kubernetesPod.yaml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,26 @@ metadata:
55
labels:
66
ci: containerproxy-build
77
spec:
8-
volumes:
9-
- name: maven-repo
10-
emptyDir: {}
8+
securityContext:
9+
fsGroup: 65534
1110
containers:
12-
- name: containerproxy-build
13-
image: 196229073436.dkr.ecr.eu-west-1.amazonaws.com/openanalytics/containerproxy-build
14-
securityContext:
15-
privileged: true
16-
command: ["sh"]
17-
args: ["/usr/src/app/docker-entrypoint.sh"]
18-
tty: true
19-
volumeMounts:
20-
- mountPath: ~/.m2
21-
name: maven-repo
22-
resources:
23-
requests:
24-
memory: "2Gi"
25-
cpu: "1.0"
26-
limits:
27-
memory: "4Gi"
28-
cpu: "1.5"
11+
- name: containerproxy-build
12+
image: 196229073436.dkr.ecr.eu-west-1.amazonaws.com/openanalytics/containerproxy-build
13+
securityContext:
14+
privileged: true
15+
command: [ "sh" ]
16+
args: [ "/usr/src/app/docker-entrypoint.sh" ]
17+
tty: true
18+
volumeMounts:
19+
- name: workspace-volume
20+
subPath: docker
21+
mountPath: /var/lib/docker
22+
resources:
23+
requests:
24+
ephemeral-storage: "20Gi"
25+
memory: "2Gi"
26+
cpu: "1.0"
27+
limits:
28+
memory: "4Gi"
29+
cpu: "1.5"
30+
ephemeral-storage: "20Gi"

0 commit comments

Comments
 (0)