Skip to content

fix(#466,#467,#468): fix Kubernetes cluster creation#489

Open
poyrazK wants to merge 1 commit intomainfrom
fix/k8s-cluster-creation-466-467-468
Open

fix(#466,#467,#468): fix Kubernetes cluster creation#489
poyrazK wants to merge 1 commit intomainfrom
fix/k8s-cluster-creation-466-467-468

Conversation

@poyrazK
Copy link
Copy Markdown
Owner

@poyrazK poyrazK commented May 7, 2026

Summary

Fix three blocking issues that prevent Kubernetes cluster creation:

Changes

  • internal/workers/cluster_worker.go: Set TenantID in context alongside UserID
  • internal/repositories/postgres/cluster_repo.go: Added tenant_id to INSERT, GetByID, ListByUserID, Update, Delete, ListAll, and scanCluster
  • internal/repositories/postgres/migrations/100_add_clusters_tenant_id.up.sql: Migration to add tenant_id column
  • Dockerfile: Copy k8s templates to production image
  • docker-compose.yml: Add CLOUD_API_URL env var
  • .env.example: Document CLOUD_API_URL

Test Plan

  • Code compiles
  • Run cluster-related unit tests
  • Test kubernetes create with all three fixes in place

Related Issues

Fixes #466, #467, #468

Copilot AI review requested due to automatic review settings May 7, 2026 18:29
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Warning

Rate limit exceeded

@poyrazK has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 13 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 05f55742-11be-471a-863b-8925b3506641

📥 Commits

Reviewing files that changed from the base of the PR and between 5faabcc and 91d38ed.

📒 Files selected for processing (7)
  • .env.example
  • Dockerfile
  • docker-compose.yml
  • internal/repositories/postgres/cluster_repo.go
  • internal/repositories/postgres/migrations/100_add_clusters_tenant_id.down.sql
  • internal/repositories/postgres/migrations/100_add_clusters_tenant_id.up.sql
  • internal/workers/cluster_worker.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/k8s-cluster-creation-466-467-468

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 and usage tips.

#466: Add tenant_id to cluster worker context and cluster repo queries
       - Backfill existing clusters with correct tenant_id from users table
#467: Copy K8s templates to production Docker image
#468: Add CLOUD_API_URL env var to docker-compose.yml and .env.example
@poyrazK poyrazK force-pushed the fix/k8s-cluster-creation-466-467-468 branch from 77bd93d to 91d38ed Compare May 7, 2026 18:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

Kubernetes cluster creation fails - cluster worker missing TenantID in context

2 participants