These are chat archives for spring-cloud/spring-cloud

16th
Nov 2016
Stian Lågstad
@stianlagstad
Nov 16 2016 08:10 UTC
Hi. We're using spring-cloud-config for configurations for different environments (dev, test, staging, production). We're using the config-repo for overrides, i.e. all apps have the config they need to run independently without the config-server. However, we're also using our config-repo for various registries, and we've run into a problem. Say I run appA without the config-server running. The default config values stored in appA means that I should be able to run it, but now I cannot fetch registryA. The app doesn't start. Where would you recommend us to store those registries if not in our config-repo? We don't want to store them in each app, because any changes in registryA would make us have to update registryA in all the apps that depends on it.
Dave Syer
@dsyer
Nov 16 2016 08:22 UTC
What's a "registry"?
Stian Lågstad
@stianlagstad
Nov 16 2016 08:26 UTC
Sorry. It's just a list of key/value variables in files
Dave Syer
@dsyer
Nov 16 2016 08:31 UTC
I would recommend you make the apps run with default values on their own. Seems like you already had that idea. So I'm not sure I understand yet.
Stian Lågstad
@stianlagstad
Nov 16 2016 08:36 UTC
I realize we're trying to keep two kind of configs separate.. "configs" and "registries". Maybe we should run a separate registry-server
Dave Syer
@dsyer
Nov 16 2016 08:47 UTC
Seems like the "registry" is your domain
If you can map it to spring config then you can take advantage of the override semantics we already have
Hard to say really
Stian Lågstad
@stianlagstad
Nov 16 2016 08:49 UTC
Can I change a value in a config-repo and use that without having to check it in?
Dave Syer
@dsyer
Nov 16 2016 08:53 UTC
Only if the file is local to the config server
Not sure quite what you mean though
Stian Lågstad
@stianlagstad
Nov 16 2016 09:39 UTC
I'm going to think it over, sorry :)
Robert Van Voorhees
@voor
Nov 16 2016 13:56 UTC
What would be the correct format for something like this in a Spring config file: ${${HOST_ADDRESS:KAFKA_HOST}:'http://kafka'}
It looks like the ' ' doesn't get removed.
Wonder if it should just be " "
Nope, not either of those.
pradeepsingh1234
@pradeepsingh1234
Nov 16 2016 14:43 UTC
@dsyer @spencergibb how to redirect using Zuul filter ?
Dave Syer
@dsyer
Nov 16 2016 14:57 UTC
Send a 302?
pradeepkusingh
@pradeepkusingh
Nov 16 2016 15:27 UTC
ok. Thanks
Spencer Gibb
@spencergibb
Nov 16 2016 16:04 UTC
yup, you have access to the raw http servlet request/response
Robert Van Voorhees
@voor
Nov 16 2016 18:13 UTC
I'm trying to have my Zuul hang off of a context-path like /rest or /api except whenever I use url for any of my Zuul paths they're still getting the server.context-path and/or the zuul.prefix. Any idea how to strip that off for url forwarding if stripPrefix: false?
Spencer Gibb
@spencergibb
Nov 16 2016 18:15 UTC
seems like those two things are at odds with each other
Robert Van Voorhees
@voor
Nov 16 2016 18:16 UTC
They definitely are. :(
Spencer Gibb
@spencergibb
Nov 16 2016 18:16 UTC
custom filter?
Robert Van Voorhees
@voor
Nov 16 2016 18:16 UTC
Everything worked great when there was no server context path or zuul prefix, just goes to the drain when you add one of those in.
Yeah, that involves code changes, just seems lame that you can break it with that kind of config change.
Spencer Gibb
@spencergibb
Nov 16 2016 18:18 UTC
config changes don’t mean there aren’t side effects
Robert Van Voorhees
@voor
Nov 16 2016 18:18 UTC
Certainly.
Robert Van Voorhees
@voor
Nov 16 2016 18:27 UTC
You know it was a filter that was causing the problem to begin with.
Since it didn't take into account server.context-path, the problem started there.
Spencer Gibb
@spencergibb
Nov 16 2016 18:28 UTC
:-)