Skip to content

Make DevOps agent runnable on containerd environment properly

What this PR dose?

Determine container runtime by getting Kubernetes node info and set it to helm charts' values of ks-devops.

Why we need it?

At present, we have fully support containerd container runtime now, please see also https://github.com/kubesphere/ks-devops/issues/67.

Even we could change values of helm charts to support containerd, but there is no way to set helm charts' values in ks-installer.

As a result, I fire this pull request to make DevOps agent runnable on containerd environment properly.

How to test it?

Docker images for test: johnniang/ks-installer:devops-in-containerd

  1. Install KubeSphere via any way on containerd container runtime
  2. Replace container image of Deployment ks-installer

    Please note that don't enable DevOps application before replacing

  3. Enable DevOps application
    kubectl patch -nkubesphere-system cc ks-installer --type=json -p='[{"op": "replace", "path": "/spec/devops/enabled", "value": true}]'
  4. Wait for a complete restart and check ConfigMap jenkins-casc-config image
  5. Run a Pipeline to verify the podman works well
    pipeline {
    	agent {
    		label 'base'
    	}
    	
    	stages {
    		stage('Print Podman version') {
    		steps {
    			container('base') {
    			sh '''
    			podman version
    			podman pull halohub/halo
    			'''
    			}
    		}
    		}
    	}
    }

/kind feature /cc @kubesphere/sig-installation /cc @kubesphere/sig-devops

合并请求报告