Change chart directory structure

This commit is contained in:
wbsong111
2026-01-19 16:11:44 +09:00
parent 0f2284bf35
commit 0436749932
5948 changed files with 119 additions and 79 deletions
+23
View File
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
@@ -0,0 +1,57 @@
# KServe 배포
## 1. 배포 방법
- 명령어
```sh
$ helm upgrade --install kserve ../kserve \
--namespace kserve \
--create-namespace \
-f custom-values.yaml
```
## 2. custom-values.yaml 설명
- custom-values.yaml에 정의된 값에 대한 설명입니다.
### 1) InferenceService 설정
| Name | 설명 | 기본값 |
| ----------------------- | --------------------- | ------------------- |
| `inferenceService.name` | InferenceService 이름 | `huggingface-model` |
### 2) 모델 설정
| Name | 설명 | 기본값 |
| ----------------------------------- | --------------------- | ---------------------------- |
| `inferenceService.model.args[0]` | 모델 서빙 백엔드 설정 | `--backend=vllm` |
| `inferenceService.model.args[1]` | 사용할 모델 이름 | `--model_name=phi-1.5` |
| `inferenceService.model.args[2]` | 데이터 타입 설정 | `--dtype=float16` |
| `inferenceService.model.storageUri` | 모델 파일 저장 위치 | `pvc://model-volume/phi-1_5` |
| `inferenceService.model.image` | 모델 서빙 이미지 | `kserve/huggingfaceserver:v0.15.0-gpu` |
### 3) 리소스 설정
| Name | 설명 | 기본값 |
| ---------------------------------------------------- | ------------------ | ------ |
| `inferenceService.resources.limits.cpu` | CPU 리소스 제한 | `8` |
| `inferenceService.resources.limits.memory` | 메모리 리소스 제한 | `16Gi` |
| `inferenceService.resources.limits.nvidia.com/gpu` | GPU 리소스 제한 | `1` |
| `inferenceService.resources.requests.cpu` | CPU 리소스 요청 | `4` |
| `inferenceService.resources.requests.memory` | 메모리 리소스 요청 | `8Gi` |
| `inferenceService.resources.requests.nvidia.com/gpu` | GPU 리소스 요청 | `1` |
### 4) Ingress 설정
| Name | 설명 | 기본값 |
| ---------------------------------------------------- | -------------------------------------- | ------------------------------ |
| `ingress.annotations.cert-manager.io/cluster-issuer` | TLS 인증서 발급을 위한 클러스터 이슈어 | `root-ca-issuer` |
| `ingress.hosts[0].host` | Ingress 호스트 | `phi15.default.hopt.paasup.io` |
| `ingress.tls.secretName` | TLS 인증서 시크릿 이름 | `custom-kserve-tls` |
## 3. 참고 사항
- 이 custom-values.yaml 파일은 기본 values.yaml 파일의 일부 설정만 오버라이드합니다.
- 다른 설정을 변경하려면 values.yaml 파일을 참고하여 custom-values.yaml 파일에 추가하세요.
- 모델 및 리소스 설정은 사용 환경에 맞게 조정하는 것이 좋습니다.
+6
View File
@@ -0,0 +1,6 @@
apiVersion: v2
name: kserve
description: A Helm chart for deploying KServe InferenceService on Kubernetes
type: application
version: 0.1.0
appVersion: "0.15.0"
@@ -0,0 +1,29 @@
# KServe Custom Values
inferenceService:
name: "phi-1_5"
model:
args:
- --backend=vllm
- --model_name=phi-1_5
- --dtype=float16
storageUri: "pvc://model-volume/phi-1_5"
image: kserve/huggingfaceserver:v0.15.0-gpu
resources:
limits:
cpu: "8"
memory: 16Gi
nvidia.com/gpu: "1"
requests:
cpu: "4"
memory: 8Gi
nvidia.com/gpu: "1"
ingress:
annotations:
cert-manager.io/cluster-issuer: "root-ca-issuer"
hosts:
- host: "phi15.default.hopt.paasup.io"
tls:
secretName: custom-kserve-tls
@@ -0,0 +1,11 @@
KServe InferenceService {{ .Values.inferenceService.name }} has been deployed.
InferenceService is available at:
http://{{ .Values.inferenceService.name }}-predictor.{{ .Values.inferenceService.namespace }}.svc.cluster.local/v1/models/{{ .Values.inferenceService.name }}:predict
{{- if .Values.ingress.enabled }}
Ingress has been configured to access the InferenceService:
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls.enabled }}s{{ end }}://{{ .host }}/
{{- end }}
{{- end }}
@@ -0,0 +1,51 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "kserve.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "kserve.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "kserve.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "kserve.labels" -}}
helm.sh/chart: {{ include "kserve.chart" . }}
{{ include "kserve.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "kserve.selectorLabels" -}}
app.kubernetes.io/name: {{ include "kserve.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
@@ -0,0 +1,26 @@
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
name: {{ include "kserve.fullname" . }}
annotations:
queue.sidecar.serving.knative.dev/resourcePercentage: "10"
labels:
{{- include "kserve.labels" . | nindent 4 }}
spec:
predictor:
runtimeClassName: {{ .Values.inferenceService.runtimeClassName }}
model:
modelFormat:
name: {{ .Values.inferenceService.model.modelFormat.name }}
{{- with .Values.inferenceService.model.args }}
args:
{{- toYaml . | nindent 8 }}
{{- end }}
storageUri: {{ .Values.inferenceService.model.storageUri }}
{{- if .Values.inferenceService.model.image }}
image: {{ .Values.inferenceService.model.image }}
{{- end }}
resources:
{{- toYaml .Values.inferenceService.resources | nindent 8 }}
minReplicas: {{ .Values.inferenceService.minReplicas }}
maxReplicas: {{ .Values.inferenceService.maxReplicas }}
@@ -0,0 +1,34 @@
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "kserve.fullname" . }}
namespace: {{ .Values.ingress.namespace }}
labels:
{{- include "kserve.labels" . | nindent 4 }}
annotations:
{{- toYaml .Values.ingress.annotations | nindent 4 }}
spec:
ingressClassName: {{ .Values.ingress.className }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host }}
http:
paths:
- backend:
service:
name: {{ $.Values.ingress.backend.service.name }}
port:
number: {{ $.Values.ingress.backend.service.port }}
path: /
pathType: Prefix
{{- end }}
{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
{{- range .Values.ingress.hosts }}
- {{ .host }}
{{- end }}
secretName: {{ .Values.ingress.tls.secretName }}
{{- end }}
{{- end }}
+60
View File
@@ -0,0 +1,60 @@
# Default values for kserve.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# KServe InferenceService 설정
inferenceService:
# InferenceService 이름
name: huggingface-model
# 네임스페이스
namespace: default
# Runtime Class Name
runtimeClassName: nvidia
# 모델 설정
model:
modelFormat:
name: huggingface
args:
- --backend=vllm
- --model_name=phi-1.5
- --dtype=float16
storageUri: "pvc://model-volume/phi-1_5"
image: kserve/huggingfaceserver:v0.15.0-gpu
minReplicas: 0
maxReplicas: 3
# 리소스 설정
resources:
limits:
cpu: "8"
memory: 16Gi
nvidia.com/gpu: "1"
requests:
cpu: "4"
memory: 8Gi
nvidia.com/gpu: "1"
# Ingress 설정
ingress:
enabled: true
namespace: istio-system
className: "kong"
annotations:
cert-manager.io/cluster-issuer: kubeflow-self-signing-issuer
hosts:
- host: "demo01-test1.hopt.paasup.io"
backend:
service:
name: istio-ingressgateway
port: 80
tls:
enabled: true
secretName: kserve-tls
# 이름 오버라이드 설정
nameOverride: ""
fullnameOverride: ""