Search code examples
springgitmicroservicesspring-cloud-config

Spring cloud config service - Git vs Native


I am trying to setup spring cloud config server. I see that there are two options for storing properties. Either Git or Native file system. Looks like people are more leaned towards using GIT against Native.

Our project follows trunk based development meaning it does not cut the branch on every release to production.

If we use GIT to read properties, and if someone change the property after deployment, then there is likely that changed property will be read which may create problem in production.

Did anyone faced the issue? How did you solve them?


Solution

  • If your Spring Cloud Git Backend is set to a tag or commit id (and not a branch), any modification should not be read.

    This repository implementation maps the {label} parameter of the HTTP resource to a git label (commit id, branch name or tag).
    If the git branch or tag name contains a slash ("/"), then the label in the HTTP URL should be specified with the special string "(_)" instead (to avoid ambiguity with other URL paths).

    Since a commit id or tag is immustable, that should avoid reading a new content.