-
Notifications
You must be signed in to change notification settings - Fork 248
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:bcs-helm-manager release 列表接口进一步优化 #3063
Conversation
20114bf
to
c94f70b
Compare
} | ||
|
||
// 获取版本号,string->int | ||
func getVersion(s string) int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成 parseVersion
} | ||
|
||
// Unix字符串转换 | ||
func getTime(s string) time.Time { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成 parseStringUnixTime
bearerToken := options.GlobalOptions.Release.Token | ||
url := fmt.Sprintf("%s/clusters/%s/api/v1/namespaces/%s/secrets?%s", apiServer, c.clusterID, option.Namespace, | ||
"labelSelector=owner=helm,status!=superseded") | ||
req, err := http.NewRequestWithContext(ctx, "GET", url, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http client 使用类似 bcs-monitor 里面的 http client,有封装好的,可以移植过来
"github.com/Tencent/bk-bcs/bcs-services/bcs-helm-manager/internal/release" | ||
"github.com/Tencent/bk-bcs/bcs-services/bcs-helm-manager/internal/store/entity" | ||
) | ||
|
||
func (c *cluster) list(ctx context.Context, option release.ListOption) (int, []*release.Release, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以新增一个 grpc 接口,和以前的 release list 接口区分开来,因为前端还没有改,先做兼容
2d26e95
to
7b885ad
Compare
return nil | ||
} | ||
|
||
func (l *ListReleaseV2Action) list() (*helmmanager.ReleaseListData, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
只是拉取集群里的 release 不同,看其他的能不能复用
package entity | ||
|
||
// SecretList is a list of Secret. | ||
type SecretList struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
secret 可以引用 k8s 的库,不用 copy 一份放这里
4b46d54
to
8f71faf
Compare
8f71faf
to
92a282b
Compare
* github-bk-bcs/master: fix: 客户端标签图表维度数据前端缓存 (#3252) fix: 修复配置项冲突计算错误 (#3249) fix: 修复客户端标签与实际不一致 (#3248) feat:bcs-monitor 删除 bcslogconfig 兼容代码 (#3241) feat:新增trace init公共方法及文件配置参数 (#3202) feat:bcs-helm-manager release 列表接口进一步优化 (#3063) fix: 客户端查询,客户端统计,批量导入问题修复 (#3247) fix: 修复导入配置模版失败 (#3246) 服务管理相关的测试问题修复 (#3245) fix: 客户端查询支持失败主类搜索以及验证空间套餐下之间的冲突 (#3243) fix: 客户端统计和批量导入bug修复 (#3244)
feat:bcs-helm-manager release 列表接口进一步优化