Skip to content

Commit

Permalink
feat: add creator annotation for pod (#3812)
Browse files Browse the repository at this point in the history
Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
  • Loading branch information
zhaohuiweixiao committed Oct 12, 2022
1 parent 3612cbe commit 2d86e73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pages/projects/containers/Pods/Detail/index.jsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/utils/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ function buildRequest({
'metadata.annotations["kubesphere.io/creator"]',
globals.user.username
)
if (get(params, 'spec.template')) {
set(
params,
'spec.template.metadata.annotations["kubesphere.io/creator"]',
globals.user.username
)
}
}
request.body = JSON.stringify(params)
}
Expand Down

0 comments on commit 2d86e73

Please sign in to comment.