Mount host docker socket to Jenkins on kdt/kfg
To support running CVP tests in docker containers
Prod related: PROD-29638
Change-Id: I3703a8998c7e22a79765e72c67dea05e7c17a4d6
diff --git a/kubernetes/control/services/drivetrain/jenkins_master.yml b/kubernetes/control/services/drivetrain/jenkins_master.yml
index 60e04e3..36d8c5a 100644
--- a/kubernetes/control/services/drivetrain/jenkins_master.yml
+++ b/kubernetes/control/services/drivetrain/jenkins_master.yml
@@ -79,9 +79,15 @@
- name: jenkins-home
mount: ${_param:jenkins_home_dir_path}
read_only: false
+ - name: docker-sock-volume
+ mount: /var/run/docker.sock
+ read_only: false
volume:
jenkins-home:
type: glusterfs
endpoints: glusterfs
path: jenkins
read_only: false
+ docker-sock-volume:
+ type: hostPath
+ path: /var/run/docker.sock
diff --git a/kubernetes/control/services/drivetrain/jenkins_slave_multi.yml b/kubernetes/control/services/drivetrain/jenkins_slave_multi.yml
index 7840d31..e710cd2 100644
--- a/kubernetes/control/services/drivetrain/jenkins_slave_multi.yml
+++ b/kubernetes/control/services/drivetrain/jenkins_slave_multi.yml
@@ -36,7 +36,10 @@
value: ${_param:kdt_no_proxy}
volumes:
- name: jenkins-slave02
- mount: /var/lib/jenkins
+ mount: /srv/volumes/jenkins_slaves/slave02
+ read_only: false
+ - name: docker-sock-volume02
+ mount: /var/run/docker.sock
read_only: false
volume:
jenkins-slave02:
@@ -44,6 +47,9 @@
endpoints: glusterfs
path: jenkins_slave02
read_only: false
+ docker-sock-volume02:
+ type: hostPath
+ path: /var/run/docker.sock
jenkins_slave03:
create: true
service: slave03
@@ -76,7 +82,10 @@
value: ${_param:kdt_no_proxy}
volumes:
- name: jenkins-slave03
- mount: /var/lib/jenkins
+ mount: /srv/volumes/jenkins_slaves/slave03
+ read_only: false
+ - name: docker-sock-volume03
+ mount: /var/run/docker.sock
read_only: false
volume:
jenkins-slave03:
@@ -84,3 +93,6 @@
endpoints: glusterfs
path: jenkins_slave03
read_only: false
+ docker-sock-volume03:
+ type: hostPath
+ path: /var/run/docker.sock
diff --git a/kubernetes/control/services/drivetrain/jenkins_slave_single.yml b/kubernetes/control/services/drivetrain/jenkins_slave_single.yml
index 4019c1f..5cdd32b 100644
--- a/kubernetes/control/services/drivetrain/jenkins_slave_single.yml
+++ b/kubernetes/control/services/drivetrain/jenkins_slave_single.yml
@@ -37,7 +37,10 @@
value: ${_param:kdt_no_proxy}
volumes:
- name: jenkins-slave01
- mount: /var/lib/jenkins
+ mount: /srv/volumes/jenkins_slaves/slave01
+ read_only: false
+ - name: docker-sock-volume
+ mount: /var/run/docker.sock
read_only: false
volume:
jenkins-slave01:
@@ -45,3 +48,6 @@
endpoints: glusterfs
path: jenkins_slave01
read_only: false
+ docker-sock-volume:
+ type: hostPath
+ path: /var/run/docker.sock