Compare commits

...

25 Commits

Author SHA1 Message Date
Nguyen Duc Thao
3362c9374e add 2025-10-13 13:16:59 +07:00
thaoduc
f49e597b7c ab 2025-10-09 14:17:18 +07:00
thaoduc
869b924790 2025-10-09 14:01:16 +07:00
thaoduc
63fecc5b81 accs 2025-10-09 13:53:11 +07:00
thaoduc
d507eb1199 lml 2025-10-09 13:27:01 +07:00
thaoduc
f6b33ffd76 ac 2025-10-09 13:10:50 +07:00
thaoduc
bebc43bc7b sssl 2025-10-09 11:52:42 +07:00
thaoduc
a98c828ba3 aaa 2025-10-09 10:32:45 +07:00
thaoduc
af2cebf93e kkk 2025-10-09 10:27:42 +07:00
thaoduc
082473389d kkk 2025-10-09 10:27:00 +07:00
thaoduc
5f1ee0dd7c sss 2025-10-09 00:50:56 +07:00
thaoduc
179d904847 s 2025-10-09 00:46:18 +07:00
thaoduc
06b42fad5f A 2025-10-09 00:33:06 +07:00
thaoduc
00c981d9e5 âsss 2025-10-09 00:19:14 +07:00
thaoduc
11f69de64c âsss 2025-10-09 00:12:08 +07:00
thaoduc
d813908a61 áaa 2025-10-09 00:04:29 +07:00
thaoduc
fed060b7c5 áaa 2025-10-09 00:01:56 +07:00
thaoduc
24c3a6c73e áaa 2025-10-08 23:53:27 +07:00
thaoduc
70450a621d áaa 2025-10-08 23:43:31 +07:00
thaoduc
4c123eee1b asd 2025-10-08 23:37:43 +07:00
thaoduc
610882c57d asd 2025-10-08 23:29:36 +07:00
thaoduc
f239e35eb3 sss 2025-10-08 14:44:53 +07:00
thaoduc
eaf496d703 vnb 2025-10-08 14:34:13 +07:00
thaoduc
cf6665c087 102 2025-10-08 14:10:50 +07:00
thaoduc
f39909cb41 102 2025-10-08 14:10:27 +07:00
21 changed files with 0 additions and 1609 deletions

Binary file not shown.

BIN
label-studio-1.11.4.tgz Normal file

Binary file not shown.

View File

@@ -1,23 +0,0 @@
# 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/

View File

@@ -1,45 +0,0 @@
apiVersion: v2
name: label-studio
description: A Helm chart for Label Studio - Open source data labeling tool for Machine Learning
# 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: 1.0.1
# 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: "develop"
# Keywords for the chart
keywords:
- label-studio
- machine-learning
- data-labeling
- annotation
- ai
# Home page URL
home: https://labelstud.io/
# Source code URLs
sources:
- https://github.com/heartexlabs/label-studio
# Maintainers
maintainers:
- name: HeartexLabs
email: hello@heartex.com
url: https://heartex.com/

View File

@@ -1,411 +0,0 @@
# Label Studio Helm Chart Deployment Guide
This guide provides step-by-step instructions for deploying Label Studio using the Helm chart.
## Prerequisites
Before deploying Label Studio, ensure you have:
1. **Kubernetes cluster** (v1.19+)
2. **Helm** (v3.0+)
3. **kubectl** configured to access your cluster
4. **PostgreSQL database** (can be deployed separately or use managed service)
5. **Redis instance** (can be deployed separately or use managed service)
6. **Storage class** available in your cluster
## Quick Start
### 1. Clone or Download the Chart
```bash
# If you have the chart locally
cd /path/to/helm-chart/lbl-01
# Or download from repository
helm repo add label-studio https://your-repo-url
helm repo update
```
### 2. Create Namespace
```bash
kubectl create namespace label-studio
```
### 3. Deploy Dependencies
#### PostgreSQL (using Bitnami chart)
```bash
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm install postgresql bitnami/postgresql \
--namespace label-studio \
--set auth.postgresPassword=labelstudio123 \
--set auth.username=labelstudio \
--set auth.password=labelstudio123 \
--set auth.database=labelstudio \
--set primary.persistence.enabled=true \
--set primary.persistence.size=20Gi
```
#### Redis (using Bitnami chart)
```bash
helm install redis bitnami/redis \
--namespace label-studio \
--set auth.password=redis123 \
--set master.persistence.enabled=true \
--set master.persistence.size=8Gi
```
### 4. Create Secrets
```bash
# PostgreSQL secret
kubectl create secret generic postgresql-secret \
--from-literal=password=labelstudio123 \
--namespace label-studio
# Redis secret
kubectl create secret generic redis-secret \
--from-literal=password=redis123 \
--namespace label-studio
```
### 5. Customize Values
Copy the example values file and customize it:
```bash
cp values-example.yaml my-values.yaml
```
Edit `my-values.yaml` to match your environment:
```yaml
# Update these values according to your setup
global:
pgConfig:
host: "postgresql.label-studio.svc.cluster.local"
password:
secretName: "postgresql-secret"
secretKey: "password"
redisConfig:
host: "redis://redis-master.label-studio.svc.cluster.local:6379/1"
password:
secretName: "redis-secret"
secretKey: "password"
ingress:
enabled: true
hosts:
- host: label-studio.yourdomain.com # Change this
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: label-studio-tls
hosts:
- label-studio.yourdomain.com # Change this
env:
LABEL_STUDIO_HOST: "https://label-studio.yourdomain.com" # Change this
LABEL_STUDIO_USERNAME: "admin@yourdomain.com" # Change this
LABEL_STUDIO_PASSWORD: "your-secure-password" # Change this
```
### 6. Deploy Label Studio
```bash
helm install label-studio . \
--namespace label-studio \
--values my-values.yaml
```
### 7. Verify Deployment
```bash
# Check pods
kubectl get pods -n label-studio
# Check services
kubectl get svc -n label-studio
# Check ingress
kubectl get ingress -n label-studio
# View logs
kubectl logs -f deployment/label-studio -n label-studio
```
## Advanced Deployment Scenarios
### Production Deployment with External Database
For production environments, use managed database services:
```yaml
global:
pgConfig:
host: "your-rds-endpoint.amazonaws.com"
port: 5432
dbName: "labelstudio"
userName: "labelstudio"
password:
secretName: "external-db-secret"
secretKey: "password"
redisConfig:
host: "redis://your-elasticache-endpoint:6379/1"
password:
secretName: "external-redis-secret"
secretKey: "password"
resources:
limits:
cpu: 4000m
memory: 8Gi
requests:
cpu: 2000m
memory: 4Gi
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 20
targetCPUUtilizationPercentage: 70
```
### High Availability Setup
```yaml
replicaCount: 3
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- label-studio
topologyKey: kubernetes.io/hostname
resources:
limits:
cpu: 2000m
memory: 4Gi
requests:
cpu: 1000m
memory: 2Gi
```
### Storage Configuration
#### S3 Storage
```yaml
global:
persistence:
enabled: true
type: s3
config:
s3:
bucket: "your-s3-bucket"
region: "us-west-2"
accessKey:
secretName: "s3-credentials"
secretKey: "access-key"
secretKey:
secretName: "s3-credentials"
secretKey: "secret-key"
env:
USE_S3: "true"
S3_BUCKET: "your-s3-bucket"
S3_REGION: "us-west-2"
```
#### Azure Blob Storage
```yaml
global:
persistence:
enabled: true
type: azure
config:
azure:
accountName: "yourstorageaccount"
containerName: "labelstudio"
accountKey:
secretName: "azure-storage-secret"
secretKey: "account-key"
env:
USE_AZURE: "true"
AZURE_ACCOUNT_NAME: "yourstorageaccount"
AZURE_CONTAINER: "labelstudio"
```
## Monitoring and Observability
### Enable Prometheus Metrics
```yaml
env:
PROMETHEUS_METRICS_ENABLED: "true"
PROMETHEUS_METRICS_PORT: "9090"
service:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9090"
prometheus.io/path: "/metrics"
```
### Logging Configuration
```yaml
env:
LOG_LEVEL: "INFO"
LOG_FORMAT: "json"
PYTHONUNBUFFERED: "1"
```
## Troubleshooting
### Common Issues
1. **Pod not starting**
```bash
kubectl describe pod <pod-name> -n label-studio
kubectl logs <pod-name> -n label-studio
```
2. **Database connection issues**
```bash
# Test database connectivity
kubectl run -it --rm debug --image=postgres:13 --restart=Never -- psql -h postgresql.label-studio.svc.cluster.local -U labelstudio -d labelstudio
```
3. **Redis connection issues**
```bash
# Test Redis connectivity
kubectl run -it --rm debug --image=redis:6 --restart=Never -- redis-cli -h redis-master.label-studio.svc.cluster.local -a redis123
```
4. **Ingress not working**
```bash
kubectl describe ingress label-studio -n label-studio
kubectl get events -n label-studio
```
### Health Checks
```bash
# Check application health
kubectl exec -it deployment/label-studio -n label-studio -- curl http://localhost:8080/health
# Run Helm tests
helm test label-studio -n label-studio
```
## Upgrading
### Upgrade the Chart
```bash
# Update values if needed
helm upgrade label-studio . \
--namespace label-studio \
--values my-values.yaml
# Check upgrade status
helm status label-studio -n label-studio
```
### Rollback
```bash
# List releases
helm history label-studio -n label-studio
# Rollback to previous version
helm rollback label-studio 1 -n label-studio
```
## Uninstalling
```bash
# Uninstall Label Studio
helm uninstall label-studio -n label-studio
# Uninstall dependencies (if installed via Helm)
helm uninstall postgresql -n label-studio
helm uninstall redis -n label-studio
# Delete namespace
kubectl delete namespace label-studio
```
## Security Considerations
1. **Use strong passwords** for database and Redis
2. **Enable TLS** for ingress
3. **Use secrets** for sensitive data
4. **Configure RBAC** appropriately
5. **Enable pod security policies**
6. **Use non-root containers**
7. **Scan images** for vulnerabilities
## Performance Tuning
### Resource Optimization
```yaml
resources:
limits:
cpu: 2000m
memory: 4Gi
requests:
cpu: 1000m
memory: 2Gi
# For high-traffic environments
autoscaling:
enabled: true
minReplicas: 5
maxReplicas: 50
targetCPUUtilizationPercentage: 60
targetMemoryUtilizationPercentage: 70
```
### Database Optimization
```yaml
env:
DJANGO_DB_CONN_MAX_AGE: "600"
DJANGO_DB_OPTIONS: '{"MAX_CONNS": 20}'
```
## Support
For issues and questions:
- Check the [Label Studio documentation](https://labelstud.io/guide/)
- Review the [GitHub issues](https://github.com/heartexlabs/label-studio)
- Join the [Label Studio community](https://slack.labelstud.io/)
## Contributing
To contribute to this Helm chart:
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Test thoroughly
5. Submit a pull request

View File

@@ -1,291 +0,0 @@
# Label Studio Helm Chart
Helm chart để triển khai Label Studio - công cụ gán nhãn dữ liệu mã nguồn mở cho Machine Learning trên Kubernetes.
## Giới thiệu
Label Studio là một công cụ gán nhãn dữ liệu mã nguồn mở được thiết kế để giúp bạn chuẩn bị dữ liệu huấn luyện cho các mô hình machine learning. Helm chart này giúp bạn triển khai Label Studio một cách dễ dàng trên Kubernetes cluster.
## Yêu cầu
- Kubernetes 1.19+
- Helm 3.2.0+
- PV provisioner hỗ trợ trong underlying infrastructure (nếu sử dụng persistence)
## Cài đặt Chart
### Cài đặt cơ bản
```bash
helm install my-label-studio ./lbl-01
```
### Cài đặt với custom values
```bash
helm install my-label-studio ./lbl-01 -f my-values.yaml
```
## Gỡ cài đặt Chart
```bash
helm uninstall my-label-studio
```
## Cấu hình
### Cấu hình cơ bản
Dưới đây là một số cấu hình cơ bản trong `values.yaml`:
```yaml
# Cấu hình image
global:
image:
repository: heartexlabs/label-studio
tag: "develop"
pullPolicy: IfNotPresent
# Cấu hình service
service:
type: ClusterIP
port: 8080
targetPort: 8080
# Cấu hình ingress
ingress:
enabled: true
className: "nginx"
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "200m"
hosts:
- host: label-studio.local
paths:
- path: /
pathType: ImplementationSpecific
```
### Cấu hình Database (PostgreSQL)
```yaml
global:
pgConfig:
host: "postgresql.default.svc.cluster.local"
port: 5432
dbName: "labelstudio"
userName: "labelstudio"
password:
secretName: "postgresql-secret"
secretKey: "password"
```
### Cấu hình Redis
```yaml
global:
redisConfig:
host: "redis://redis.default.svc.cluster.local:6379/1"
password:
secretName: "redis-secret"
secretKey: "password"
```
### Cấu hình Storage
#### Local Volume Storage
```yaml
global:
persistence:
enabled: true
type: volume
config:
volume:
storageClass: "standard"
size: 20Gi
accessModes:
- ReadWriteOnce
```
#### AWS S3 Storage
```yaml
global:
persistence:
enabled: true
type: s3
config:
s3:
accessKey: "your-access-key"
secretKey: "your-secret-key"
region: "us-west-2"
bucket: "label-studio-data"
folder: "media"
```
### Cấu hình Environment Variables
```yaml
env:
LABEL_STUDIO_HOST: "https://label-studio.yourdomain.com"
LABEL_STUDIO_USERNAME: "admin@example.com"
LABEL_STUDIO_PASSWORD: "your-secure-password"
ENABLE_LOCAL_FILES_ACCESS: "true"
LOCAL_FILES_SERVING_ENABLED: "true"
SSRF_PROTECTION_ENABLED: "true"
global:
extraEnvironmentVars:
PYTHONUNBUFFERED: "1"
DEBUG: "false"
```
## Ví dụ triển khai hoàn chỉnh
### 1. Tạo namespace
```bash
kubectl create namespace label-studio
```
### 2. Tạo secrets cho database
```bash
kubectl create secret generic postgresql-secret \
--from-literal=password=your-db-password \
-n label-studio
```
### 3. Tạo values file
```yaml
# my-values.yaml
global:
image:
tag: "latest"
pgConfig:
host: "postgresql.label-studio.svc.cluster.local"
port: 5432
dbName: "labelstudio"
userName: "labelstudio"
password:
secretName: "postgresql-secret"
secretKey: "password"
persistence:
enabled: true
type: volume
config:
volume:
storageClass: "gp2"
size: 50Gi
ingress:
enabled: true
className: "nginx"
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/proxy-body-size: "200m"
hosts:
- host: label-studio.yourdomain.com
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: label-studio-tls
hosts:
- label-studio.yourdomain.com
resources:
limits:
cpu: 2000m
memory: 4Gi
requests:
cpu: 1000m
memory: 2Gi
env:
LABEL_STUDIO_HOST: "https://label-studio.yourdomain.com"
LABEL_STUDIO_USERNAME: "admin@yourdomain.com"
LABEL_STUDIO_PASSWORD: "your-secure-password"
```
### 4. Cài đặt chart
```bash
helm install label-studio ./lbl-01 \
-f my-values.yaml \
-n label-studio
```
## Monitoring và Logging
### Health Checks
Chart đã được cấu hình với health checks:
```yaml
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 60
periodSeconds: 30
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
periodSeconds: 10
```
### Autoscaling
```yaml
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 80
targetMemoryUtilizationPercentage: 80
```
## Troubleshooting
### Kiểm tra pods
```bash
kubectl get pods -n label-studio
kubectl logs -f deployment/label-studio -n label-studio
```
### Kiểm tra services
```bash
kubectl get svc -n label-studio
kubectl describe svc label-studio -n label-studio
```
### Kiểm tra ingress
```bash
kubectl get ingress -n label-studio
kubectl describe ingress label-studio -n label-studio
```
## Tham khảo
- [Label Studio Documentation](https://labelstud.io/guide/)
- [Label Studio Helm Values](https://labelstud.io/guide/helm_values)
- [Kubernetes Documentation](https://kubernetes.io/docs/)
- [Helm Documentation](https://helm.sh/docs/)
## Đóng góp
Nếu bạn muốn đóng góp cho chart này, vui lòng tạo pull request hoặc issue trên repository.
## License
Chart này được phân phối dưới giấy phép MIT. Xem file LICENSE để biết thêm chi tiết.

Binary file not shown.

Binary file not shown.

View File

@@ -1,35 +0,0 @@
1. Get the application URL by running these commands:
{{- if .Values.httpRoute.enabled }}
{{- if .Values.httpRoute.hostnames }}
export APP_HOSTNAME={{ .Values.httpRoute.hostnames | first }}
{{- else }}
export APP_HOSTNAME=$(kubectl get --namespace {{(first .Values.httpRoute.parentRefs).namespace | default .Release.Namespace }} gateway/{{ (first .Values.httpRoute.parentRefs).name }} -o jsonpath="{.spec.listeners[0].hostname}")
{{- end }}
{{- if and .Values.httpRoute.rules (first .Values.httpRoute.rules).matches (first (first .Values.httpRoute.rules).matches).path.value }}
echo "Visit http://$APP_HOSTNAME{{ (first (first .Values.httpRoute.rules).matches).path.value }} to use your application"
NOTE: Your HTTPRoute depends on the listener configuration of your gateway and your HTTPRoute rules.
The rules can be set for path, method, header and query parameters.
You can check the gateway configuration with 'kubectl get --namespace {{(first .Values.httpRoute.parentRefs).namespace | default .Release.Namespace }} gateway/{{ (first .Values.httpRoute.parentRefs).name }} -o yaml'
{{- end }}
{{- else 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 "label-studio.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 "label-studio.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "label-studio.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 "label-studio.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 }}

View File

@@ -1,62 +0,0 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "label-studio.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 "label-studio.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 "label-studio.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "label-studio.labels" -}}
helm.sh/chart: {{ include "label-studio.chart" . }}
{{ include "label-studio.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "label-studio.selectorLabels" -}}
app.kubernetes.io/name: {{ include "label-studio.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "label-studio.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "label-studio.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@@ -1,122 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "label-studio.fullname" . }}
labels:
{{- include "label-studio.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "label-studio.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "label-studio.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "label-studio.serviceAccountName" . }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.targetPort | default 8080 }}
protocol: TCP
env:
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- if .Values.global.pgConfig.host }}
- name: POSTGRE_HOST
value: {{ .Values.global.pgConfig.host | quote }}
- name: POSTGRE_PORT
value: {{ .Values.global.pgConfig.port | quote }}
- name: POSTGRE_NAME
value: {{ .Values.global.pgConfig.dbName | quote }}
- name: POSTGRE_USER
value: {{ .Values.global.pgConfig.userName | quote }}
{{- if .Values.global.pgConfig.password.secretName }}
- name: POSTGRE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.global.pgConfig.password.secretName }}
key: {{ .Values.global.pgConfig.password.secretKey }}
{{- end }}
{{- end }}
{{- if .Values.global.redisConfig.host }}
- name: REDIS_LOCATION
value: {{ .Values.global.redisConfig.host | quote }}
{{- if .Values.global.redisConfig.password.secretName }}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.global.redisConfig.password.secretName }}
key: {{ .Values.global.redisConfig.password.secretKey }}
{{- end }}
{{- end }}
{{- range $key, $value := .Values.global.extraEnvironmentVars }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- range $key, $value := .Values.global.extraEnvironmentSecrets }}
- name: {{ $key }}
valueFrom:
secretKeyRef:
name: {{ $value.secretName }}
key: {{ $value.secretKey }}
{{- end }}
{{- with .Values.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@@ -1,32 +0,0 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "label-studio.fullname" . }}
labels:
{{- include "label-studio.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "label-studio.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View File

@@ -1,38 +0,0 @@
{{- if .Values.httpRoute.enabled -}}
{{- $fullName := include "label-studio.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}
labels:
{{- include "label-studio.labels" . | nindent 4 }}
{{- with .Values.httpRoute.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- with .Values.httpRoute.parentRefs }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.httpRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- range .Values.httpRoute.rules }}
{{- with .matches }}
- matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}
backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
weight: 1
{{- end }}
{{- end }}

View File

@@ -1,43 +0,0 @@
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "label-studio.fullname" . }}
labels:
{{- include "label-studio.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.ingress.className }}
ingressClassName: {{ . }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- with .pathType }}
pathType: {{ . }}
{{- end }}
backend:
service:
name: {{ include "label-studio.fullname" $ }}
port:
number: {{ $.Values.service.port }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "label-studio.fullname" . }}
labels:
{{- include "label-studio.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "label-studio.selectorLabels" . | nindent 4 }}

View File

@@ -1,13 +0,0 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "label-studio.serviceAccountName" . }}
labels:
{{- include "label-studio.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
{{- end }}

View File

@@ -1,15 +0,0 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "label-studio.fullname" . }}-test-connection"
labels:
{{- include "label-studio.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "label-studio.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never

View File

@@ -1,206 +0,0 @@
# Example values for Label Studio Helm Chart
# Copy this file to my-values.yaml and customize as needed
# Global configuration
global:
image:
repository: heartexlabs/label-studio
pullPolicy: IfNotPresent
tag: "latest" # Use specific version in production
# PostgreSQL Database Configuration
pgConfig:
host: "postgresql.default.svc.cluster.local"
port: 5432
dbName: "labelstudio"
userName: "labelstudio"
password:
secretName: "postgresql-secret"
secretKey: "password"
# Redis Configuration
redisConfig:
host: "redis://redis.default.svc.cluster.local:6379/1"
password:
secretName: "redis-secret"
secretKey: "password"
# Extra Environment Variables
extraEnvironmentVars:
PYTHONUNBUFFERED: "1"
DEBUG: "false"
LOG_LEVEL: "INFO"
# Persistence Configuration
persistence:
enabled: true
type: volume
config:
volume:
storageClass: "gp2" # Change to your storage class
size: 50Gi
accessModes:
- ReadWriteOnce
# Deployment Configuration
replicaCount: 2
# Service Configuration
service:
type: ClusterIP
port: 8080
targetPort: 8080
# Ingress Configuration
ingress:
enabled: true
className: "nginx"
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "200m"
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
hosts:
- host: label-studio.yourdomain.com
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: label-studio-tls
hosts:
- label-studio.yourdomain.com
# Resource Configuration
resources:
limits:
cpu: 2000m
memory: 4Gi
requests:
cpu: 1000m
memory: 2Gi
# Health Checks
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 120
periodSeconds: 30
timeoutSeconds: 10
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
# Autoscaling
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 70
targetMemoryUtilizationPercentage: 80
# Environment Variables
env:
# Database settings (will be overridden by global.pgConfig if set)
DJANGO_DB: "default"
POSTGRE_NAME: "labelstudio"
POSTGRE_USER: "labelstudio"
POSTGRE_PORT: "5432"
POSTGRE_HOST: "postgresql.default.svc.cluster.local"
# Redis settings (will be overridden by global.redisConfig if set)
REDIS_LOCATION: "redis://redis.default.svc.cluster.local:6379/1"
# Label Studio specific settings
LABEL_STUDIO_HOST: "https://label-studio.yourdomain.com"
LABEL_STUDIO_USERNAME: "admin@yourdomain.com"
LABEL_STUDIO_PASSWORD: "change-this-password"
# Storage settings
ENABLE_LOCAL_FILES_ACCESS: "true"
LOCAL_FILES_SERVING_ENABLED: "true"
# Security settings
SSRF_PROTECTION_ENABLED: "true"
# Feature flags
FEATURE_FLAGS_DEFAULT_VALUE: "false"
# Node Selection
nodeSelector: {}
# kubernetes.io/arch: amd64
# Tolerations
tolerations: []
# - key: "key1"
# operator: "Equal"
# value: "value1"
# effect: "NoSchedule"
# Affinity
affinity: {}
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 100
# podAffinityTerm:
# labelSelector:
# matchExpressions:
# - key: app.kubernetes.io/name
# operator: In
# values:
# - label-studio
# topologyKey: kubernetes.io/hostname
# Additional volumes
volumes: []
# - name: custom-config
# configMap:
# name: label-studio-config
# Additional volume mounts
volumeMounts: []
# - name: custom-config
# mountPath: /app/config
# readOnly: true
# Service Account
serviceAccount:
create: true
automount: true
annotations: {}
name: ""
# Pod Security Context
podSecurityContext:
fsGroup: 1001
# Security Context
securityContext:
runAsNonRoot: true
runAsUser: 1001
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
# ConfigMap for additional configuration
configMap:
create: true
data:
# Add any additional configuration files here
# custom.conf: |
# # Custom configuration
# Secrets for sensitive data
secrets:
create: true
data:
# Add any additional secrets here
# api-key: "your-api-key"

View File

@@ -1,258 +0,0 @@
# Default values for Label Studio Helm Chart
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Global parameters for the Helm chart
global:
# Global Docker registry secret names as an array
imagePullSecrets: []
# Image configuration
image:
repository: heartexlabs/label-studio
pullPolicy: IfNotPresent
tag: "develop"
# PostgreSQL configuration
pgConfig:
host: ""
port: 5432
dbName: ""
userName: ""
password:
secretName: ""
secretKey: ""
ssl:
pgSslMode: ""
pgSslSecretName: ""
pgSslRootCertSecretKey: ""
pgSslCertSecretKey: ""
pgSslKeySecretKey: ""
# Redis configuration
redisConfig:
host: ""
password:
secretName: ""
secretKey: ""
ssl:
redisSslCertReqs: ""
redisSslSecretName: ""
redisSslCaCertsSecretKey: ""
redisSslCertFileSecretKey: ""
redisSslKeyFileSecretKey: ""
# Extra environment variables
extraEnvironmentVars: {}
# PYTHONUNBUFFERED: "1"
# DEBUG: "false"
# Extra environment secrets
extraEnvironmentSecrets: {}
# Persistence configuration
persistence:
enabled: true
type: volume
config:
# S3 configuration
s3:
accessKey: ""
secretKey: ""
accessKeyExistingSecret: ""
accessKeyExistingSecretKey: ""
secretKeyExistingSecret: ""
secretKeyExistingSecretKey: ""
region: ""
bucket: ""
folder: ""
urlExpirationSecs: 86400
endpointUrl: ""
# Volume configuration
volume:
storageClass: ""
size: 10Gi
accessModes:
- ReadWriteOnce
annotations: {}
existingClaim: ""
resourcePolicy: ""
# Azure configuration
azure:
storageAccountName: ""
storageAccountKey: ""
storageAccountNameExistingSecret: ""
# Replica count
replicaCount: 1
# Image configuration (can override global settings)
image:
repository: heartexlabs/label-studio
pullPolicy: IfNotPresent
tag: ""
# Image pull secrets
imagePullSecrets: []
# Name overrides
nameOverride: ""
fullnameOverride: ""
# Service account configuration
serviceAccount:
create: true
automount: true
annotations: {}
name: ""
# Pod annotations and labels
podAnnotations: {}
podLabels: {}
# Security contexts
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
# Service configuration
service:
type: ClusterIP
port: 8080
targetPort: 8080
# Ingress configuration
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
# nginx.ingress.kubernetes.io/proxy-body-size: "200m"
hosts:
- host: label-studio.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: label-studio-tls
# hosts:
# - label-studio.local
# Gateway API HTTPRoute configuration
httpRoute:
enabled: false
annotations: {}
parentRefs:
- name: gateway
sectionName: http
hostnames:
- label-studio.local
rules:
- matches:
- path:
type: PathPrefix
value: /
# Resource limits and requests
resources:
limits:
cpu: 1000m
memory: 2Gi
requests:
cpu: 500m
memory: 1Gi
# Health checks
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 10
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
# Autoscaling configuration
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 80
targetMemoryUtilizationPercentage: 80
# Additional volumes
volumes: []
# - name: data
# persistentVolumeClaim:
# claimName: label-studio-data
# Additional volume mounts
volumeMounts: []
# - name: data
# mountPath: /label-studio/data
# Node selector
nodeSelector: {}
# Tolerations
tolerations: []
# Affinity
affinity: {}
# Environment variables specific to Label Studio
env:
# Database settings
DJANGO_DB: "default"
POSTGRE_NAME: ""
POSTGRE_USER: ""
POSTGRE_PASSWORD: ""
POSTGRE_PORT: "5432"
POSTGRE_HOST: ""
# Redis settings
REDIS_LOCATION: ""
# Label Studio specific settings
LABEL_STUDIO_HOST: ""
LABEL_STUDIO_USERNAME: "admin@example.com"
LABEL_STUDIO_PASSWORD: "password"
# Storage settings
ENABLE_LOCAL_FILES_ACCESS: "true"
LOCAL_FILES_SERVING_ENABLED: "true"
# Security settings
SSRF_PROTECTION_ENABLED: "true"
# Feature flags
FEATURE_FLAGS_DEFAULT_VALUE: "false"
# ConfigMap for additional configuration
configMap:
create: true
data: {}
# Secrets for sensitive data
secrets:
create: true
data: {}

BIN
lbl-new-chart-1.11.8.tgz Normal file

Binary file not shown.

BIN
lbl-new-chart-1.11.9.tgz Normal file

Binary file not shown.