Skip to content

chore: bump github.com/crossplane/upjet/v2 from 2.2.0 to 2.3.0 - #55

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/go_modules/github.com/crossplane/upjet/v2-2.3.0
Open

chore: bump github.com/crossplane/upjet/v2 from 2.2.0 to 2.3.0#55
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/go_modules/github.com/crossplane/upjet/v2-2.3.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 1, 2026

Copy link
Copy Markdown

Bumps github.com/crossplane/upjet/v2 from 2.2.0 to 2.3.0.

Release notes

Sourced from github.com/crossplane/upjet/v2's releases.

v2.3.0

New Features

Conversion Webhook Decoupled from Leader Election (#678)

⚠️ Action required for providers using conversion webhooks and safe-start feature (gated setup). The webhook registration path has moved out of the controller Setup function. Providers that set StartWebhooks: true need to update their entry point. Providers that do not use conversion webhooks are unaffected.

Conversion webhook registration was gated behind leader election through the SetupGated/gate mechanism. SetupGated stores a closure that only fires on the elected leader, so follower pods never called ctrl.NewWebhookManagedBy and their webhook servers returned 404 for every conversion request. With two replicas and --leader-election, some conversion webhook calls fail.

The fix separates webhook registration from reconciler setup:

  • controller.go.tmpl: adds SetupWebhookWithManager — a standalone function that registers the conversion webhook for a single resource kind. Removes the if o.StartWebhooks { ... } block from Setup; webhook registration is no longer the reconciler's responsibility.

  • setup.go.tmpl: adds the SetupWebhookWithManager{{ .Group }} aggregator, following the same pattern as Setup{{ .Group }} and SetupGated{{ .Group }}, so providers can register all webhooks for a group in a single call.

Providers call SetupWebhookWithManager_ once before mgr.Start() on every pod, independent of the gate and leader election. Reconciler setup remains behind the gate and runs only on the leader.

// OLD generated code (v2.2.0 and earlier) — inside Setup()
if o.StartWebhooks {
    if err := ctrl.NewWebhookManagedBy(mgr, &v1beta1.MyResource{}).
        Complete(); err != nil {
        return errors.Wrap(err, "cannot register webhook for the kind v1beta1.MyResource")
    }
}

What changed

The if o.StartWebhooks { ... } block has been removed from the generated Setup() function entirely. In its place, each generated resource controller file now exposes a standalone function:

// NEW generated code (v2.3.0) — standalone function, not inside Setup()
func SetupWebhookWithManager(mgr ctrl.Manager) error {
    if err := ctrl.NewWebhookManagedBy(mgr, &v1beta1.MyResource{}).
        Complete(); err != nil {
        return errors.Wrap(err, "cannot register webhook for the kind v1beta1.MyResource")
    }
    return nil
}

The group-level zz_setup.go file also gains a corresponding aggregator:

func SetupWebhookWithManagerMyGroup(mgr ctrl.Manager) error {
    for _, setup := range []func(ctrl.Manager) error{
        myresourceSetupWebhookWithManager,
        // ... all resources in this group
    } {
        if err := setup(mgr); err != nil {
</tr></table> 

... (truncated)

Commits
  • b02902e Merge pull request #678 from sergenyalcin/register-webhooks-seperately
  • 391acbd Decouple conversion webhook registration from leader election
  • eff8498 Merge pull request #672 from fernandezcuesta/fix/671--customizable-injectedke...
  • 28ac43b chore: coderabbitai review
  • 1fc5dc3 feat: add Description field to SSA InjectedKey
  • 59c4552 Merge pull request #670 from ulucinar/fix-472
  • 6c7a192 Add missing comments on async SDKv2 client's request re-queueing behavior
  • 9a25f0c Async plugin SDKv2 & framework external clients now use deep-copies for Creat...
  • a98ffed Run make test.race as a parallel workflow job
  • be60f3a Add async plugin framework external client tests
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Jul 1, 2026
Bumps [github.com/crossplane/upjet/v2](https://github.com/crossplane/upjet) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/crossplane/upjet/releases)
- [Commits](crossplane/upjet@v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: github.com/crossplane/upjet/v2
  dependency-version: 2.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/go_modules/github.com/crossplane/upjet/v2-2.3.0 branch from 37d730e to 758122d Compare July 18, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants