[DO-1431] deploy ArgoCD (!6)

DO-1431

Co-authored-by: denis.patrakeev <denis.patrakeev@avroid.tech>
Reviewed-on: https://git.avroid.tech/K8s/k8s-configs/pulls/6
This commit is contained in:
Denis Patrakeev
2025-02-10 15:05:06 +03:00
parent 328e9d39ed
commit 5654a65bff
12 changed files with 828 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
# Install Argo CD by [argocd-apps in argo-helm](https://github.com/argoproj/argo-helm/tree/main/charts/argocd-apps)
## Create from version
| Project | Version |
|---------------------|---------|
| ArgoCD Helm | 7.8.2 |
## Common
Используется подход управления приложениями через корневое приложение:
[App of Apps Pattern](https://github.com/argoproj/argo-helm/tree/main/charts/argocd-apps)
## Prepare install
Предварительно должен быть развёрнут и настроен ArgoCD через оператора `argo-cd` из состава `ArgoCD Helm` (каталог с инструкцией и переменными `argo-cd`)
## Install
Настраиваем для работы файл конфигурации kubectl для подключения к кластеру Kubernetes
И производим непосредственную установку корневого приложения ArgoCD:
```bash
helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
helm install -n argocd argocd-apps argo/argocd-apps -f values-override.yaml
```
## Upgrade/Changes
Обновление настроек и чарта делаем так:
В начале сравниваем содержимое `values-override.yaml` с исходным файлом `values.yaml`
(ссылка на исходную версию зафиксирована в заголовке `values-override.yaml`) через diff (IDE лучше).
Или с новой версией `values.yaml` в Helm-чарте.
Вносим необходимые правки, новые опции или добавляем секреты.
Затем применяем:
```bash
helm upgrade -n argocd argocd-apps argo/argocd-apps -f values-override.yaml
```

View File

@@ -0,0 +1,37 @@
# -- Deploy Argo CD Applications within this helm release
# @default -- `{}` (See [values.yaml])
## Ref: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/
applications:
root-app:
namespace: argocd
additionalLabels: {}
additionalAnnotations: {}
finalizers:
- resources-finalizer.argocd.argoproj.io
project: default
source:
repoURL: https://git.avroid.tech/K8s/k8s-configs.git
targetRevision: master
path: clusters/k8s-avroid-office.prod.local/namespaces
directory:
recurse: true
exclude: '*'
include: 'argocd-apps-*.yaml'
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- Validate=true
- PrunePropagationPolicy=foreground
- PruneLast=true
retry:
limit: 5
backoff:
duration: 5s
factor: 2
maxDuration: 3m