首先kubesphere的devops内置了多种podTemplate,但可惜的时在3.2.2版本中虽然内置了python的podTemplate。但是并没有为其设置镜像模板。
所以在构建python项目的devops时需要我们手动配置下python的镜像,配置步骤如下:
1、第一步在集群管理的配置字典菜单下,搜索jenkins-casc-config
2、编辑该配置的yaml
3、可以看到在默认情况下,python的image选项是不完整的
- name: "python"
namespace: "kubesphere-devops-worker"
label: "python"
nodeUsageMode: "EXCLUSIVE"
idleMinutes: 0
containers:
- name: "python"
image: "kubesphere/:"
我们只需要将image: "kubesphere/:"修改为我们自己的镜像即可,如下所示:
- name: "python"
namespace: "kubesphere-devops-worker"
label: "python"
nodeUsageMode: "EXCLUSIVE"
idleMinutes: 0
containers:
- name: "python"
image: "python:3.8-slim"
注意:需要修改的有两处,不要遗漏了,通过pyhton关键字搜索。



