Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: project-manager支持原生ns接口 #3612

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

LidolLxf
Copy link
Contributor

feat: project-manager支持原生ns接口

return errorx.NewClusterErr(err.Error())
}

if req.GetProjectIDOrCode() != "-" {
Copy link
Contributor

Choose a reason for hiding this comment

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

这里可以提前返回,if 层级太多了

if err := json.Unmarshal(ns.Object.Raw, &pom); err != nil {
return namespaceList, err
}
if shared && pom.Annotations != nil && pom.Annotations[constant.AnnotationKeyProjectCode] != projectCode {
Copy link
Contributor

Choose a reason for hiding this comment

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

这里应该是

if !shared  {
  continue
}
if pom.Annotations == nil {
  continue
}
if pom.Annotations[constant.AnnotationKeyProjectCode] != projectCode {
	continue
}

if err != nil {
return errorx.NewInnerErr(err.Error())
}
mt, err = nsutils.FilterTableNamespaces(mt, true, project.ProjectCode)
Copy link
Contributor

Choose a reason for hiding this comment

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

这里都是共享集群,没必要传递共享集群标志

@LidolLxf LidolLxf closed this Dec 4, 2024
@LidolLxf LidolLxf reopened this Dec 4, 2024
@ifooth ifooth merged commit f80cd1b into TencentBlueKing:master Dec 5, 2024
23 of 24 checks passed
evanlixin added a commit that referenced this pull request Dec 6, 2024
* github-bk-bcs/master:
  fix: 修改更新集群接口status状态字段验证规则 (#3628)
  feat: project-manager提供项目活跃度接口 (#3627)
  feat: 新增获取模板文件关联labels接口 (#3599)
  feat: 新增草稿模板文件语法模式 (#3605)
  feat: project-manager支持原生ns接口 (#3612)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants