Skip to content

Make S3 and Git backends more compatible#2780

Merged
ryanjbaxter merged 4 commits intospring-cloud:mainfrom
kkurczewski:git-s3-compatibility
Mar 5, 2025
Merged

Make S3 and Git backends more compatible#2780
ryanjbaxter merged 4 commits intospring-cloud:mainfrom
kkurczewski:git-s3-compatibility

Conversation

@kkurczewski
Copy link
Copy Markdown
Contributor

@kkurczewski kkurczewski commented Mar 5, 2025

Introduces new property useDirectoryLayout for S3 backend:

spring:
  cloud:
    config:
      server:
        awss3:
          region: eu-west-1
          bucket: ...
          useDirectoryLayout: true

When enabled it behaves analogous to searchPaths: {application} in Git backend, i.e. server will search S3 objects like:

bucket/{application}/application{-profile}.yml

Which match git structure like:

├── foo
│   ├── application-test.yml
│   └── application.yml
├── bar
│   ├── application-test.yml
│   └── application.yml

Fixes #1829

Copy link
Copy Markdown
Contributor

@ryanjbaxter ryanjbaxter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some documentation for this?

Signed-off-by: kkurczewski <[email protected]>
@kkurczewski
Copy link
Copy Markdown
Contributor Author

Hi, added basic docs

[[directory-layout]]
== Directory layout

Spring Cloud Config Server also supports per-app directory layout analogous to https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#_placeholders_in_git_search_paths[`search-paths: '{application}'`] in Git backend, as shown in the following example:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I bet we can do an asciidoc link without doing a fully qualified url. But I don't know how off the top of my head.

Copy link
Copy Markdown
Contributor Author

@kkurczewski kkurczewski Mar 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found example reference here, seems that magic keyword is xref.

Fixed in 6ec1e89

Signed-off-by: kkurczewski <[email protected]>
@ryanjbaxter ryanjbaxter merged commit 9e0b20b into spring-cloud:main Mar 5, 2025
@kkurczewski kkurczewski deleted the git-s3-compatibility branch March 6, 2025 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config Server: S3 integration should consume the same files as in Git intergation

4 participants