Skip to content

Commit

Permalink
feat: 调整helm的镜像使其支持配置imageRegistry #11171
Browse files Browse the repository at this point in the history
  • Loading branch information
stubenhuang committed Oct 31, 2024
1 parent eda28d0 commit 0643bea
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ data:
logPath: /data/devops/logs
builderConfigMapPath: /data/devops/config
buildAndPushImage:
image: {{ .Values.kubernetesManager.buildAndPushImage.image }}
image: {{ .Values.kubernetesManager.buildAndPushImage.image.registry }}/{{ .Values.kubernetesManager.buildAndPushImage.image.repository }}:{{ .Values.kubernetesManager.buildAndPushImage.image.tag }}
# 拉取kaniko需要的凭据,如果不填视为没有
pullImageRegistry:
server: {{ .Values.kubernetesManager.buildAndPushImage.server }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,23 @@ kubernetesManager:
prometheusUrl:
# 构建并推送镜像相关
buildAndPushImage:
image: gcr.io/kaniko-project/executor:v1.9.0
# gcr.io/kaniko-project/executor:v1.9.0
image:
registry: gcr.io
repository: kaniko-project/executor
tag: v1.9.0
# 拉取kaniko需要的凭据,如果不填视为没有
pullImageRegistry:
server:
username:
password:
# 无编译构建机
buildlessDeployment:
# bkci/ci:latest
image:
registry: registry-1.docker.io/bkci
repository: ci
tag: latest
apiserver:
auth:
# 针对蓝盾流水线访问的超级权限token
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/init/init.defaultImages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ spec:
done
echo "{{ include "bkci.names.fullname" . }}-store is available";
curl "http://{{ include "bkci.names.fullname" . }}-store.{{ .Release.Namespace }}.svc.cluster.local/api/op/market/image/init" -X POST -d '{"imageRepoName":"{{ .Values.defaultImage.image.registry }}/{{ .Values.defaultImage.image.repository }}" , "imageTag":"{{ .Values.defaultImage.image.tag }}"}'
curl "http://{{ include "bkci.names.fullname" . }}-store.{{ .Release.Namespace }}.svc.cluster.local/api/op/market/image/init" -X POST -d '{"imageRepoName":"{{ .Values.init.defaultImage.image.registry }}/{{ .Values.init.defaultImage.image.repository }}" , "imageTag":"{{ .Values.init.defaultImage.image.tag }}"}'
restartPolicy: OnFailure
{{- end -}}

0 comments on commit 0643bea

Please sign in to comment.