Skip to content

Do not duplicate base package controllers in the monolithic provider#534

Merged
ulucinar merged 1 commit intocrossplane:mainfrom
ulucinar:fix-monolith
Oct 9, 2025
Merged

Do not duplicate base package controllers in the monolithic provider#534
ulucinar merged 1 commit intocrossplane:mainfrom
ulucinar:fix-monolith

Conversation

@ulucinar
Copy link
Copy Markdown
Collaborator

@ulucinar ulucinar commented Oct 9, 2025

Description of your changes

As we are introducing readiness probes for the family provider upbound/provider-azure in crossplane-contrib/provider-upjet-azure#1074, an existing bug for the monolithic provider package becomes visible. If a provider family configures base package controllers other than the default providerconfig controller, the monolithic provider attempts to start those controllers twice.

This used to be a non-issue back then when we introduced the configuration options for base package controllers but now the monolithic provider fails to start because multiple controllers will be publishing metrics using the same names, which is refused by controller-runtime during provider setup.

We have the local-deploy job as part of the build pipeline that's supposed to have caught this issue but because the provider did not have readiness probes enabled, that bug has survived.

But now that we are introducing readiness probes in uptest runs and with the local-deploy job, this bug becomes visible in crossplane-contrib/provider-upjet-azure#1074.

We may convert the local variable controllerPkgMap to a map to prevent duplicates but that would result in a much larger change, that's not necessary for now. Could be part of a larger refactoring effort...

Note: Although we are no longer publishing the monolithic providers for provider families, they are still being used for development & testing.

I have:

  • Read and followed Upjet's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Validated with upbound/provider-azure (Github repo: crossplane-contrib/provider-upjet-azure) & crossplane-contrib/provider-upjet-azure#1074.

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
Copy link
Copy Markdown
Member

@sergenyalcin sergenyalcin left a comment

Choose a reason for hiding this comment

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

Thanks @ulucinar LGTM!

@ulucinar ulucinar merged commit 6d34eaf into crossplane:main Oct 9, 2025
6 checks passed
@ulucinar ulucinar deleted the fix-monolith branch October 9, 2025 14:27
ulucinar added a commit to ulucinar/upbound-provider-azure that referenced this pull request Oct 9, 2025
- We need to consume the fix from:
  crossplane/upjet#534

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
@ulucinar ulucinar added the bug Something isn't working label Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants