Skip to content

Commit

Permalink
refactor: Configuration files uniformly use Kebab style (#5262)
Browse files Browse the repository at this point in the history
* refactor: Configuration files uniformly use Kebab style

* fix: misspelling

* fix:add CHANGES.md
  • Loading branch information
youngzil authored Oct 27, 2024
1 parent ced6383 commit d886164
Show file tree
Hide file tree
Showing 18 changed files with 129 additions and 128 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Apollo 2.4.0
* [Feature add limit for items count per namespace](https://github.com/apolloconfig/apollo/pull/5227)
* [Feature: Add ConfigService cache record stats function](https://github.com/apolloconfig/apollo/pull/5247)
* [RefreshAdminServerAddressTask supports dynamic configuration of time interval](https://github.com/apolloconfig/apollo/pull/5248)
* [Refactor: Configuration files uniformly use Kebab style](https://github.com/apolloconfig/apollo/pull/5262)

------------------
All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/15?closed=1)
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ spring.cloud.discovery.enabled=false

apollo.service.registry.enabled=true
apollo.service.registry.cluster=default
apollo.service.registry.heartbeatIntervalInSecond=10
apollo.service.registry.heartbeat-interval-in-second=10

6 changes: 3 additions & 3 deletions apollo-adminservice/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ logging:
eureka:
instance:
hostname: ${hostname:localhost}
preferIpAddress: true
prefer-ip-address: true
status-page-url-path: /info
health-check-url-path: /health
client:
serviceUrl:
service-url:
# This setting will be overridden by eureka.service.url setting from ApolloConfigDB.ServerConfig or System Property
# see com.ctrip.framework.apollo.biz.eureka.ApolloEurekaClientConfig
defaultZone: http://${eureka.instance.hostname}:8080/eureka/
healthcheck:
enabled: true
eurekaServiceUrlPollIntervalSeconds: 60
eureka-service-url-poll-interval-seconds: 60

management:
health:
Expand Down
4 changes: 2 additions & 2 deletions apollo-adminservice/src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ server:
eureka:
instance:
hostname: ${hostname:localhost}
preferIpAddress: true
prefer-ip-address: true
status-page-url-path: /info
health-check-url-path: /health
client:
serviceUrl:
service-url:
defaultZone: http://${eureka.instance.hostname}:8090/eureka/
healthcheck:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ spring.cloud.discovery.enabled=false

apollo.service.registry.enabled=true
apollo.service.registry.cluster=default
apollo.service.registry.heartbeatIntervalInSecond=10
apollo.service.registry.heartbeat-interval-in-second=10

apollo.service.discovery.enabled=true
# health check by heartbeat, heartbeat time before 61s ago will be seemed as unhealthy
apollo.service.discovery.healthCheckIntervalInSecond = 61
apollo.service.discovery.health-check-interval-in-second = 61
12 changes: 6 additions & 6 deletions apollo-assembly/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ management:
eureka:
instance:
hostname: ${hostname:localhost}
preferIpAddress: true
prefer-ip-address: true
status-page-url-path: /info
health-check-url-path: /health
server:
peerEurekaNodesUpdateIntervalMs: 60000
enableSelfPreservation: false
peer-eureka-nodes-update-interval-ms: 60000
enable-self-preservation: false
client:
serviceUrl:
service-url:
# This setting will be overridden by eureka.service.url setting from ApolloConfigDB.ServerConfig or System Property
# see com.ctrip.framework.apollo.biz.eureka.ApolloEurekaClientConfig
defaultZone: http://${eureka.instance.hostname}:8080/eureka/
healthcheck:
enabled: true
eurekaServiceUrlPollIntervalSeconds: 60
eureka-service-url-poll-interval-seconds: 60
fetch-registry: false
registerWithEureka: false
register-with-eureka: false

server:
compression:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ spring.cloud.discovery.enabled=false

apollo.service.registry.enabled=true
apollo.service.registry.cluster=default
apollo.service.registry.heartbeatIntervalInSecond=10
apollo.service.registry.heartbeat-interval-in-second=10

apollo.service.discovery.enabled=true
# health check by heartbeat, heartbeat time before 61s ago will be seemed as unhealthy
apollo.service.discovery.healthCheckIntervalInSecond = 61
apollo.service.discovery.health-check-interval-in-second = 61
12 changes: 6 additions & 6 deletions apollo-configservice/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ logging:
eureka:
instance:
hostname: ${hostname:localhost}
preferIpAddress: true
prefer-ip-address: true
status-page-url-path: /info
health-check-url-path: /health
server:
peerEurekaNodesUpdateIntervalMs: 60000
enableSelfPreservation: false
peer-eureka-nodes-update-interval-ms: 60000
enable-self-preservation: false
client:
serviceUrl:
service-url:
# This setting will be overridden by eureka.service.url setting from ApolloConfigDB.ServerConfig or System Property
# see com.ctrip.framework.apollo.biz.eureka.ApolloEurekaClientConfig
defaultZone: http://${eureka.instance.hostname}:8080/eureka/
healthcheck:
enabled: true
eurekaServiceUrlPollIntervalSeconds: 60
eureka-service-url-poll-interval-seconds: 60
fetch-registry: false
registerWithEureka: false
register-with-eureka: false

management:
health:
Expand Down
4 changes: 2 additions & 2 deletions apollo-configservice/src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ server:
eureka:
instance:
hostname: ${hostname:localhost}
preferIpAddress: true
prefer-ip-address: true
status-page-url-path: /info
health-check-url-path: /health
client:
serviceUrl:
service-url:
defaultZone: http://${eureka.instance.hostname}:8080/eureka/
healthcheck:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ spring:
base: "dc=example,dc=com"
username: "admin" # 配置管理员账号,用于搜索、匹配用户
password: "password"
searchFilter: "(sAMAccountName={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户
search-filter: "(sAMAccountName={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户
urls:
- "ldap://1.1.1.1:389"

ldap:
mapping: # 配置 ldap 属性
objectClass: "user" # ldap 用户 objectClass 配置
loginId: "sAMAccountName" # ldap 用户惟一 id,用来作为登录的 id
userDisplayName: "cn" # ldap 用户名,用来作为显示名
object-class: "user" # ldap 用户 objectClass 配置
login-id: "sAMAccountName" # ldap 用户惟一 id,用来作为登录的 id
user-display-name: "cn" # ldap 用户名,用来作为显示名
email: "userPrincipalName" # ldap 邮箱属性
# filter: # 可选项,配置过滤,目前只支持 memberOf
# memberOf: "CN=ServiceDEV,OU=test,DC=example,DC=com|CN=WebDEV,OU=test,DC=example,DC=com" # 只允许 memberOf 属性为 ServiceDEV 和 WebDEV 的用户访问
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ spring:
base: "dc=example,dc=com"
username: "uid=admin,ou=system" # 配置管理员账号,用于搜索、匹配用户
password: "password"
searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户
search-filter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户
urls:
- "ldap://localhost:10389"

ldap:
mapping: # 配置 ldap 属性
objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置
loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id
rdnKey: "cn" # ldap rdn key,可选项,如需启用group search需要配置
userDisplayName: "displayName" # ldap 用户名,用来作为显示名
object-class: "inetOrgPerson" # ldap 用户 objectClass 配置
login-id: "uid" # ldap 用户惟一 id,用来作为登录的 id
rdn-key: "cn" # ldap rdn key,可选项,如需启用group search需要配置
user-display-name: "displayName" # ldap 用户名,用来作为显示名
email: "mail" # ldap 邮箱属性
# group: # 配置ldap group,可选配置,启用后只有特定group的用户可以登录apollo
# objectClass: "groupOfNames" # 配置groupClassName
# groupBase: "ou=group" # group search base
# groupSearch: "(&(cn=dev))" # group filter
# groupMembership: "member" # group memberShip eg. member or memberUid
# object-class: "groupOfNames" # 配置groupClassName
# group-base: "ou=group" # group search base
# group-search: "(&(cn=dev))" # group filter
# group-membership: "member" # group memberShip eg. member or memberUid
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ spring:
base: "dc=example,dc=org"
username: "cn=admin,dc=example,dc=org" # 配置管理员账号,用于搜索、匹配用户
password: "password"
searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户
search-filter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户
urls:
- "ldap://localhost:389"

ldap:
mapping: # 配置 ldap 属性
objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置
loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id
rdnKey: "uid" # ldap rdn key,可选项,如需启用group search需要配置
userDisplayName: "cn" # ldap 用户名,用来作为显示名
object-class: "inetOrgPerson" # ldap 用户 objectClass 配置
login-id: "uid" # ldap 用户惟一 id,用来作为登录的 id
rdn-key: "uid" # ldap rdn key,可选项,如需启用group search需要配置
user-display-name: "cn" # ldap 用户名,用来作为显示名
email: "mail" # ldap 邮箱属性
# group: # 启用group search,可选配置,启用后只有特定group的用户可以登录apollo
# objectClass: "posixGroup" # 配置groupClassName
# groupBase: "ou=group" # group search base
# groupSearch: "(&(cn=dev))" # group filter
# groupMembership: "memberUid" # group memberShip eg. member or memberUid
# object-class: "posixGroup" # 配置groupClassName
# group-base: "ou=group" # group search base
# group-search: "(&(cn=dev))" # group filter
# group-membership: "memberUid" # group memberShip eg. member or memberUid
10 changes: 5 additions & 5 deletions docs/en/client/java-sdk-user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1105,13 +1105,13 @@ server.port = 8080

logging.level = ERROR

eureka.client.serviceUrl.defaultZone = http://127.0.0.1:8761/eureka/
eureka.client.service-url.defaultZone = http://127.0.0.1:8761/eureka/
eureka.client.healthcheck.enabled=true
eureka.client.registerWithEureka = true
eureka.client.fetchRegistry = true
eureka.client.eurekaServiceUrlPollIntervalSeconds = 60
eureka.client.register-with-eureka = true
eureka.client.fetch-registry = true
eureka.client.eureka-service-url-poll-interval-seconds = 60

eureka.instance.preferIpAddress = true
eureka.instance.prefer-ip-address = true
```

![text-mode-spring-boot-config-sample](https://cdn.jsdelivr.net/gh/apolloconfig/apollo@master/doc/images/text-mode-spring-boot-config-sample.png )
Expand Down
8 changes: 4 additions & 4 deletions docs/en/deployment/distributed-deployment-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1302,14 +1302,14 @@ config:
base: "dc=example,dc=org"
username: "cn=admin,dc=example,dc=org"
password: "password"
searchFilter: "(uid={0})"
search-filter: "(uid={0})"
urls:
- "ldap://xxx.somedomain.com:389"
ldap:
mapping:
objectClass: "inetOrgPerson"
loginId: "uid"
userDisplayName: "cn"
object-class: "inetOrgPerson"
login-id: "uid"
user-display-name: "cn"
email: "mail"
```

Expand Down
Loading

0 comments on commit d886164

Please sign in to comment.