diff --git a/application-dev.yaml b/application-dev.yaml new file mode 100644 index 0000000..9d40544 --- /dev/null +++ b/application-dev.yaml @@ -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 diff --git a/application.yaml b/application.yaml new file mode 100644 index 0000000..0ae0bf5 --- /dev/null +++ b/application.yaml @@ -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 diff --git a/deploy/k8s/overlays/prod/kustomization.yaml b/deploy/k8s/overlays/prod/kustomization.yaml index 3b7705b..4fcc26d 100644 --- a/deploy/k8s/overlays/prod/kustomization.yaml +++ b/deploy/k8s/overlays/prod/kustomization.yaml @@ -15,7 +15,7 @@ commonLabels: # 이미지 태그 설정 images: - name: ghcr.io/mayne0213/todo - newTag: main-sha-e0467659f443cd202ca504220c9074dcd3b92884 + newTag: main-sha-ac1301af518e942d90a0f7ccd276280f153d1887 patchesStrategicMerge: - deployment-patch.yaml \ No newline at end of file diff --git a/kustomization.yaml b/kustomization.yaml new file mode 100644 index 0000000..ee9d8f2 --- /dev/null +++ b/kustomization.yaml @@ -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