fix controller Start method signature
Signed-off-by: Roland.Ma <rolandma@yunify.com>
This commit is contained in:
@@ -692,8 +692,8 @@ func NewNSNetworkPolicyController(
|
||||
return controller
|
||||
}
|
||||
|
||||
func (c *NSNetworkPolicyController) Start(stopCh <-chan struct{}) error {
|
||||
return c.Run(defaultThread, defaultSync, stopCh)
|
||||
func (c *NSNetworkPolicyController) Start(ctx context.Context) error {
|
||||
return c.Run(defaultThread, defaultSync, ctx.Done())
|
||||
}
|
||||
|
||||
// Run starts the controller.
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package nsnetworkpolicy
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strings"
|
||||
@@ -157,7 +158,7 @@ var _ = Describe("Nsnetworkpolicy", func() {
|
||||
c.workspaceInformerSynced = alwaysReady
|
||||
c.informerSynced = alwaysReady
|
||||
|
||||
go c.Start(stopCh)
|
||||
go c.Start(context.Background())
|
||||
})
|
||||
|
||||
It("test func namespaceNetworkIsolateEnabled", func() {
|
||||
|
||||
Reference in New Issue
Block a user