Skip to content

Commit

Permalink
remove gray vm and service selector version
Browse files Browse the repository at this point in the history
  • Loading branch information
刘宁 committed Jun 11, 2024
1 parent 31284de commit 3c7a028
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions domain/handler/service_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ func (h *serviceHandler) CreateOrUpdate() error {
}
service.Labels = util.MergeStringMap(service.Labels, h.sqbapplication.Labels)
// 如果是线上配置,selector需要加上version:base, label需要加上base
if entity.ConfigMapData.Env() == entity.ENV_PROD {
service.Spec.Selector[entity.PlaneKey] = entity.ConfigMapData.BaseFlag()
service.Labels[entity.PlaneKey] = entity.ConfigMapData.BaseFlag()
}
//if entity.ConfigMapData.Env() == entity.ENV_PROD {
// service.Spec.Selector[entity.PlaneKey] = entity.ConfigMapData.BaseFlag()
// service.Labels[entity.PlaneKey] = entity.ConfigMapData.BaseFlag()
//}
// 去掉selector的version字段
delete(service.Spec.Selector, entity.PlaneKey)
return CreateOrUpdate(h.ctx, service)
}

Expand Down
4 changes: 2 additions & 2 deletions domain/handler/sqbdeployment_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ func (h *sqbDeploymentHandler) Operate(obj runtimeObj) error {
handlers := []SQBHandler{
NewPVCHandler(in, h.ctx),
NewDeploymentHandler(in, h.ctx),
NewGrayServiceHandler(in, h.ctx),
NewGrayVMServiceScrapeHandler(in, h.ctx),
//NewGrayServiceHandler(in, h.ctx),
//NewGrayVMServiceScrapeHandler(in, h.ctx),
NewSqbdeploymentIngressHandler(in, h.ctx),
NewSpecialVirtualServiceHandler(in, h.ctx),
}
Expand Down

0 comments on commit 3c7a028

Please sign in to comment.