Skip to content

Commit 8739e6c

Browse files
committed
Update OpenSearch configuration and enhance database initialization in Helm chart
- Updated OpenSearch Docker image version from 3 to 3.3.2 in questions.yml and values.yaml. - Renamed 'opensearch_url' to 'opensearch_remote_url' and added new fields for 'opensearch_remote_username' and 'opensearch_remote_password' in questions.yml and values.yaml to improve remote setup support. - Adjusted app-env.yaml and pi-common-env.yaml to use the new remote URL and credentials for OpenSearch. - Modified PostgreSQL initialization SQL to ensure database names are quoted correctly for compatibility. - Removed obsolete postgres-init.yaml template to streamline configuration.
1 parent fc8f189 commit 8739e6c

File tree

9 files changed

+35
-50
lines changed

9 files changed

+35
-50
lines changed

charts/plane-enterprise/questions.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ questions:
10781078
- variable: services.opensearch.image
10791079
label: "Docker Image"
10801080
type: string
1081-
default: "opensearchproject/opensearch:3"
1081+
default: "opensearchproject/opensearch:3.3.2"
10821082
show_if: "services.opensearch.local_setup=true"
10831083
- variable: services.opensearch.pullPolicy
10841084
label: "OpenSearch Pull Policy"
@@ -1114,16 +1114,26 @@ questions:
11141114
type: boolean
11151115
default: false
11161116
show_if: "services.opensearch.local_setup=true"
1117-
- variable: env.opensearch_url
1118-
label: "Remote URL"
1117+
- variable: env.opensearch_remote_url
1118+
label: "OpenSearch Remote URL"
1119+
type: string
1120+
default: ""
1121+
show_if: "services.opensearch.local_setup=false"
1122+
- variable: env.opensearch_remote_username
1123+
label: "OpenSearch Remote Username"
11191124
type: string
11201125
default: ""
11211126
show_if: "services.opensearch.local_setup=false"
1127+
- variable: env.opensearch_remote_password
1128+
label: "OpenSearch Remote Password"
1129+
type: password
1130+
default: ""
1131+
show_if: "services.opensearch.local_setup=false"
11221132
- variable: env.opensearch_index_prefix
11231133
label: "Index Prefix"
11241134
type: string
11251135
default: ""
1126-
- variable: env.opensearch_ml_model_id
1136+
- variable: env.pi_envs.opensearch_ml_model_id
11271137
label: "ML Model ID"
11281138
type: string
11291139
default: ""

charts/plane-enterprise/templates/config-secrets/app-env.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ stringData:
3939

4040
{{- if .Values.services.opensearch.local_setup }}
4141
OPENSEARCH_PASSWORD: {{ .Values.services.opensearch.password | default "Secure@Pass#123!%^&*" | quote }}
42-
{{- else if .Values.env.opensearch_url }}
43-
OPENSEARCH_PASSWORD: {{ .Values.services.opensearch.password | default "" | quote }}
42+
{{- else if .Values.env.opensearch_remote_url }}
43+
OPENSEARCH_PASSWORD: {{ .Values.env.opensearch_remote_password | default "" | quote }}
4444
{{- else }}
4545
OPENSEARCH_PASSWORD: ""
4646
{{- end }}
@@ -93,10 +93,10 @@ data:
9393
OPENSEARCH_URL: "http://{{ .Release.Name }}-opensearch.{{ .Release.Namespace }}.svc.cluster.local:9200"
9494
OPENSEARCH_USERNAME: {{ .Values.services.opensearch.username | default "plane" | quote }}
9595
OPENSEARCH_INDEX_PREFIX: {{ .Values.env.opensearch_index_prefix | default "" | quote }}
96-
{{- else if .Values.env.opensearch_url }}
96+
{{- else if .Values.env.opensearch_remote_url }}
9797
OPENSEARCH_ENABLED: "1"
98-
OPENSEARCH_URL: {{ .Values.env.opensearch_url | quote }}
99-
OPENSEARCH_USERNAME: {{ .Values.services.opensearch.username | default "" | quote }}
98+
OPENSEARCH_URL: {{ .Values.env.opensearch_remote_url | quote }}
99+
OPENSEARCH_USERNAME: {{ .Values.env.opensearch_remote_username | default "" | quote }}
100100
OPENSEARCH_INDEX_PREFIX: {{ .Values.env.opensearch_index_prefix | default "" | quote }}
101101
{{- else }}
102102
OPENSEARCH_ENABLED: "0"

charts/plane-enterprise/templates/config-secrets/pgdb.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ data:
2424
init-dbs.sql: |
2525
CREATE EXTENSION IF NOT EXISTS dblink;
2626
27-
SELECT 'CREATE DATABASE {{.Values.env.pgdb_name}}'
27+
SELECT 'CREATE DATABASE "{{.Values.env.pgdb_name}}"'
2828
WHERE NOT EXISTS (
29-
SELECT FROM pg_database WHERE datname = '{{.Values.env.pgdb_name}}'
29+
SELECT FROM pg_database WHERE datname = '"{{.Values.env.pgdb_name}}"'
3030
)\gexec
3131
32-
SELECT 'CREATE DATABASE {{.Values.env.pg_pi_db_name}}'
32+
SELECT 'CREATE DATABASE "{{.Values.env.pg_pi_db_name}}"'
3333
WHERE NOT EXISTS (
34-
SELECT FROM pg_database WHERE datname = '{{.Values.env.pg_pi_db_name}}'
34+
SELECT FROM pg_database WHERE datname = '"{{.Values.env.pg_pi_db_name}}"'
3535
)\gexec
3636
3737
{{- end }}

charts/plane-enterprise/templates/config-secrets/pi-common-env.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ stringData:
2121
{{- end }}
2222
{{- if .Values.services.opensearch.local_setup }}
2323
OPENSEARCH_PASSWORD: {{ .Values.services.opensearch.password | default "Secure@Pass#123!%^&*" | quote }}
24-
{{- else if .Values.env.opensearch_url }}
25-
OPENSEARCH_PASSWORD: {{ .Values.services.opensearch.password | default "" | quote }}
24+
{{- else if .Values.env.opensearch_remote_url }}
25+
OPENSEARCH_PASSWORD: {{ .Values.env.opensearch_remote_password | default "" | quote }}
2626
{{- else }}
2727
OPENSEARCH_PASSWORD: ""
2828
{{- end }}
@@ -38,16 +38,16 @@ data:
3838
OPENSEARCH_URL: "http://{{ .Release.Name }}-opensearch.{{ .Release.Namespace }}.svc.cluster.local:9200"
3939
OPENSEARCH_USER: {{ .Values.services.opensearch.username | default "plane" | quote }}
4040
OPENSEARCH_INDEX_PREFIX: {{ .Values.env.opensearch_index_prefix | default "" | quote }}
41-
{{- else if .Values.env.opensearch_url }}
42-
OPENSEARCH_URL: {{ .Values.env.opensearch_url | quote }}
43-
OPENSEARCH_USER: {{ .Values.services.opensearch.username | default "" | quote }}
41+
{{- else if .Values.env.opensearch_remote_url }}
42+
OPENSEARCH_URL: {{ .Values.env.opensearch_remote_url | quote }}
43+
OPENSEARCH_USER: {{ .Values.env.opensearch_remote_username | default "" | quote }}
4444
OPENSEARCH_INDEX_PREFIX: {{ .Values.env.opensearch_index_prefix | default "" | quote }}
4545
{{- else }}
4646
OPENSEARCH_URL: ""
4747
OPENSEARCH_USER: ""
4848
OPENSEARCH_INDEX_PREFIX: ""
4949
{{- end }}
50-
OPENSEARCH_ML_MODEL_ID: {{ .Values.env.opensearch_ml_model_id | default "" | quote }}
50+
OPENSEARCH_ML_MODEL_ID: {{ .Values.env.pi_envs.opensearch_ml_model_id | default "" | quote }}
5151

5252
CELERY_VECTOR_SYNC_ENABLED: {{ .Values.env.pi_envs.celery.vector_sync_enabled | ternary "1" "0" | quote }}
5353
CELERY_VECTOR_SYNC_INTERVAL: {{ .Values.env.pi_envs.celery.vector_sync_interval | default 3 | quote }}

charts/plane-enterprise/templates/config-secrets/postgres-init.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

charts/plane-enterprise/templates/workloads/pi-api.deployment.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,3 @@ spec:
8686

8787
---
8888
{{- end }}
89-
90-
91-
92-

charts/plane-enterprise/templates/workloads/pi-beat.deployment.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,3 @@ spec:
5555
serviceAccountName: {{ .Release.Name }}-srv-account
5656
---
5757
{{- end }}
58-
59-
60-
61-

charts/plane-enterprise/templates/workloads/pi-migrator.job.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,3 @@ spec:
4444

4545
---
4646
{{- end }}
47-
48-
49-
50-

charts/plane-enterprise/values.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ services:
8282

8383
opensearch:
8484
local_setup: true
85-
image: opensearchproject/opensearch:3
85+
image: opensearchproject/opensearch:3.3.2
8686
servicePort: 9200
8787
volumeSize: 5Gi
8888
pullPolicy: IfNotPresent
@@ -419,9 +419,10 @@ env:
419419
use_storage_proxy: false
420420

421421
#OPENSEARCH ENVS
422-
opensearch_url: ''
422+
opensearch_remote_url: ''
423+
opensearch_remote_username: ''
424+
opensearch_remote_password: ''
423425
opensearch_index_prefix: ''
424-
opensearch_ml_model_id: ''
425426

426427
#API KEYS
427428
secret_key: "60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5"
@@ -485,6 +486,8 @@ env:
485486
cors_allowed_origins: ''
486487
cohere_api_key: ''
487488
internal_secret: 'tyfvfqvBJAgpm9bzvf3r4urJer0Ehfdubk'
489+
opensearch_ml_model_id: ''
490+
488491

489492
celery:
490493
vector_sync_enabled: false

0 commit comments

Comments
 (0)