Refactor http server and register leaderelection health check

- Needed to start the http server outside of pkg/metric
- We needed this because we want to add other endpoints to the server

Signed-off-by: Grant Griffiths <ggriffiths@purestorage.com>
This commit is contained in:
Grant Griffiths
2021-08-10 02:17:08 -07:00
parent b5b71904b4
commit 0476dcedcc
5 changed files with 91 additions and 70 deletions

View File

@@ -26,7 +26,7 @@ import (
storagelisters "github.com/kubernetes-csi/external-snapshotter/client/v4/listers/volumesnapshot/v1"
"github.com/kubernetes-csi/external-snapshotter/v4/pkg/snapshotter"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/util/wait"