我刚刚使用带Helm选项的Argo CD安装了bitnami/wordpress镜像。现在,我的部署已与helm同步。例如,我现在可以将它与我的git存储库同步吗?我的意思是要将当前的Wordpress文件推送到git并与其同步?因为这样我就可以修改我需要的插件文件了。Bitnami/wordpress是非根容器,所以我无法创建sftp帐户。
该怎么做呢?
发布于 2021-07-14 19:40:51
您可以通过将sidecar容器添加到执行git同步的WordPress容器来完成此操作。
为此,您必须将以下值添加到ArgoCD中的WordPress应用程序:
sidecars:
- name: git-sync
image: bitnami/git:2.32.0-debian-10-r24
imagePullPolicy: IfNotPresent
command:
- /bin/bash
- -ec
- |
[[ -f "/opt/bitnami/scripts/git/entrypoint.sh" ]] && source "/opt/bitnami/scripts/git/entrypoint.sh"
while true; do
#Add here your commands to synchronize the git repository with /bitnami/wordpress/wp-content
sleep 60
done
volumeMounts:
- mountPath: /bitnami/wordpress
name: wordpress-data
subPath: Wordpress这将在您的Wordpress pod中配置一个辅助容器,共享wordpress-data卷。变化
注意:在ArgoCD中执行应用程序同步时,还需要提供值mariadb.auth.password、mariadb.auth.rootPassword和wordpressPassword。
https://stackoverflow.com/questions/68283253
复制相似问题