Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/statgpt/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ maintainers:
name: statgpt
sources:
- https://github.com/epam/statgpt-helm
version: 1.0.3
version: 1.0.4
4 changes: 2 additions & 2 deletions charts/statgpt/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# statgpt

![Version: 1.0.3](https://img.shields.io/badge/Version-1.0.3-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
![Version: 1.0.4](https://img.shields.io/badge/Version-1.0.4-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)

Umbrella chart for StatGPT solution

Expand Down Expand Up @@ -231,7 +231,7 @@ helm install my-release . --namespace my-namespace --values values.yaml --set ad
| pgvector.primary.extraVolumeMounts | list | `[{"mountPath":"/opt/bitnami/postgresql/lib","name":"postgresql-files","subPath":"postgresql-files/lib"},{"mountPath":"/opt/bitnami/postgresql/share","name":"postgresql-files","subPath":"postgresql-files/share"}]` | Mount complete PostgreSQL directories (lib and share) with pgvector extension included |
| pgvector.primary.extraVolumes | list | `[{"emptyDir":{},"name":"postgresql-files"}]` | Shared volume for storing complete PostgreSQL directories with pgvector extension |
| pgvector.primary.initContainers | list | `[{"command":["/bin/bash","-c","set -e\necho \"=== Setting up PostgreSQL with pgvector extension ===\"\n\nPGVECTOR_VERSION=\"{{ .Values.pgvectorVersion }}\"\necho \"Installing pgvector version: $PGVECTOR_VERSION\"\n\n# Create directory structure in shared volume\nmkdir -p /shared/postgresql-files/lib /shared/postgresql-files/share\n\n# Copy entire existing PostgreSQL directories to preserve all libraries and extensions\necho \"Copying existing PostgreSQL directories...\"\ncp -r /opt/bitnami/postgresql/lib/* /shared/postgresql-files/lib/\ncp -r /opt/bitnami/postgresql/share/* /shared/postgresql-files/share/\n\n# Install build dependencies for compiling pgvector\necho \"Installing build dependencies...\"\ninstall_packages git build-essential\n\n# Clone and build pgvector from source\necho \"Building pgvector extension version $PGVECTOR_VERSION...\"\ncd /tmp\ngit clone --branch \"$PGVECTOR_VERSION\" https://github.com/pgvector/pgvector.git\ncd pgvector\nexport PG_CONFIG=/opt/bitnami/postgresql/bin/pg_config\nmake clean && make\n\n# Add compiled pgvector files to the copied PostgreSQL directories\necho \"Installing pgvector files...\"\ncp vector.so /shared/postgresql-files/lib/\ncp sql/vector--*.sql /shared/postgresql-files/share/extension/\ncp vector.control /shared/postgresql-files/share/extension/\n\n# Set proper ownership for Bitnami PostgreSQL user\nchown -R 1001:1001 /shared\n\n# Verify installation\necho \"Verifying pgvector installation...\"\nls -la /shared/postgresql-files/lib/vector.so\nls -la /shared/postgresql-files/share/extension/vector.control\n\necho \"=== pgvector $PGVECTOR_VERSION setup completed successfully ===\"\n"],"image":"{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}","name":"setup-pgvector","securityContext":{"runAsNonRoot":false,"runAsUser":0},"volumeMounts":[{"mountPath":"/shared","name":"postgresql-files"}]}]` | Build and install pgvector extension by copying existing PostgreSQL directories and adding pgvector files |
| pgvector.primary.initdb | object | `{"scripts":{"01_create_extension.sql":"-- Create the vector extension in the database\nCREATE EXTENSION IF NOT EXISTS vector;\n\n-- Display installed extensions for verification\n\\dx\n"}}` | Database initialization scripts to create the vector extension after PostgreSQL startup |
| pgvector.primary.initdb | object | `{"scripts":{"01_create_extension.sh":"#!/bin/sh\nset -e\n\nexport PGPASSWORD=$POSTGRES_POSTGRES_PASSWORD\n\necho \"=== Creating the vector extension in the database ===\"\npsql -U postgres -d $POSTGRES_DATABASE -c \"CREATE EXTENSION IF NOT EXISTS vector;\"\n\necho \"Currently installed extensions:\"\npsql -U postgres -d $POSTGRES_DATABASE -c \"\\dx\"\n\necho \"=== The vector extension has been successfully created in the database ===\"\n"}}` | Database initialization scripts to create the vector extension after PostgreSQL startup |
| pgvector.primary.resources.limits.cpu | string | `"4000m"` | Maximum CPU limit for the container |
| pgvector.primary.resources.limits.memory | string | `"4Gi"` | Maximum memory limit for the container |
| pgvector.primary.resources.requests.cpu | string | `"2000m"` | Minimum CPU request for resource scheduling |
Expand Down
17 changes: 12 additions & 5 deletions charts/statgpt/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -478,12 +478,19 @@ pgvector:
# -- Database initialization scripts to create the vector extension after PostgreSQL startup
initdb:
scripts:
01_create_extension.sql: |
-- Create the vector extension in the database
CREATE EXTENSION IF NOT EXISTS vector;
01_create_extension.sh: |
#!/bin/sh
set -e

-- Display installed extensions for verification
\dx
export PGPASSWORD=$POSTGRES_POSTGRES_PASSWORD

echo "=== Creating the vector extension in the database ==="
psql -U postgres -d $POSTGRES_DATABASE -c "CREATE EXTENSION IF NOT EXISTS vector;"

echo "Currently installed extensions:"
psql -U postgres -d $POSTGRES_DATABASE -c "\dx"

echo "=== The vector extension has been successfully created in the database ==="

elasticsearch:
# -- Indicates whether the elasticsearch service is enabled
Expand Down