Skip to content

feat: add helm values to configure pgx connection - #2399

Open
supreme-gg-gg wants to merge 4 commits into
kagent-dev:release/v0.10.xfrom
supreme-gg-gg:feat/postgres-connection
Open

feat: add helm values to configure pgx connection#2399
supreme-gg-gg wants to merge 4 commits into
kagent-dev:release/v0.10.xfrom
supreme-gg-gg:feat/postgres-connection

Conversation

@supreme-gg-gg

@supreme-gg-gg supreme-gg-gg commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

This targets 0.10.x release.
Verified with pg_stat_activity that connection is closed after configured idle timeout + pgx check period

@supreme-gg-gg supreme-gg-gg changed the title feat(db): add helm values to configure pgx connection feat: add helm values to configure pgx connection Aug 6, 2026
@supreme-gg-gg
supreme-gg-gg marked this pull request as ready for review August 7, 2026 14:29
@supreme-gg-gg
supreme-gg-gg requested a review from a team as a code owner August 7, 2026 14:29
Copilot AI lite review requested due to automatic review settings August 7, 2026 14:29

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 7, 2026
@supreme-gg-gg
supreme-gg-gg changed the base branch from main to release/v0.10.x August 7, 2026 14:44
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Aug 7, 2026
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
@supreme-gg-gg
supreme-gg-gg force-pushed the feat/postgres-connection branch from a70aa0e to 6a00170 Compare August 7, 2026 14:48
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Aug 7, 2026
Comment thread go/core/pkg/app/app.go
VectorEnabled: cfg.Database.VectorEnabled,
}
if cfg.Database.MaxConns > 0 {
v := int32(cfg.Database.MaxConns)

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.

For each of these, we should probably have an upper bound as well. At least since an int converted to an int32 can truncate. Probably not an issue in practice, though, as that is an incredibly large number.

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 don't think that would be a realistic config though

Comment thread go/core/pkg/app/app.go

// postgresConfigFromApp builds a database.PostgresConfig from app flags.
// Zero/unset flag values leave the corresponding pool field nil so pgx defaults apply.
func postgresConfigFromApp(dbURL string, cfg *Config) *database.PostgresConfig {

@iplay88keys iplay88keys Aug 7, 2026

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.

We should definitely validate that minConns is greater than maxConns if minConns is set.

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.

fair point, added the check

Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants