Change location of jenkins slave space mount
I believe mounting at home is causing issues when setting up the kubectl
since multiple machines are trying to edit the kubeconfig at the same
time. The kubeconfig is under "/home/jenkins/.kube". Changed the way the
mount mounted so that it mounts to "${HOME}/workspace" for all the jobs
launched into kubernetes.
Change-Id: I34038e44f80f90d6905dd3036b91874502aaab07
Signed-off-by: Alanny Lopez <Alanny.Lopez@ibm.com>
diff --git a/kubernetes/Templates/OpenBMC-build-job-v2.yaml b/kubernetes/Templates/OpenBMC-build-job-v2.yaml
index 902246c..f379bff 100644
--- a/kubernetes/Templates/OpenBMC-build-job-v2.yaml
+++ b/kubernetes/Templates/OpenBMC-build-job-v2.yaml
@@ -16,9 +16,9 @@
nodeSelector:
beta.kubernetes.io/arch: ${ARCH}
volumes:
- - name: home
+ - name: workspace
persistentVolumeClaim:
- claimName: ${hclaim}
+ claimName: ${wclaim}
- name: sscdir
persistentVolumeClaim:
claimName: ${sclaim}
@@ -40,9 +40,9 @@
add:
- SYS_ADMIN
volumeMounts:
- - name: home
- mountPath: ${HOME}
+ - name: workspace
+ mountPath: ${HOME}/workspace
- name: sscdir
mountPath: ${sscdir}
imagePullSecrets:
- - name: ${imgplsec}
\ No newline at end of file
+ - name: ${imgplsec}
diff --git a/kubernetes/Templates/OpenBMC-build-job.yaml b/kubernetes/Templates/OpenBMC-build-job.yaml
index 87a6b0b..c035193 100644
--- a/kubernetes/Templates/OpenBMC-build-job.yaml
+++ b/kubernetes/Templates/OpenBMC-build-job.yaml
@@ -16,9 +16,9 @@
nodeSelector:
beta.kubernetes.io/arch: ${ARCH}
volumes:
- - name: home
+ - name: workspace
persistentVolumeClaim:
- claimName: ${hclaim}
+ claimName: ${wclaim}
- name: sscdir
persistentVolumeClaim:
claimName: ${sclaim}
@@ -39,9 +39,9 @@
add:
- SYS_ADMIN
volumeMounts:
- - name: home
- mountPath: ${HOME}
+ - name: workspace
+ mountPath: ${HOME}/workspace
- name: sscdir
mountPath: ${sscdir}
imagePullSecrets:
- - name: ${imgplsec}
\ No newline at end of file
+ - name: ${imgplsec}
diff --git a/kubernetes/Templates/OpenBMC-build-pod-v2.yaml b/kubernetes/Templates/OpenBMC-build-pod-v2.yaml
index 4072892..75adac8 100644
--- a/kubernetes/Templates/OpenBMC-build-pod-v2.yaml
+++ b/kubernetes/Templates/OpenBMC-build-pod-v2.yaml
@@ -7,9 +7,9 @@
nodeSelector:
beta.kubernetes.io/arch: ${ARCH}
volumes:
- - name: home
+ - name: workspace
persistentVolumeClaim:
- claimName: ${hclaim}
+ claimName: ${wclaim}
- name: sscdir
persistentVolumeClaim:
claimName: ${sclaim}
@@ -30,10 +30,10 @@
add:
- SYS_ADMIN
volumeMounts:
- - name: home
- mountPath: ${HOME}
+ - name: workspace
+ mountPath: ${HOME}/workspace
- name: sscdir
mountPath: ${sscdir}
restartPolicy: Never
imagePullSecrets:
- - name: ${imgplsec}
\ No newline at end of file
+ - name: ${imgplsec}
diff --git a/kubernetes/Templates/OpenBMC-build-pod.yaml b/kubernetes/Templates/OpenBMC-build-pod.yaml
index 9df4488..4eb76da 100644
--- a/kubernetes/Templates/OpenBMC-build-pod.yaml
+++ b/kubernetes/Templates/OpenBMC-build-pod.yaml
@@ -7,9 +7,9 @@
nodeSelector:
beta.kubernetes.io/arch: ${ARCH}
volumes:
- - name: home
+ - name: workspace
persistentVolumeClaim:
- claimName: ${hclaim}
+ claimName: ${wclaim}
- name: sscdir
persistentVolumeClaim:
claimName: ${sclaim}
@@ -29,8 +29,8 @@
add:
- SYS_ADMIN
volumeMounts:
- - name: home
- mountPath: ${HOME}
+ - name: workspace
+ mountPath: ${HOME}/workspace
- name: sscdir
mountPath: ${sscdir}
restartPolicy: Never
diff --git a/kubernetes/Templates/QEMU-build-job.yaml b/kubernetes/Templates/QEMU-build-job.yaml
index 0b9ba46..04a8c4e 100644
--- a/kubernetes/Templates/QEMU-build-job.yaml
+++ b/kubernetes/Templates/QEMU-build-job.yaml
@@ -14,9 +14,9 @@
nodeSelector:
beta.kubernetes.io/arch: ${ARCH}
volumes:
- - name: home
+ - name: workspace
persistentVolumeClaim:
- claimName: ${hclaim}
+ claimName: ${wclaim}
- name: qemudir
persistentVolumeClaim:
claimName: ${qclaim}
@@ -33,8 +33,8 @@
- name: qemudir
value: ${qemudir}
volumeMounts:
- - name: home
- mountPath: ${HOME}
+ - name: workspace
+ mountPath: ${HOME}/workspace
- name: qemudir
mountPath: ${qemudir}
imagePullSecrets:
diff --git a/kubernetes/Templates/QEMU-build-pod.yaml b/kubernetes/Templates/QEMU-build-pod.yaml
index 58491ec..3a23af7 100644
--- a/kubernetes/Templates/QEMU-build-pod.yaml
+++ b/kubernetes/Templates/QEMU-build-pod.yaml
@@ -7,9 +7,9 @@
nodeSelector:
beta.kubernetes.io/arch: ${ARCH}
volumes:
- - name: home
+ - name: workspace
persistentVolumeClaim:
- claimName: ${hclaim}
+ claimName: ${wclaim}
- name: qemudir
persistentVolumeClaim:
claimName: ${qclaim}
@@ -26,8 +26,8 @@
- name: qemudir
value: ${qemudir}
volumeMounts:
- - name: home
- mountPath: ${HOME}
+ - name: workspace
+ mountPath: ${HOME}/workspace
- name: qemudir
mountPath: ${qemudir}
imagePullSecrets:
diff --git a/kubernetes/Templates/QEMU-launch-deployment.yaml b/kubernetes/Templates/QEMU-launch-deployment.yaml
index 490beb0..c17df73 100644
--- a/kubernetes/Templates/QEMU-launch-deployment.yaml
+++ b/kubernetes/Templates/QEMU-launch-deployment.yaml
@@ -14,9 +14,9 @@
app: ${deployname}
spec:
volumes:
- - name: home
+ - name: workspace
persistentVolumeClaim:
- claimName: ${hclaim}
+ claimName: ${wclaim}
nodeSelector:
beta.kubernetes.io/arch: ${ARCH}
securityContext:
@@ -55,7 +55,7 @@
memory: "1Gi"
cpu: "1000m"
volumeMounts:
- - name: home
+ - name: workspace
subPath: ${jenkins_subpath}
mountPath: ${OBMC_BUILD_DIR}
imagePullSecrets:
diff --git a/kubernetes/kubernetes-launch.sh b/kubernetes/kubernetes-launch.sh
index 93bae3d..1273af1 100755
--- a/kubernetes/kubernetes-launch.sh
+++ b/kubernetes/kubernetes-launch.sh
@@ -70,7 +70,7 @@
# Other variables in the template not declared here are declared by invoker
case ${invoker} in
OpenBMC-build)
- hclaim=${hclaim:-jenkins-slave-space}
+ wclaim=${wclaim:-jenkins-slave-space}
sclaim=${sclaim:-shared-state-cache}
oclaim=${oclaim:-openbmc-reference-repo}
newimgname=${newimgname:-${imgrepo}${distro}:${imgtag}-${ARCH}}
@@ -78,7 +78,7 @@
;;
QEMU-build)
podname=${podname:-qemubuild${BUILD_ID}}
- hclaim=${hclaim:-jenkins-slave-space}
+ wclaim=${wclaim:-jenkins-slave-space}
qclaim=${qclaim:-qemu-repo}
newimgname="${imgrepo}${imgname}"
;;
@@ -86,8 +86,8 @@
deployname=${deployname:-qemu-launch-deployment}
podname=${podname:-qemu-instance}
replicas=${replicas:-5}
- hclaim=${hclaim:-jenkins-slave-space}
- jenkins_subpath=${jenkins_subpath:-workspace/Openbmc-Build/openbmc/build}
+ wclaim=${wclaim:-jenkins-slave-space}
+ jenkins_subpath=${jenkins_subpath:-Openbmc-Build/openbmc/build}
newimgname="${imgrepo}qemu-instance"
;;
XCAT-launch)