On initializing a CF object, profile is not set using the Cloud foundry space name which then defaults to 'development'. This causes the config for development to be fetched for all other environments.
Below code needs to be updated in __attrs_post_init__ function of CF to set profile based on the space name to construct the correct config-server url.
if not self.client:
self.client = ConfigClient(
address=self.cfenv.configserver_uri(),
app_name=self.cfenv.application_name,
profile=self.cfenv.space_name.lower() ##Set profile based on space name.
)
On initializing a CF object, profile is not set using the Cloud foundry space name which then defaults to 'development'. This causes the config for development to be fetched for all other environments.
Below code needs to be updated in
__attrs_post_init__
function of CF to set profile based on the space name to construct the correct config-server url.