Skip to content

Feat/in cluster support#109

Open
basebandit wants to merge 5 commits intomainfrom
feat/in-cluster-support
Open

Feat/in cluster support#109
basebandit wants to merge 5 commits intomainfrom
feat/in-cluster-support

Conversation

@basebandit
Copy link
Owner

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link
Contributor

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.

Pull request overview

This PR adds support for running kai inside a Kubernetes cluster using in-cluster configuration. This enables the application to authenticate using the service account mounted in the pod, eliminating the need for external kubeconfig files when deployed in-cluster.

Changes:

  • Added a new -in-cluster command-line flag to enable in-cluster configuration mode
  • Implemented LoadInClusterConfig method to configure Kubernetes clients using in-cluster authentication
  • Added comprehensive test coverage for the new in-cluster configuration functionality

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
cmd/kai/main.go Added -in-cluster flag and conditional logic to load either in-cluster or kubeconfig-based configuration
cluster/manager.go Implemented LoadInClusterConfig method with client creation, connection testing, and context management
cluster/manager_test.go Added test suite covering edge cases including duplicate context names and default naming behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI commented Feb 1, 2026

@basebandit I've opened a new pull request, #110, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI commented Feb 1, 2026

@basebandit I've opened a new pull request, #111, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI commented Feb 1, 2026

@basebandit I've opened a new pull request, #112, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI commented Feb 1, 2026

@basebandit I've opened a new pull request, #113, to work on those changes. Once the pull request is ready, I'll request review from you.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 1, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
45.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link
Contributor

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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@basebandit basebandit requested a review from Copilot February 2, 2026 19:42
Copy link
Contributor

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.

Copy link
Contributor

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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants