官网
https://argo-cd.readthedocs.io/en/stable/getting_started/
镜像清单
1 2 3
| quay.io/argoproj/argocd:v2.7.6 ghcr.io/dexidp/dex:v2.36.0 redis:7.0.11-alpine
|
部署
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| wget https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml kubectl create namespace argocd kubectl apply -n argocd -f install.yaml
brew install argocd
argocd admin initial-password -n argocd admin/yourpass
kubectl get secret -n argocd argocd-initial-admin-secret -o yaml echo yourpassbase64== | base64 -d
https://10.193.36.51:30010
http://10.193.36.252:30010
|
禁用https跳转
修改configmap的方式实测无效,转而通过修改devops-argocd-server
的pod启动参数实现
1 2 3 4 5
| command: - argocd-server - '--staticassets' - /shared/app - '--insecure'
|
启用webhook
地址: http://10.193.36.41:30010/api/webhook
设置密码:
1 2 3 4 5
| kubectl edit secret argocd-secret -n argocd
stringData: webhook.gogs.secret: dubhe123
|
配置开发、测试环境
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| argocd login 10.193.36.41:30010
argocd repo add http://10.193.36.33:3000/dubhe/dubhe-charts --username dubhe --password yourpass
argocd app create dubhe-app-dev \ --sync-policy automated \ --repo http://10.193.36.33:3000/dubhe/dubhe-charts \ --revision develop \ --path dubhe-app \ --dest-namespace dubhe-dev \ --dest-server https://kubernetes.default.svc
argocd app create dubhe-app-test \ --sync-policy none \ --repo http://10.193.36.33:3000/dubhe/dubhe-charts \ --revision test \ --path dubhe-app \ --dest-namespace dubhe-test \ --dest-server https://kubernetes.default.svc
|
配置仿真环境
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| argocd login 10.193.36.51:30010
argocd repo add http://10.193.36.50:3000/dubhe/dubhe-charts --username dubhe --password yourpass
argocd app create dubhe-app \ --sync-policy none \ --repo http://10.193.36.50:3000/dubhe/dubhe-charts \ --revision master \ --path dubhe-app \ --dest-namespace dubhe \ --dest-server https://kubernetes.default.svc
|