Skip to content

fix: CI go-version from go.mod, gate client-registration injection, improve isAlreadyInjected#122

Merged
huang195 merged 1 commit into
rossoctl:mainfrom
mrsabath:ci-and-webhook-fixes
Feb 18, 2026
Merged

fix: CI go-version from go.mod, gate client-registration injection, improve isAlreadyInjected#122
huang195 merged 1 commit into
rossoctl:mainfrom
mrsabath:ci-and-webhook-fixes

Conversation

@mrsabath

Copy link
Copy Markdown
Contributor

Summary

  • CI: Use go-version-file instead of hardcoded go-version so CI always matches the Go version in go.mod
  • Webhook: Gate client-registration sidecar injection behind EnableClientRegistration flag -- previously it was always injected regardless of the flag
  • Webhook: Improve isAlreadyInjected detection to also check for envoy-proxy (sidecar) and proxy-init (init container), which are always injected by the AuthBridge path even when spiffe-helper and client-registration are disabled

Split out from PR #113 to keep that PR focused on CLAUDE.md files only.

Test plan

  • Verify CI workflow picks up Go version from go.mod
  • Deploy webhook with --enable-client-registration=false and confirm client-registration sidecar is NOT injected
  • Deploy webhook and confirm isAlreadyInjected correctly detects envoy-proxy and proxy-init containers

Copilot AI review requested due to automatic review settings February 18, 2026 19:49

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.

Pull request overview

This PR makes three focused improvements to the Kagenti webhook: automating Go version management in CI, fixing client-registration sidecar injection to respect the EnableClientRegistration flag, and improving the isAlreadyInjected detection to check for core containers that are always injected.

Changes:

  • CI workflow now reads Go version from go.mod instead of hardcoding it
  • Client-registration sidecar injection is now properly gated by the --enable-client-registration flag
  • isAlreadyInjected now checks for envoy-proxy (sidecar) and proxy-init (init container) in addition to spiffe-helper and client-registration

Reviewed changes

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

File Description
.github/workflows/ci.yaml Updates CI to read Go version from go.mod using go-version-file parameter
kagenti-webhook/internal/webhook/v1alpha1/authbridge_webhook.go Enhances isAlreadyInjected to detect envoy-proxy and proxy-init containers
kagenti-webhook/internal/webhook/injector/pod_mutator.go Gates client-registration sidecar injection behind EnableClientRegistration flag with appropriate logging

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

…mprove isAlreadyInjected

- Use go-version-file instead of hardcoded go-version in CI workflow
- Gate client-registration sidecar injection behind EnableClientRegistration flag
- Add envoy-proxy and proxy-init container checks to isAlreadyInjected

Signed-off-by: Mariusz Sabath <mrsabath@gmail.com>
@mrsabath
mrsabath force-pushed the ci-and-webhook-fixes branch from 0dee81e to 1bbc1f1 Compare February 18, 2026 20:32

@huang195 huang195 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Thanks!

@huang195
huang195 merged commit 8048817 into rossoctl:main Feb 18, 2026
5 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.

3 participants