Skip to content

Some Spring Cloud Kubernetes auto-configuration classes no longer public #2076

@breun

Description

@breun

Describe the bug

Some Spring Cloud Kubernetes auto-configuration classes are no longer public, which makes it unnecessarily hard to refer to them.

Sample

I have some auto-configuration code that needs to run before some Spring Cloud Kubernetes auto-configurations.

With Spring Cloud 2025.0 I could achieve that using this annotation:

@AutoConfiguration(before = {
    SimpleDiscoveryClientAutoConfiguration.class,
    CommonsClientAutoConfiguration.class,
    KubernetesDiscoveryClientAutoConfiguration.class
})

org.springframework.cloud.kubernetes.fabric8.discovery.KubernetesDiscoveryClientAutoConfiguration seems to be have been renamed to org.springframework.cloud.kubernetes.fabric8.discovery.Fabric8DiscoveryClientAutoConfiguration with Spring Cloud 2025.1.0-M4, which in itself is not a problem, but the new class is no longer public, so I cannot reference it anymore from my code like this.

I see that some more Spring Cloud Kubernetes *AutoConfiguration classes are not public in Spring Cloud 2025.1.0-M4:

  • org.springframework.cloud.kubernetes.commons.KubernetesCommonsSanitizeAutoConfiguration
  • org.springframework.cloud.kubernetes.fabric8.Fabric8ActuatorConfiguration
  • org.springframework.cloud.kubernetes.fabric8.discovery.Fabric8CatalogWatchAutoConfiguration
  • org.springframework.cloud.kubernetes.fabric8.discovery.Fabric8DiscoveryClientSpelAutoConfiguration
  • org.springframework.cloud.kubernetes.fabric8.discovery.Fabric8ReactiveDiscoveryClientAutoConfiguration
  • org.springframework.cloud.kubernetes.fabric8.discovery.Fabric8ReactiveDiscoveryHealthAutoConfiguration

In order for users to be able to exclude/include auto-configurations, or explicitly order their own auto-configurations to run before or after other auto-configurations, it would be great if all *AutoConfiguration classes would be public.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions