我得到了 Dockerfile 来为 python 应用程序构建镜像。
我得到了运行uwsgi服务器的entrypoint.sh脚本。 然后有一个部署 yaml 来运行这个镜像。 我为此创建了 helm 图表,因此在部署.yaml 中我得到了
spec: containers: command: {{ .Values.api.command_to_run }}
在values.yaml中我得到:
command_to_run: "[/bin/sh -c /app/entrypoint-prod.sh]"
如何从values.yaml文件传递此类
如果 Helm 模板中有类似的内容:
...
spec:
containers:
- name: ...
image: ...
command:
- {{ .Values.api.command_to_run }}
那么您的
.Values
文件应包含以下值:
api:
command_to_run: "[/bin/sh -c /app/entrypoint-prod.sh]"