Skip to content

Sync: merge upstream v1.0.6 (30s timeout for IAM token/DB connect) - #7

Merged
gcaracuel merged 2 commits into
masterfrom
sync/upstream-20260812
Aug 13, 2026
Merged

gcaracuel merged 2 commits into
masterfrom
sync/upstream-20260812

Conversation

@gcaracuel

Copy link
Copy Markdown

Changes

Syncs latest upstream commit:

  • fix: add 30s timeout to IAM token generation and initial DB connection (pkg/postgres/postgres.go)

After merge, create tag v1.0.6 on master to trigger the chart release workflow.

gcaracuel#17)

* fix: add 30s timeout to IAM token generation and initial DB connection

context.Background() has no timeout, so if STS is unreachable (IRSA
misconfig) or RDS is unreachable, the operator hangs at startup
indefinitely — never binding health probe ports.

Added 30-second context timeouts to:
- NewPG initial IAM token generation and DB connection
- getConnectionWithIAMAuth temporary connection token generation

* fix: add info-level logging for IRSA auth success and DB connection

- Added 'Successfully generated IAM auth token, connecting to RDS'
  info-level log after the IAM token is generated
- Changed 'connected to postgres server' from V(1) (debug) to
  info-level so users can verify the operator connected successfully

* fix: improve startup logging before health probe port is bound

Add structured logging with host/region/user/database context at each
startup step so users can identify where the operator hangs:

- 'Using IAM database authentication for RDS' includes region, host, user
- 'Successfully generated IAM auth token' after token succeeds
- 'Connecting to PostgreSQL' includes host and database
- On failure: 'Failed to connect to PostgreSQL' with host/database + error
- 'Connected to PostgreSQL server' after connection succeeds
- getConnectionWithIAMAuth also logs when generating fresh tokens
@gcaracuel gcaracuel self-assigned this Aug 13, 2026
@gcaracuel
gcaracuel merged commit 6fe804a into master Aug 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant