Skip to content

Commit

Permalink
feat: exposure actuator endpoints to improve observability (#4898)
Browse files Browse the repository at this point in the history
#### What type of PR is this?
/kind feature
/area core
/milestone 2.11.x

#### What this PR does / why we need it:
暴露 Actuator 指标端点以便监控服务状态

暴露了 Actuator 端点并提供角色模板,用户可创建 PAT 用于获取 Halo 运行状态数据或分配给其他用户

#### Which issue(s) this PR fixes:
Fixes #4894

#### Does this PR introduce a user-facing change?
```release-note
暴露 Actuator 指标端点以便监控服务状态
```
  • Loading branch information
guqing authored Nov 27, 2023
1 parent 3306b1f commit 6d6b161
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion application/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ management:
endpoints:
web:
exposure:
include: ["health", "info", "startup", "globalinfo", "logfile", "shutdown", "restart"]
include: "*"
endpoint:
shutdown:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1alpha1
kind: "Role"
metadata:
name: role-template-actuator
labels:
halo.run/role-template: "true"
annotations:
rbac.authorization.halo.run/module: "Actuator Management"
rbac.authorization.halo.run/display-name: "Actuator Manage"
rbac.authorization.halo.run/ui-permissions: |
["system:actuator:manage"]
rules:
- nonResourceURLs: [ "actuator", "/actuator/*" ]
verbs: [ "get" ]

0 comments on commit 6d6b161

Please sign in to comment.