Failed to run DevOps pipeline on Kind
Created by: RolandMa1986
Describe the Bug
Failed to run DevOps pipeline on Kind when using a maven container.
Versions Used KubeSphere: v3.0.0
Environment Kind v0.9.0 Containerd 1.4
How To Reproduce Steps to reproduce the behavior:
- Install Kubesphere on Kind use ks-installer.
- Enable DevOps
- Create a new Pipeline and a Step using 'container'
- Run the pipeline.
- There is no response from the pipeline.
- check pods, the maven-xxx pod failed to startup
kubectl -n kubesphere-devops-system get pod -w
Expected behavior
Root Cause: In the jenkins-casc-config ConfigMap, There's a HostPath "jenkins_maven_cache" was mounted as the Docker Volume. Which's not supported by Containerd. The pipeline can be started after replaced it with with a full path, such as '/tmp/jenkins_maven_cache'
volumes:
- hostPathVolume:
hostPath: "/var/run/docker.sock"
mountPath: "/var/run/docker.sock"
- hostPathVolume:
hostPath: "jenkins_maven_cache"
mountPath: "/root/.m2"