Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…o issue_10576
  • Loading branch information
useryuyu committed Sep 9, 2024
2 parents cb44498 + 77488ed commit 9bf61dc
Show file tree
Hide file tree
Showing 156 changed files with 1,625 additions and 1,776 deletions.
78 changes: 78 additions & 0 deletions docs/overview/db/devops_ci_auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@
| T_AUTH_OAUTH2_SCOPE | 授权范围表 |
| T_AUTH_OAUTH2_SCOPE_OPERATION | 授权操作信息表 |
| T_AUTH_RESOURCE | 资源表 |
| T_AUTH_RESOURCE_AUTHORIZATION | 资源授权管理表 |
| T_AUTH_RESOURCE_GROUP | 资源关联用户组表 |
| T_AUTH_RESOURCE_GROUP_APPLY | 用户组申请记录表 |
| T_AUTH_RESOURCE_GROUP_CONFIG | 资源用户组配置表 |
| T_AUTH_RESOURCE_GROUP_MEMBER | 资源组成员 |
| T_AUTH_RESOURCE_SYNC | 同步 IAM 资源 |
| T_AUTH_RESOURCE_TYPE | 权限资源类型表 |
| T_AUTH_STRATEGY | 权限策略表 |
| T_AUTH_TEMPORARY_VERIFY_RECORD | 迁移-鉴权记录表 |
Expand Down Expand Up @@ -375,6 +379,25 @@
| 11 | CREATE_USER | varchar | 64 | 0 | N | N | | 创建者 |
| 12 | UPDATE_USER | varchar | 64 | 0 | N | N | | 修改人 |

**表名:** <a>T_AUTH_RESOURCE_AUTHORIZATION</a>

**说明:** 资源授权管理表

**数据列:**

| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 1 | ID | bigint | 20 | 0 | N | Y | | 主键 ID |
| 2 | PROJECT_CODE | varchar | 32 | 0 | N | N | | 项目 ID |
| 3 | RESOURCE_TYPE | varchar | 32 | 0 | N | N | | 资源类型 |
| 4 | RESOURCE_CODE | varchar | 255 | 0 | N | N | | 资源 ID |
| 5 | RESOURCE_NAME | varchar | 255 | 0 | N | N | | 资源名 |
| 6 | HANDOVER_FROM | varchar | 64 | 0 | N | N | | 授予人 |
| 7 | HANDOVER_FROM_CN_NAME | varchar | 64 | 0 | N | N | | 授予人中文名称 |
| 8 | HANDOVER_TIME | timestamp | 19 | 0 | N | N | CURRENT_TIMESTAMP | 授予时间 |
| 9 | CREATE_TIME | timestamp | 19 | 0 | Y | N | CURRENT_TIMESTAMP | 创建时间 |
| 10 | UPDATE_TIME | timestamp | 19 | 0 | Y | N | CURRENT_TIMESTAMP | 更新时间 |

**表名:** <a>T_AUTH_RESOURCE_GROUP</a>

**说明:** 资源关联用户组表
Expand All @@ -395,6 +418,25 @@
| 10 | RELATION_ID | varchar | 32 | 0 | N | N | | 关联的 IAM 组 ID |
| 11 | CREATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 创建时间 |
| 12 | UPDATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |
| 13 | DESCRIPTION | varchar | 512 | 0 | Y | N | | 用户组描述 |
| 14 | IAM_TEMPLATE_ID | int | 10 | 0 | Y | N | | 人员模板 ID |

**表名:** <a>T_AUTH_RESOURCE_GROUP_APPLY</a>

**说明:** 用户组申请记录表

**数据列:**

| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 1 | ID | bigint | 20 | 0 | N | Y | | 主键 ID |
| 2 | PROJECT_CODE | varchar | 64 | 0 | N | N | | 项目 ID |
| 3 | MEMBER_ID | varchar | 64 | 0 | N | N | | 成员 ID |
| 4 | IAM_GROUP_ID | int | 10 | 0 | N | N | | IAM 组 ID |
| 5 | STATUS | int | 10 | 0 | Y | N | 0 | 状态,0-审批中,1-审批成功,2-审批超时 |
| 6 | NUMBER_OF_CHECKS | int | 10 | 0 | Y | N | 0 | 检查次数,用于同步组数据 |
| 7 | CREATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 创建时间 |
| 8 | UPDATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |

**表名:** <a>T_AUTH_RESOURCE_GROUP_CONFIG</a>

Expand All @@ -416,6 +458,42 @@
| 10 | CREATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 创建时间 |
| 11 | UPDATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |

**表名:** <a>T_AUTH_RESOURCE_GROUP_MEMBER</a>

**说明:** 资源组成员

**数据列:**

| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 1 | ID | bigint | 20 | 0 | N | Y | | 主键 ID |
| 2 | PROJECT_CODE | varchar | 64 | 0 | N | N | | 项目 ID |
| 3 | RESOURCE_TYPE | varchar | 32 | 0 | N | N | | 资源类型 |
| 4 | RESOURCE_CODE | varchar | 255 | 0 | N | N | | 资源 ID |
| 5 | GROUP_CODE | varchar | 32 | 0 | N | N | | 用户组标识 |
| 6 | IAM_GROUP_ID | int | 10 | 0 | N | N | | IAM 组 ID |
| 7 | MEMBER_ID | varchar | 64 | 0 | N | N | | 成员 ID |
| 8 | MEMBER_NAME | varchar | 512 | 0 | N | N | | 成员名 |
| 9 | MEMBER_TYPE | varchar | 32 | 0 | N | N | | 成员类型,用户/组织/模板 |
| 10 | EXPIRED_TIME | datetime | 19 | 0 | N | N | | 过期时间 |
| 11 | CREATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 创建时间 |
| 12 | UPDATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |

**表名:** <a>T_AUTH_RESOURCE_SYNC</a>

**说明:** 同步 IAM 资源

**数据列:**

| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 1 | PROJECT_CODE | varchar | 64 | 0 | N | Y | | 项目 ID |
| 2 | STATUS | int | 10 | 0 | Y | N | 0 | 迁移状态,0-同步中,1-同步成功,2-同步失败 |
| 3 | ERROR_MESSAGE | text | 65535 | 0 | Y | N | | 错误信息 |
| 4 | TOTAL_TIME | bigint | 20 | 0 | Y | N | | 总耗时 |
| 5 | CREATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 创建时间 |
| 6 | UPDATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |

**表名:** <a>T_AUTH_RESOURCE_TYPE</a>

**说明:** 权限资源类型表
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/artifactory/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- name: storage
{{- if and .Values.persistence.enabled (eq .Values.config.bkCiArtifactoryRealm "local") }}
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/auth/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/bklog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: Helm
path:
- /data/logs/*-.log
- /data/workspace/*/logs/service.log
encoding: 'utf-8'
multiline:
pattern: '^[0-2][0-9][0-9][0-9].[0-1][0-9].[0-3][0-9]'
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/dispatch/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/environment/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/log/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/metrics/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/misc/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/notify/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/openapi/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/process/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/project/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/quality/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/repository/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/store/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/stream/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/ticket/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/websocket/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ spec:
command:
- /bin/bash
- -c
- sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
- sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AuthCronSyncGroupAndMember(
private val logger = LoggerFactory.getLogger(AuthCronSyncGroupAndMember::class.java)
}

@Scheduled(cron = "0 0 0 6 * ?")
@Scheduled(cron = "0 0 0 ? * SAT")
fun syncGroupAndMemberRegularly() {
if (!enable) {
return
Expand Down
Loading

0 comments on commit 9bf61dc

Please sign in to comment.