Skip to content

Conversation

@weng271190436
Copy link
Collaborator

@weng271190436 weng271190436 commented Dec 5, 2025

Description of your changes

Currently the in memory 10-year self-signed cert cannot be shared among replicas of hub agents so only the leader has a valid cert registered with API server

Using cert manger decouples cert management and hub agent core functionality. It also does cert rotation.

Trying to partially address Azure/fleet#1224

Fixes #

I have:

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

Special notes for your reviewer

// Add webhook readiness check AFTER controllers are set up (when ResourceInformer is initialized)
// This prevents webhook from accepting requests before discovery cache is populated
if opts.EnableWebhook {
if err := mgr.AddReadyzCheck("webhook-cache", webhook.ResourceInformerReadinessChecker(validator.ResourceInformer)); err != nil {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This PR stacks on top of an informer readiness check change because now that I have multiple replicas of webhook servers, it becomes likely that some webhook servers might start serving requests before the cache is synced

@weng271190436 weng271190436 force-pushed the weiweng/enable-ha-hub-agents branch 3 times, most recently from 7850aa5 to 177d5a7 Compare December 5, 2025 21:53
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 69.81132% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/webhook/webhook.go 46.66% 12 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

Wei Weng added 5 commits December 8, 2025 15:27
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
@weng271190436 weng271190436 force-pushed the weiweng/enable-ha-hub-agents branch from 177d5a7 to 69ab42b Compare December 8, 2025 15:58
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