first backup of charts
This commit is contained in:
23
melotts/melotts/.helmignore
Normal file
23
melotts/melotts/.helmignore
Normal 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/
|
||||
24
melotts/melotts/Chart.yaml
Normal file
24
melotts/melotts/Chart.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
apiVersion: v2
|
||||
name: jarvis
|
||||
description: A Helm chart for Kubernetes
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "1.16.0"
|
||||
22
melotts/melotts/templates/NOTES.txt
Normal file
22
melotts/melotts/templates/NOTES.txt
Normal file
@ -0,0 +1,22 @@
|
||||
1. Get the application URL by running these commands:
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range $host := .Values.ingress.hosts }}
|
||||
{{- range .paths }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "jarvis.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "jarvis.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "jarvis.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "jarvis.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
|
||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
|
||||
{{- end }}
|
||||
62
melotts/melotts/templates/_helpers.tpl
Normal file
62
melotts/melotts/templates/_helpers.tpl
Normal file
@ -0,0 +1,62 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "jarvis.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 "jarvis.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 "jarvis.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "jarvis.labels" -}}
|
||||
helm.sh/chart: {{ include "jarvis.chart" . }}
|
||||
{{ include "jarvis.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "jarvis.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "jarvis.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "jarvis.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "jarvis.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
81
melotts/melotts/templates/melotts.yaml
Normal file
81
melotts/melotts/templates/melotts.yaml
Normal file
@ -0,0 +1,81 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-dp
|
||||
# namespace: jarvis-models
|
||||
labels:
|
||||
app: {{ .Release.Name }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Release.Name }}
|
||||
spec:
|
||||
#hostNetwork: true
|
||||
# --- START: Add this section for image pull secrets ---
|
||||
runtimeClassName: nvidia
|
||||
imagePullSecrets:
|
||||
- name: regcred # This MUST match the name of the secret you just created
|
||||
# --- END: Add this section ---
|
||||
containers:
|
||||
- name: melo
|
||||
image: {{ .Values.melotts.image }}
|
||||
imagePullPolicy: IfNotPresent # Ensure it always tries to pull, especially on first deploy
|
||||
#command:
|
||||
# - /bin/bash
|
||||
# - -c
|
||||
# - "bash && sleep infinity"
|
||||
ports:
|
||||
- containerPort: 5000 # The port your application listens on inside the container
|
||||
#hostPort: 8880 # The port on the host machine (--network=host combined with -p 8880:8080)
|
||||
protocol: TCP
|
||||
resources: # Add this section
|
||||
requests:
|
||||
cpu: 2 # Example: 100 millicores (0.1 CPU)
|
||||
memory: 4Gi # Example: 128 mebibytes
|
||||
limits:
|
||||
cpu: 2 # Example: Limit to 500 millicores (0.5 CPU)
|
||||
memory: 6Gi # Example: Limit to 512 mebibytes
|
||||
nvidia.com/gpu: "{{ .Values.resources.gpuLimit }}"
|
||||
volumeMounts:
|
||||
- name: weight-volume
|
||||
mountPath: /models
|
||||
- name: weight-volume
|
||||
mountPath: /usr/local/nltk_data
|
||||
subPath: nltk_data
|
||||
volumes:
|
||||
- name: weight-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.app }}-pvc-model
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-service
|
||||
# namespace: jarvis-models
|
||||
labels:
|
||||
app: {{ .Release.Name }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ .Release.Name }}
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8080
|
||||
targetPort: 5000
|
||||
type: NodePort
|
||||
14
melotts/melotts/templates/nfs-pv.yaml
Normal file
14
melotts/melotts/templates/nfs-pv.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: {{ .Values.app }}-pv-model
|
||||
spec:
|
||||
storageClassName: {{ .Values.nfs.storageClass | default "local-path" }}
|
||||
capacity:
|
||||
storage: {{ .Values.nfs.pvSize }}
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
nfs:
|
||||
path: {{ .Values.nfs.path }}
|
||||
server: {{ .Values.nfs.server }}
|
||||
12
melotts/melotts/templates/nfs-pvc.yaml
Normal file
12
melotts/melotts/templates/nfs-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ .Values.app }}-pvc-model
|
||||
annotations:
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.nfs.pvcSize }}
|
||||
volumeName: {{ .Values.app }}-pv-model
|
||||
89
melotts/melotts/values.yaml
Normal file
89
melotts/melotts/values.yaml
Normal file
@ -0,0 +1,89 @@
|
||||
# Default values for jarvis.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
|
||||
replicaCount: 1
|
||||
|
||||
app: "melotts"
|
||||
|
||||
melotts:
|
||||
image: harbor.bwgdi.com/library/melotts:0.0.2
|
||||
|
||||
jarvis_adapter:
|
||||
image: harbor.bwgdi.com/library/adapter-test:0.0.1
|
||||
endpoint: "http://vllm-leader-nodeport:8080"
|
||||
|
||||
nfs:
|
||||
server: "10.6.80.11"
|
||||
path: "/volume1/Dataset/PVStore/lab-data-model-pvc-c0beeab1-6dd5-4c6a-bd2c-6ce9e114c25e/Voice/MeloTTS"
|
||||
storageClass: "local-path"
|
||||
pvSize: "500Gi"
|
||||
pvcSize: "50Gi"
|
||||
|
||||
resources:
|
||||
gpuLimit: 1
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
|
||||
# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/
|
||||
service:
|
||||
# This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
|
||||
type: ClusterIP
|
||||
# This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
|
||||
port: 80
|
||||
|
||||
# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
# Additional volumes on the output Deployment definition.
|
||||
volumes: []
|
||||
# - name: foo
|
||||
# secret:
|
||||
# secretName: mysecret
|
||||
# optional: false
|
||||
|
||||
# Additional volumeMounts on the output Deployment definition.
|
||||
volumeMounts: []
|
||||
# - name: foo
|
||||
# mountPath: "/etc/foo"
|
||||
# readOnly: true
|
||||
|
||||
nodeSelector:
|
||||
resource-group: gpu_5880
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
35
melotts/metadata.yaml
Normal file
35
melotts/metadata.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
application_name: &application_name melotts
|
||||
|
||||
distributed:
|
||||
method: helm
|
||||
release_name: *application_name
|
||||
chart: melotts
|
||||
sets:
|
||||
jarvis_api:
|
||||
image: harbor.bwgdi.com/library/melotts:0.0.2
|
||||
svc:
|
||||
svc_type: NodePort
|
||||
protocol: http
|
||||
hostname: 10.6.14.123
|
||||
servicename: melo-service
|
||||
port: 32147
|
||||
url: ~
|
||||
pod:
|
||||
name: *application_name
|
||||
monolithic:
|
||||
method: helm
|
||||
release_name: *application_name
|
||||
chart: melotts
|
||||
sets:
|
||||
jarvis_api:
|
||||
image: harbor.bwgdi.com/library/melotts:0.0.2
|
||||
svc:
|
||||
svc_type: NodePort
|
||||
protocol: http
|
||||
hostname: 10.6.14.123
|
||||
servicename: melo-service
|
||||
port: 32147
|
||||
url: ~
|
||||
pod:
|
||||
name: *application_name
|
||||
Reference in New Issue
Block a user