Argo CD目前最新版本为1.7.4,相比较1.6.x,支持了同步PV状态。


部署

部署Argo CD

官方推荐部署非常简单,只需要两步:

# 创建namespace
kubectl create namespace argocd

# 部署
kubectl apply -n argocd -f <https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml>

部署Ingress

因为我们在内网访问,并没有使用TLS,所以对Argo CD需要添加一条特殊配置。

编辑Deployment: argocd-server,修改argocd启动参数,添加—insecure参数。

spec:
  spec:
    containers:
    - command:
        - argocd-server
        - --staticassets
        - /shared/app
        - --insecure

然后部署ingress:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: argocd-server
  namespace: argocd
spec:
  rules:
  - host: argocd.spex.top
    http:
      paths:
      - backend:
          serviceName: argocd-server
          servicePort: 443

Webhook触发

Argo CD每3分钟会检测Git变更,但是也可以接收Webhook。Argo CD支持以下Webhook来源: