[FIX] fix bug

This commit is contained in:
zhoujunhao 2018-07-03 16:50:59 +08:00
parent 57947dffb4
commit 37277a9c81
2 changed files with 4 additions and 3 deletions

View File

@ -544,10 +544,11 @@ type Manager struct {
dclient *client.Client
}
func NewManager(ctx context.Context, kubeclient *kubernetes.Clientset) (*Manager, error) {
func NewManager(ctx context.Context, cancel context.CancelFunc, kubeclient *kubernetes.Clientset) (*Manager, error) {
m := &Manager{
ctx: ctx,
kubeclient: kubeclient,
cancel: cancel,
}
queryResource := []func(*Manager) []Resource{
QueryRcResource,

View File

@ -62,8 +62,8 @@ func NewAppRuntimeSyncServer(conf option.Config) *AppRuntimeSyncServer {
statusManager := status.NewManager(ctx, clientset)
stopChan := make(chan struct{})
podCache := pod.NewCacheManager(clientset)
Clean,err := clean.NewManager(ctx, clientset)
if err!= nil{
Clean, err := clean.NewManager(ctx, cancel, clientset)
if err != nil {
logrus.Error(err)
}
arss := &AppRuntimeSyncServer{