FEAT(app): add self-managing application resources

- Add ArgoCD Application manifest
- Enable GitOps self-management
This commit is contained in:
2025-12-17 18:02:06 +09:00
parent 78f6592ad8
commit c1245377e3
4 changed files with 67 additions and 1 deletions

20
application-dev.yaml Normal file
View File

@@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: todo-dev
namespace: argocd
spec:
project: default
source:
repoURL: https://gitea0213.kro.kr/bluemayne/todo.git
targetRevision: develop
path: deploy/k8s/overlays/dev
destination:
server: https://kubernetes.default.svc
namespace: todo-dev
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

36
application.yaml Normal file
View File

@@ -0,0 +1,36 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: todo
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://gitea0213.kro.kr/bluemayne/todo.git
targetRevision: main
path: .
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- CreateNamespace=true
retry:
limit: 5
backoff:
duration: 5s
factor: 2
maxDuration: 3m
revisionHistoryLimit: 10

View File

@@ -16,7 +16,7 @@ commonLabels:
# 이미지 태그 설정
images:
- name: ghcr.io/mayne0213/todo
newTag: develop-sha-5d7b9f152df398afe8c9a424693f1f016bb1fd12
newTag: develop-sha-ea19176b54a7e1a645f103ca1a56d6e5fc3e539f
patchesStrategicMerge:
- deployment-patch.yaml

10
kustomization.yaml Normal file
View File

@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# App of Apps Application
- application.yaml
# Application deployments
- application-dev.yaml
- deploy/argocd/application.yaml