【发布时间】:2019-08-04 21:55:07
【问题描述】:
我的 values.yaml 中有一个定义,用于在一个 pod 中部署 2 个容器。 在运行自定义 CI/CD 管道时,我想覆盖更改的容器的标签(版本)。
通常我会这样做:
helm upgrade --install app-pod-testing --set container.tag=0.0.2
values.yaml 定义了 2 个容器:
containers:
- repo: services/qa/helloworld1
tag: 843df3a1fcc87489d7b52b152c50fc6a9d59744d
pullPolicy: Always
ports:
container: 8080
resources:
limits:
memory: 128Mi
securityContext:
allowPrivilegeEscalation: false
- repo: services/qa/helloword2
tag: bdaf287eaa3a8f9ba89e663ca1c7785894b5128f
pullPolicy: Always
ports:
container: 9080
resources:
limits:
memory: 128Mi
securityContext:
allowPrivilegeEscalation: true
如何在部署期间设置仅覆盖 repo services/qa/helloword2 的标签? 任何帮助/建议表示赞赏。
【问题讨论】:
-
你已经尝试了什么?您展示的内容看起来像一个普通的 Kubernetes 清单;它不包含任何模板标签,并且您显示的
helm upgrade命令不会更改任一容器的标签。
标签: docker kubernetes kubernetes-helm