Skip to content

ConfigClient not working with CloudFoundry's Discovery Client when configPath is set #25

@andresoviedo

Description

@andresoviedo

I have a configserver published on custom "/config" path.

Problem

  • With Eureka Discovery the ConfigClient connects succesfully to config server.
  • However, when using CloudFoundry Discovery the ConfigClient connects to the wrong URL (with no prefix)

As far as I understand

  • DiscoveryClientConfigServiceBootstrapConfiguration is getting the "configPath" from the ServiceInstance metadata.
  • When using Eureka, the EurekaClientConfigServerAutoConfiguration registers the "configPath" to the Service Registry into the metadata and the EurekaDiscoveryClient gets metadata from instance, so it works like a charm.
  • However, when using CloudFoundry Discovery, I didn't find the corresponding Post-Processor who should contribute to this metadata, so there is not "configPath" published to the metadata. Moreso, CloudFoundry's ServiceInstance interface apparently doesn't support access to the metadata got from the registry (class is ignoring metadata). And CloudFoundry's CloudEntity containing the instance data got from the Service Registry has "meta" but it isn't variable. It has an "env" properties but it's actually the cloud-foundry's environments variables.

Question
How can I workaround this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions