Update vendored dependencies

This commit is contained in:
Christian Huffman
2020-07-23 15:19:22 -04:00
parent 547e88e4fb
commit bda8f8c0ae
909 changed files with 119096 additions and 130549 deletions

View File

@@ -8,7 +8,6 @@ reviewers:
- deads2k
- mikedanese
- gmarek
- eparis
- timothysc
- ingvagabund
- resouer

View File

@@ -65,7 +65,7 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
rl "k8s.io/client-go/tools/leaderelection/resourcelock"
"k8s.io/klog"
"k8s.io/klog/v2"
)
const (
@@ -195,10 +195,11 @@ type LeaderElector struct {
// Run starts the leader election loop
func (le *LeaderElector) Run(ctx context.Context) {
defer runtime.HandleCrash()
defer func() {
runtime.HandleCrash()
le.config.Callbacks.OnStoppedLeading()
}()
if !le.acquire(ctx) {
return // ctx signalled done
}

View File

@@ -88,6 +88,9 @@ func (cml *ConfigMapLock) Update(ctx context.Context, ler LeaderElectionRecord)
if err != nil {
return err
}
if cml.cm.Annotations == nil {
cml.cm.Annotations = make(map[string]string)
}
cml.cm.Annotations[LeaderElectionRecordAnnotationKey] = string(recordBytes)
cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Update(ctx, cml.cm, metav1.UpdateOptions{})
return err