-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins_k8s.yaml
36 lines (36 loc) · 1.3 KB
/
jenkins_k8s.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
apiVersion: v1
kind: Pod
spec:
#spec.securityContext:
# runAsUser: 1000
serviceAccountName: "jenkins-admin"
containers: # list of containers that you want present for your build, you can define a default container in the Jenkinsfile.
- name: maven
image: maven:latest
command: ["tail", "-f", "/dev/null"] # this or any command that is bascially a noop is required, this is so that you don't overwrite the entrypoint of the base container
imagePullPolicy: Always # use cache or pull image for agent
resources: # limits the resources your build contaienr
requests:
memory: "8Gi"
cpu: "500m"
limits:
memory: "8Gi"
- name: docker
image: docker:latest
command: ["tail", "-f", "/dev/null"]
imagePullPolicy: Always
volumeMounts:
- name: docker
mountPath: /var/run/docker.sock # We use the k8s host docker engine
- name: my-inbound-jenkins-agent
image: bibiefrat/ci-cd-1:inbound-jenkins-agent
command: [ "tail", "-f", "/dev/null" ]
imagePullPolicy: Always
- name: inbound-agent
image: bibiefrat/ci-cd-1:inbound-agent
command: [ "tail", "-f", "/dev/null" ]
imagePullPolicy: Always
volumes:
- name: docker
hostPath:
path: /var/run/docker.sock