-
Notifications
You must be signed in to change notification settings - Fork 5
/
jenkins-k8s-pod.yaml
90 lines (90 loc) · 2.81 KB
/
jenkins-k8s-pod.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
apiVersion: v1
kind: Pod
metadata:
namespace: jenkins-gene-expression
spec:
nodeSelector:
topology.kubernetes.io/zone: "europe-west2-a"
serviceAccountName: admin-jenkins-gene-expression
# If we set workspaceVolume dynamicPVC() or workspaceVolume persistentVolumeClaimWorkspaceVolume() we need to add a
# fsGroup 1000 to make the /home/jenkins/agent directory writable. Otherwise, we get the following exception in the
# jnlp container:
# Exception in thread "main" java.io.IOException: The specified working directory should be fully accessible to the remoting executable (RWX): /home/jenkins/agent
# The securityContext in the pod is inherited, as it becomes the default pod template
securityContext:
fsGroup: 1000
containers:
- name: "kubectl"
image: bitnami/kubectl
command: [ "/bin/sh" ]
args: [ "-c", "kubectl scale --replicas=2 solrcloud scxa && sleep 2h" ]
resources:
requests:
memory: "0.5Gi"
limits:
memory: "0.5Gi"
- name: jnlp
resources:
requests:
memory: "512Mi"
limits:
memory: "512Mi"
- name: openjdk
image: openjdk:11
resources:
requests:
memory: "3.5Gi"
ephemeral-storage: "5Gi"
limits:
memory: "4Gi"
env:
- name: GRADLE_OPTS
value: "-Dorg.gradle.daemon=false"
- name: GRADLE_RO_DEP_CACHE
value: "/root/gradle-ro-dep-cache"
command: [ "/bin/sh" ]
args: [ "-c", "mkdir -p /root/expdesign-rw && cp /test-data/expdesign/* /root/expdesign-rw ; sleep 2h" ]
volumeMounts:
- mountPath: /test-data/scxa
name: scxa-data
readOnly: true
- mountPath: /test-data/expdesign
name: scxa-expdesign
readOnly: true
- mountPath: /test-data/bioentity_properties
name: bioentity-properties
readOnly: true
- mountPath: /root/gradle-ro-dep-cache
name: gradle-ro-dep-cache
readOnly: true
- name: postgres
image: postgres:11-alpine
resources:
requests:
memory: "100Mi"
limits:
memory: "200Mi"
env:
- name: POSTGRES_DB
value: "postgres"
- name: POSTGRES_USER
value: "postgres"
- name: POSTGRES_PASSWORD
value: "postgres"
volumes:
- name: scxa-data
persistentVolumeClaim:
claimName: scxa-data-rox
readOnly: true
- name: scxa-expdesign
persistentVolumeClaim:
claimName: scxa-expdesign-rox
readOnly: true
- name: bioentity-properties
persistentVolumeClaim:
claimName: bioentity-properties-rox
readOnly: true
- name: gradle-ro-dep-cache
persistentVolumeClaim:
claimName: gradle-7.0-ro-dep-cache-rox
readOnly: true