k8s jenkins Configuration as Code jenkins.yaml 自定义maven镜像 workspaceVolume 本地化

       - name: "maven"
          namespace: "kubesphere-devops-system"
            label: "maven"
            nodeUsageMode: "EXCLUSIVE"
            idleMinutes: 0
            containers:
            - name: "maven"
              image: "kubesphere/builder-maven:v3.1.0"
              command: "cat"
              args: ""
              ttyEnabled: true
              resourceRequestCpu: "100m"
              resourceLimitCpu: "4000m"
              resourceRequestMemory: "100Mi"
              resourceLimitMemory: "8192Mi"
            - name: "jnlp"
              image: "jenkins/jnlp-slave:3.27-1"
              command: "jenkins-slave"
              args: "^${computer.jnlpmac} ^${computer.name}"
              resourceRequestCpu: "50m"
              resourceRequestMemory: "400Mi"
              resourceLimitMemory: "1536Mi"
            workspaceVolume:
              persistentVolumeClaimWorkspaceVolume:
                claimName: "crm-jenkins-workspace"
                readOnly: false
            volumes:
            - hostPathVolume:
                hostPath: "/var/run/docker.sock"
                mountPath: "/var/run/docker.sock"
            - hostPathVolume:
                hostPath: "/var/data/jenkins_maven_cache"
                mountPath: "/root/.m2"
            - hostPathVolume:
                hostPath: "/var/data/jenkins_sonar_cache"
                mountPath: "/root/.sonar/cache"

主要是这个配置:

           workspaceVolume:
              persistentVolumeClaimWorkspaceVolume:
                claimName: "crm-jenkins-workspace"
                readOnly: false

你可能感兴趣的:(k8s jenkins Configuration as Code jenkins.yaml 自定义maven镜像 workspaceVolume 本地化)