Change chart directory structure
This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
# ArgoCD Deployment for Kubeflow Model Registry
|
||||
|
||||
이 디렉토리는 ArgoCD를 사용하여 Kubeflow Model Registry Core 컴포넌트를 Profile 네임스페이스에 배포하기 위한 매니페스트를 포함합니다.
|
||||
|
||||
## 개요
|
||||
|
||||
이 overlay는 Model Registry의 **Core 컴포넌트만**을 배포합니다:
|
||||
- **Database**: MySQL 데이터베이스 (initContainer 포함)
|
||||
- **Model Registry Server**: REST/gRPC API 서버 (리소스 제한 포함)
|
||||
|
||||
> **참고**: UI 컴포넌트 및 Istio 설정은 별도로 kubeflow 카탈로그에서 배포합니다.
|
||||
|
||||
## 사전 요구사항
|
||||
|
||||
- ArgoCD가 클러스터에 설치되고 구성되어 있어야 합니다
|
||||
- 이 매니페스트들이 포함된 Git 저장소에 접근할 수 있어야 합니다
|
||||
|
||||
## 배포 방법
|
||||
|
||||
### Core 컴포넌트 배포 (Profile 네임스페이스)
|
||||
|
||||
1. **ArgoCD Application 매니페스트 편집**:
|
||||
```bash
|
||||
vim model-registry-application.yaml
|
||||
```
|
||||
|
||||
다음 항목들을 수정:
|
||||
- `metadata.name`: Application 이름 (예: `model-registry-demo01-test`)
|
||||
- `metadata.namespace`: ArgoCD 네임스페이스 (예: `platform`)
|
||||
- `spec.source.repoURL`: Git 저장소 URL
|
||||
- `spec.source.targetRevision`: 브랜치/태그 (예: `model-registry/v0.2.19`)
|
||||
- `spec.destination.namespace`: 대상 Profile 네임스페이스 (예: `demo01-test`)
|
||||
|
||||
2. **ArgoCD Application 배포**:
|
||||
```bash
|
||||
kubectl apply -f model-registry-application.yaml
|
||||
```
|
||||
|
||||
### 실제 배포 예시
|
||||
|
||||
테스트된 설정 예시:
|
||||
```yaml
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: model-registry-demo01-test
|
||||
namespace: platform
|
||||
spec:
|
||||
source:
|
||||
repoURL: https://gitea.example.org/dip/tenant-catalog
|
||||
targetRevision: model-registry/v0.2.19
|
||||
path: model-registry/overlays/argocd
|
||||
destination:
|
||||
namespace: demo01-test
|
||||
```
|
||||
|
||||
## 배포 확인
|
||||
|
||||
### ArgoCD Application 상태 확인
|
||||
```bash
|
||||
# ArgoCD CLI 사용 (설치된 경우)
|
||||
argocd app get model-registry-demo01-test
|
||||
|
||||
# 수동 동기화가 필요한 경우
|
||||
argocd app sync model-registry-demo01-test
|
||||
|
||||
# kubectl로 Application 상태 확인
|
||||
kubectl get application -n platform model-registry-demo01-test
|
||||
```
|
||||
|
||||
### 배포된 리소스 확인
|
||||
```bash
|
||||
# Profile 네임스페이스의 리소스 확인
|
||||
kubectl get pods -n demo01-test
|
||||
kubectl get svc -n demo01-test
|
||||
kubectl get deployment -n demo01-test
|
||||
|
||||
# 특정 컴포넌트 상태 확인
|
||||
kubectl get pods -n demo01-test -l app.kubernetes.io/name=model-registry
|
||||
```
|
||||
|
||||
## 포함된 컴포넌트 및 리소스 설정
|
||||
|
||||
### 1. Model Registry Database (MySQL)
|
||||
- **Deployment**: `model-registry-db`
|
||||
- **Service**: `model-registry-db`
|
||||
- **PVC**: `metadata-mysql`
|
||||
- **특별 설정**:
|
||||
- initContainer로 권한 설정 (`chown 999:999 /var/lib/mysql`)
|
||||
- 리소스 요청: CPU 100m, Memory 100M
|
||||
|
||||
### 2. Model Registry Server
|
||||
- **Deployment**: `model-registry-deployment`
|
||||
- **Service**: `model-registry-service`
|
||||
- **컨테이너별 리소스 설정**:
|
||||
- **rest-container**:
|
||||
- Requests: CPU 100m, Memory 256Mi
|
||||
- Limits: CPU 500m, Memory 512Mi
|
||||
- **grpc-container**:
|
||||
- Requests: CPU 100m, Memory 128Mi
|
||||
- Limits: CPU 500m, Memory 512Mi
|
||||
|
||||
## 제거
|
||||
|
||||
```bash
|
||||
# ArgoCD Application 제거
|
||||
kubectl delete -f model-registry-application.yaml
|
||||
|
||||
# 또는 직접 삭제
|
||||
kubectl delete application -n platform model-registry-demo01-test
|
||||
```
|
||||
|
||||
## 파일 구조
|
||||
|
||||
```
|
||||
overlays/argocd/
|
||||
├── README.md # 이 파일
|
||||
├── kustomization.yaml # 메인 kustomization 설정
|
||||
├── model-registry-application.yaml # ArgoCD Application 매니페스트
|
||||
├── patch-db-deployment.yaml # DB 배포 패치 (initContainer + 리소스)
|
||||
└── patch-model-registry-deployment.yaml # 서버 배포 패치 (리소스 제한)
|
||||
```
|
||||
@@ -0,0 +1,30 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
# Include core model registry components (for profile namespace)
|
||||
resources:
|
||||
# Database and core model registry components
|
||||
- ../db
|
||||
# Istio networking components
|
||||
- ../../options/istio
|
||||
|
||||
# Patches for deployments
|
||||
patches:
|
||||
- path: patch-db-deployment.yaml
|
||||
target:
|
||||
group: apps
|
||||
version: v1
|
||||
kind: Deployment
|
||||
name: model-registry-db
|
||||
- path: patch-model-registry-deployment.yaml
|
||||
target:
|
||||
group: apps
|
||||
version: v1
|
||||
kind: Deployment
|
||||
name: model-registry-deployment
|
||||
|
||||
# Common labels for all resources
|
||||
commonLabels:
|
||||
app.kubernetes.io/name: model-registry
|
||||
app.kubernetes.io/component: model-registry-core
|
||||
app.kubernetes.io/part-of: kubeflow
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: model-registry-demo01-test
|
||||
namespace: platform
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitea.example.org/dip/tenant-catalog # Replace with your actual repository URL
|
||||
targetRevision: model-registry/v0.2.19
|
||||
path: model-registry/overlays/argocd
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: demo01-test # Replace with your actual profile namespace
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
ignoreDifferences:
|
||||
- group: apps
|
||||
kind: Deployment
|
||||
jsonPointers:
|
||||
- /spec/replicas
|
||||
@@ -0,0 +1,33 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: model-registry-db
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
## initContainer 추가
|
||||
initContainers:
|
||||
- args:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- chown 999:999 /var/lib/mysql
|
||||
image: busybox:1.36
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: init-permissions
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
securityContext:
|
||||
runAsGroup: 0
|
||||
runAsNonRoot: false
|
||||
runAsUser: 0
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: metadata-mysql
|
||||
containers:
|
||||
- name: db-container
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100M
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: model-registry-deployment
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: rest-container
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
- name: grpc-container
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
Reference in New Issue
Block a user