Skip to content
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

Updated helm chart for added newSql backend services #1471

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
11 changes: 10 additions & 1 deletion charts/opentelemetry-demo/templates/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@
{{- $config := set . "observability" $.Values.observability }}
{{- $config := set . "defaultValues" $.Values.default }}

{{- if and $config.enabled (eq $name "productCatalogService") -}}
{{- $config := set $config "env" (list
(dict "name" "DB_HOST" "value" $.Values.postgresql.host)
(dict "name" "DB_PORT" "value" $.Values.postgresql.port)
(dict "name" "DB_USER" "value" $.Values.postgresql.username)
(dict "name" "DB_PASSWORD" "value" $.Values.postgresql.password)
(dict "name" "DB_NAME" "value" $.Values.postgresql.database)
) -}}
{{- end }}

{{- if $config.enabled -}}
{{- include "otel-demo.deployment" $config -}}
{{- include "otel-demo.service" $config -}}
{{- include "otel-demo.ingress" $config -}}
{{- include "otel-demo.configmap" $config -}}
{{ end }}

{{- end }}
34 changes: 34 additions & 0 deletions charts/opentelemetry-demo/values.schema.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


{
"$schema": "http://json-schema.org/schema#",
"type": "object",
Expand Down Expand Up @@ -47,6 +49,38 @@
},
"opensearch": {
"type": "object"
},
"postgresql": {
"type": "object",
"description": "Configuration for PostgreSQL integration",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable or disable PostgreSQL"
},
"host": {
"type": "string",
"description": "PostgreSQL host"
},
"port": {
"type": "string",
"description": "PostgreSQL port"
},
"username": {
"type": "string",
"description": "PostgreSQL username"
},
"password": {
"type": "string",
"description": "PostgreSQL password"
},
"database": {
"type": "string",
"description": "PostgreSQL database name"
}
},
"required": ["enabled", "host", "port", "username", "password", "database"],
"additionalProperties": false
}
},
"required": [
Expand Down
18 changes: 18 additions & 0 deletions charts/opentelemetry-demo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""

postgresql:
enabled: true
host: "postgres-db" # PostgreSQL service hostname
port: "5432" # Default PostgreSQL port
username: "postgres" # PostgreSQL username
password: "postgres" # PostgreSQL password
database: "product_catalog" # PostgreSQL database name

components:
## Demo Components are named objects (services) with several properties
# demoService:
Expand Down Expand Up @@ -497,6 +505,16 @@ components:
value: "8013"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://$(OTEL_COLLECTOR_NAME):4317
- name: DB_HOST
value: "postgres-db" # PostgreSQL service hostname
- name: DB_PORT
value: "5432" # PostgreSQL default port
- name: DB_USER
value: "postgres" # PostgreSQL username
- name: DB_PASSWORD
value: "postgres" # PostgreSQL password
- name: DB_NAME
value: "product_catalog" # PostgreSQL database name
resources:
limits:
memory: 20Mi
Expand Down