initContainers:
- name: git-clone-openg2p
image: bitnami/odoo
command: ["/bin/sh","-c"]
args: ['apt-get git && git clone https://github.com/repo.git && git clone https://github.com/repo.git /bitnami/odoo']
volumeMounts:
- name: odoo-data
mountPath: /bitnami/odoo
我需要通过将 git 存储库克隆到 /bitnami/odoo
来添加附加组件。
这是我在 yaml 文件中的初始容器配置。当我 helm install
并创建 pod 时,它在 pod 的日志中显示“Invalid operation git”。
最佳答案
据我所知,没有命令apt-get get
,你可能想要:
apt-get install -y git
关于Git 命令在 init 容器中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69144500/