-
Notifications
You must be signed in to change notification settings - Fork 0
Add hpcgpt helm chart #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
khsa1
wants to merge
69
commits into
main
Choose a base branch
from
hpcgpt
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
b1ded1b
Add minio image without volumes
khsa1 04ab4ed
Merge branch 'main' into hpcgpt
khsa1 1d9c739
Initial osc-chat helm chart
khsa1 c37f9fb
Change NCSA vars to OSC
khsa1 d30699e
Fix lint errors
khsa1 e9a5665
Fix lint error
khsa1 a4dc8a9
Add maintainer to osc chat helm chart
khsa1 019010e
Add missing vllm-stack.enabled in values.yaml
khsa1 52041ee
Fix typo in osc chat NOTES
khsa1 ca5b313
Rename vllm stack dependency
khsa1 e4c0e71
vllm stack dependency fix
khsa1 422941d
Change imagePullSecret name to osc-registry
khsa1 5fbb41a
Add imagepullsecret password field
khsa1 828f2c8
Set placeholder service account
khsa1 0094055
Update storageClass
khsa1 a91d4e5
Update ingress host
khsa1 cd42937
Remove old line in osc-chat values.yaml
khsa1 b4a9936
Remove autoscaling section in osc-chat values.yaml
khsa1 2d5b699
Update storageClassName for qdrant snapshot
khsa1 87ac2ce
Set resource limits for rabbitmq
khsa1 0afdbb0
Cleanup serviceAccounts in osc-chat
khsa1 1ccf5f2
Update cpu limit for worker pod
khsa1 3661d1f
Update image names and tags
khsa1 1e91dbf
Merge branch 'hpcgpt' of https://github.com/OSC/osc-helm-charts into …
khsa1 481646b
Update lmstack router version
khsa1 1b4aa69
Fix lint
khsa1 8201c4f
Update vllm stack version
khsa1 69dda63
Update vllm image tag
khsa1 b64f354
Update vllm image tag
khsa1 dbdb047
Add USER and LOGNAME for vllm router
khsa1 8c9bcef
Allow minio image with volumes
khsa1 483b257
update image tags
khsa1 aa0f9db
Update prometheus port
khsa1 91fb315
Update prometheus port
khsa1 0dc811c
Update pvc labels
khsa1 aa4793f
Update vllm router labels
khsa1 4d1bb95
Remove environment from vllm stack
khsa1 d92cece
Update backend cpu limit
khsa1 7eb6cce
Use tpls for environment variables
khsa1 359dc3f
Add pvc for hf cache
khsa1 6949114
Remove support for old kubernetes versions
khsa1 cb6a0d0
Template llm server url
khsa1 7aee140
Remove autoscaling
khsa1 bfabbea
remove environment
khsa1 4cc1c50
Remove autoscaling
khsa1 f97a932
update app cm name
khsa1 f3dd776
Update service account logic
khsa1 b146978
Define LLM_URL
khsa1 966d187
Define KEYCLOAK_CLIENT_SECRET
khsa1 988100b
osc chat values updates
khsa1 29e81c3
Single host for frontend ingress
khsa1 627f154
Add setup jobs
khsa1 16339b5
fixes for setup jobs
khsa1 872ec85
PVC updates
khsa1 c43e4aa
Fix typo
khsa1 6d6d84a
update tls secrets
khsa1 87784d6
Use internal vllm hostname if available
khsa1 03a0d59
Fix typo
khsa1 c6dbea3
Fix ingresses
khsa1 1e61db9
Fix typos
khsa1 0fa0ab3
Fix bug in postgresql schema
khsa1 630975d
Add support for vllm api keys
khsa1 967725e
Revert "Allow minio image with volumes"
khsa1 4191068
Remove custom minio image
khsa1 265775e
Linting
khsa1 8816e0d
Fix password in postgresql setup job
khsa1 e8ed6e8
Update database version
khsa1 dbdaeee
Add conditional for vllm dependency
khsa1 44264e9
Disable vllm stack and update frontend tag
khsa1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| apiVersion: v2 | ||
| name: osc-chat | ||
| description: A Helm chart for the OSC Chat service | ||
|
|
||
| # 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: "0.1.0" | ||
| maintainers: | ||
| - name: khsa1 | ||
| dependencies: | ||
| - name: database | ||
| version: 0.15.0 | ||
| repository: https://osc.github.io/osc-helm-charts | ||
| - name: minio | ||
| version: 17.0.21 | ||
| repository: "oci://registry-1.docker.io/bitnamicharts" | ||
| condition: minio.enable | ||
| - name: qdrant | ||
| version: 1.16.3 | ||
| repository: "https://qdrant.github.io/qdrant-helm" | ||
| condition: qdrant.enable | ||
| - name: rabbitmq | ||
| version: 16.0.14 | ||
| repository: "oci://registry-1.docker.io/bitnamicharts" | ||
| condition: rabbitmq.enable | ||
| - name: osc-common | ||
| version: 0.14.1 | ||
| repository: https://osc.github.io/osc-helm-charts | ||
| - name: vllm-stack | ||
| version: 0.1.10 | ||
| repository: "https://vllm-project.github.io/production-stack" | ||
|
khsa1 marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| 1. Get the application URL by running these commands: | ||
| {{- if .Values.frontend.ingress.enabled }} | ||
| {{- range $host := .Values.frontend.ingress.hosts }} | ||
| {{- range .paths }} | ||
| http{{ if $.Values.frontend.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- else if contains "NodePort" .Values.frontend.service.type }} | ||
| export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "osc-chat.fullname" . }}-frontend) | ||
| 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.frontend.service.type }} | ||
| NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
| You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "osc-chat.fullname" . }}-frontend' | ||
| export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "osc-chat.fullname" . }}-frontend --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") | ||
| echo http://$SERVICE_IP:{{ .Values.frontend.service.port }} | ||
| {{- else if contains "ClusterIP" .Values.frontend.service.type }} | ||
| export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "{{ include "osc-chat.frontend.selectorLabels" . }}" -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 }} | ||
|
|
||
| 2. Application Information: | ||
| - Environment: {{ .Values.environment }} | ||
| - Namespace: {{ .Release.Namespace }} | ||
| - Release: {{ .Release.Name }} | ||
|
|
||
| 3. Services Status: | ||
| {{- if .Values.frontend.enabled }} | ||
| ✓ Frontend: Enabled | ||
| {{- else }} | ||
| ✗ Frontend: Disabled (run locally for development) | ||
| {{- end }} | ||
| {{- if .Values.backend.enabled }} | ||
| ✓ Backend API: Enabled | ||
| {{- else }} | ||
| ✗ Backend API: Disabled (run locally for development) | ||
| {{- end }} | ||
| {{- if .Values.worker.enabled }} | ||
| ✓ Worker Service: Enabled | ||
| {{- end }} | ||
| {{- if .Values.qdrant.enabled }} | ||
| ✓ Qdrant Vector DB: Enabled | ||
| {{- end }} | ||
| {{- if .Values.minio.enable }} | ||
| ✓ MinIO Object Storage: Enabled | ||
| {{- end }} | ||
| {{- if .Values.keycloak.enabled }} | ||
| ✓ Keycloak Auth: Enabled | ||
| {{- end }} | ||
| {{- if (index .Values "vllm-stack").enabled }} | ||
| ✓ VLLM : Enabled | ||
| {{- end }} | ||
| {{- if .Values.ollama.enabled }} | ||
| ✓ Ollama Local LLM: Enabled (dev mode) | ||
| {{- end }} | ||
| {{- if .Values.database.postgresql.enable }} | ||
| ✓ PostgreSQL: Enabled | ||
| {{- end }} | ||
| {{- if .Values.database.redis.enable }} | ||
| ✓ Redis Cache: Enabled | ||
| {{- end }} | ||
| {{- if .Values.rabbitmq.enabled }} | ||
| ✓ RabbitMQ: Enabled | ||
| {{- end }} | ||
|
|
||
| 4. Useful Commands: | ||
| # Check pod status | ||
| kubectl get pods -l app.kubernetes.io/instance={{ .Release.Name }} | ||
|
|
||
| # View application logs | ||
| kubectl logs -f deployment/{{ include "osc-chat.fullname" . }}-backend | ||
|
|
||
| # Access MinIO Console (if enabled) | ||
| {{- if .Values.minio.enable }} | ||
| kubectl port-forward service/{{ include "osc-chat.fullname" . }}-minio 9001:9001 | ||
| # Then visit http://localhost:9001 | ||
| {{- end }} | ||
|
|
||
| # Access Keycloak Admin Console (if enabled) | ||
| {{- if .Values.keycloak.enabled }} | ||
| kubectl port-forward service/{{ include "osc-chat.fullname" . }}-keycloak 8080:8080 | ||
| # Then visit http://localhost:8080/admin | ||
| # Username: {{ .Values.keycloak.auth.adminUser }} | ||
| # Password: [check secret {{ include "osc-chat.fullname" . }}-secrets] | ||
| {{- end }} | ||
|
|
||
| 5. Configuration Notes: | ||
| {{- if eq .Values.environment "dev" }} | ||
|
khsa1 marked this conversation as resolved.
Outdated
|
||
| 🚀 Development Mode Active: | ||
| - Ollama is enabled for local LLM testing | ||
| - Resource limits are reduced for development | ||
| - Consider running frontend/backend locally for hot reload | ||
| {{- else }} | ||
| 🏭 Production Mode Active: | ||
| - External LLM APIs should be configured | ||
| - Ensure proper ingress and TLS setup | ||
| - Monitor resource usage and scaling | ||
| {{- end }} | ||
|
|
||
| {{- if not .Values.secrets.create }} | ||
| ⚠️ External secrets mode is enabled. Ensure all required secrets are created: | ||
| - Database passwords | ||
| - API keys (OpenAI, etc.) | ||
| - Service credentials | ||
| {{- end }} | ||
|
|
||
| {{- if .Values.frontend.ingress.enabled }} | ||
| 🌐 Ingress is enabled. Ensure your ingress controller is properly configured. | ||
| {{- end }} | ||
|
|
||
| {{- if .Values.networkPolicies.enabled }} | ||
| 🔒 Network policies are enabled for enhanced security. | ||
| {{- end }} | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,194 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "osc-chat.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 "osc-chat.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 "osc-chat.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "osc-chat.labels" -}} | ||
| helm.sh/chart: {{ include "osc-chat.chart" . }} | ||
| {{ include "osc-chat.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Selector labels | ||
| */}} | ||
| {{- define "osc-chat.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "osc-chat.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the name of the service account to use | ||
| */}} | ||
| {{- define "osc-chat.serviceAccountName" -}} | ||
|
khsa1 marked this conversation as resolved.
|
||
| {{- if .Values.serviceAccount.create }} | ||
| {{- default (include "osc-chat.fullname" .) .Values.serviceAccount.name }} | ||
|
khsa1 marked this conversation as resolved.
Outdated
|
||
| {{- else }} | ||
| {{- default "default" .Values.serviceAccount.name }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Generate image name with registry | ||
| */}} | ||
| {{- define "osc-chat.image" -}} | ||
| {{- $registryName := default .imageRoot.registry ((.global).imageRegistry) -}} | ||
| {{- $repositoryName := .imageRoot.repository -}} | ||
| {{- $separator := ":" -}} | ||
|
|
||
| {{- $termination := .imageRoot.tag | toString -}} | ||
| {{- if not .imageRoot.tag }} | ||
| {{- if .chart }} | ||
| {{- $termination = .chart.AppVersion | toString -}} | ||
| {{- end -}} | ||
| {{- end -}} | ||
| {{- if .imageRoot.digest }} | ||
| {{- $separator = "@" -}} | ||
| {{- $termination = .imageRoot.digest | toString -}} | ||
| {{- end -}} | ||
| {{- if $registryName }} | ||
| {{- printf "%s/%s%s%s" $registryName $repositoryName $separator $termination -}} | ||
| {{- else -}} | ||
| {{- printf "%s%s%s" $repositoryName $separator $termination -}} | ||
| {{- end -}} | ||
| {{- end -}} | ||
|
|
||
| {{/* | ||
| Frontend selector labels | ||
| */}} | ||
| {{- define "osc-chat.frontend.selectorLabels" -}} | ||
| {{ include "osc-chat.selectorLabels" . }} | ||
| app.kubernetes.io/component: frontend | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Backend selector labels | ||
| */}} | ||
| {{- define "osc-chat.backend.selectorLabels" -}} | ||
| {{ include "osc-chat.selectorLabels" . }} | ||
| app.kubernetes.io/component: backend | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Worker selector labels | ||
| */}} | ||
| {{- define "osc-chat.worker.selectorLabels" -}} | ||
| {{ include "osc-chat.selectorLabels" . }} | ||
| app.kubernetes.io/component: worker | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| PostgreSQL connection details (using dependency chart naming) | ||
| */}} | ||
| {{- define "osc-chat.postgresql.host" -}} | ||
| {{- if .Values.database.postgresql.enable -}} | ||
| {{ include "osc-chat.fullname" . }}-postgresql | ||
| {{- else -}} | ||
| {{- .Values.externalDatabase.host -}} | ||
| {{- end -}} | ||
| {{- end }} | ||
|
|
||
| {{- define "osc-chat.postgresql.port" -}} | ||
| 5432 | ||
| {{- end }} | ||
|
|
||
| {{- define "osc-chat.postgresql.database" -}} | ||
| {{ .Values.database.postgresql.auth.database }} | ||
| {{- end }} | ||
|
|
||
| {{- define "osc-chat.postgresql.username" -}} | ||
| {{ .Values.database.postgresql.auth.username }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Redis connection details (using dependency chart naming) | ||
| */}} | ||
| {{- define "osc-chat.redis.host" -}} | ||
| {{ include "osc-chat.fullname" . }}-redis-master | ||
| {{- end }} | ||
|
|
||
| {{- define "osc-chat.redis.port" -}} | ||
| 6379 | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| RabbitMQ connection details (using dependency chart naming) | ||
| */}} | ||
| {{- define "osc-chat.rabbitmq.host" -}} | ||
| {{ include "osc-chat.fullname" . }}-rabbitmq | ||
| {{- end }} | ||
|
|
||
| {{- define "osc-chat.rabbitmq.port" -}} | ||
| 5672 | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| MinIO connection details (using dependency chart naming) | ||
| */}} | ||
| {{- define "osc-chat.minio.host" -}} | ||
| {{ include "osc-chat.fullname" . }}-minio | ||
| {{- end }} | ||
|
|
||
| {{- define "osc-chat.minio.port" -}} | ||
| 9000 | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Backend connection details | ||
| */}} | ||
| {{- define "osc-chat.backend.host" -}} | ||
| {{ include "osc-chat.fullname" . }}-backend | ||
| {{- end }} | ||
|
|
||
| {{- define "osc-chat.backend.port" -}} | ||
| 8001 | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Ingest Worker selector labels | ||
| */}} | ||
| {{- define "osc-chat.ingestWorker.selectorLabels" -}} | ||
| {{ include "osc-chat.selectorLabels" . }} | ||
| app.kubernetes.io/component: ingest-worker | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Crawlee selector labels | ||
| */}} | ||
| {{- define "osc-chat.crawlee.selectorLabels" -}} | ||
| {{ include "osc-chat.selectorLabels" . }} | ||
| app.kubernetes.io/component: crawlee | ||
| {{- end }} | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.