Skip to content

Add PGSSLMODE and PGSSLROOTCERT env vars to OGX container#119

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-lightspeed:lcore-migrationfrom
omkarjoshi0304:lcore
Jun 24, 2026
Merged

Add PGSSLMODE and PGSSLROOTCERT env vars to OGX container#119
openshift-merge-bot[bot] merged 1 commit into
openstack-lightspeed:lcore-migrationfrom
omkarjoshi0304:lcore

Conversation

@omkarjoshi0304

@omkarjoshi0304 omkarjoshi0304 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Title: Secure OGX-to-PostgreSQL connection with TLS certificate verification

Body:

Summary

  • Add PGSSLMODE=verify-full and PGSSLROOTCERT environment variables to the OGX (llama-stack) container to enforce TLS with full certificate verification on the PostgreSQL connection.
  • This achieves parity with lightspeed-stack, which already connects with ssl_mode: verify-full.

Why env vars instead of config fields?

OGX's PostgresSqlStoreConfig does not support ssl_mode or ca_cert_path fields yet (ogx-ai/ogx#5978). There is an open upstream PR to add support (ogx-ai/ogx#5996), but it has unresolved review feedback.

asyncpg (the PostgreSQL driver OGX uses) reads PGSSLMODE and PGSSLROOTCERT as fallbacks when SSL isn't configured via params directly — verified in the asyncpg source. The CA bundle is already mounted into the container.

Follow-up

Once ogx-ai/ogx#5996 merges, a follow-up ticket will replace the env var workaround with native ssl_mode and ca_cert_path config fields in llama_stack_config.go.

Summary by CodeRabbit

  • Chores
    • PostgreSQL SSL/TLS encryption is now configured for database connections, enabling certificate verification and CA bundle path configuration for enhanced security.

OGX's PostgresSqlStoreConfig does not support ssl_mode or ca_cert_path
fields yet (ogx-ai/ogx#5978). Configure asyncpg via standard libpq
environment variables to enforce TLS with full certificate verification,
achieving parity with lightspeed-stack's PostgreSQL connection security.
@openshift-ci openshift-ci Bot requested review from lpiwowar and umago June 23, 2026 14:13
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f39786fb-8f36-498f-9710-47d901926f2f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

// Postgres password for ${env.POSTGRES_PASSWORD} substitution in llama-stack config
envVars = append(envVars, buildPostgresPasswordEnvVar())

// PostgreSQL SSL configuration for OGX (llama-stack).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (non-blocking): It's usually a good practice to add these things as FIXME or TODO, but I know you already opened a ticket on Jira for the follow up so we won't forget

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope it is ok. I'm going to /lgtm since this is non-blocking. I guess we can do a quick follow up PR if we want:).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will quickly add a todo

@lpiwowar lpiwowar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thank you!:)

@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lpiwowar, omkarjoshi0304, umago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit 651fae6 into openstack-lightspeed:lcore-migration Jun 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants