k8s store: fix wrong namespace used for election events

The event recorder namespace was set to `default` instead of using the right one.
This commit is contained in:
Simone Gotti 2018-03-02 11:51:53 +01:00
parent bb6c06ab56
commit 3f790f0cbd

View File

@ -389,7 +389,7 @@ func NewKubeElection(kubecli *kubernetes.Clientset, podName, namespace, clusterN
kubecli.CoreV1(),
resourcelock.ResourceLockConfig{
Identity: candidateUID,
EventRecorder: createRecorder(kubecli, "stolon-sentinel", "default"),
EventRecorder: createRecorder(kubecli, "stolon-sentinel", namespace),
})
if err != nil {
return nil, fmt.Errorf("error creating lock: %v", err)