Changes to accommodate client-go changes and kube vendor update

to v1.18.0

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal
2020-04-14 12:34:33 +05:30
committed by mergify[bot]
parent 4c96ad3c85
commit 34fc1d847e
1083 changed files with 50505 additions and 155846 deletions

View File

@ -20,29 +20,24 @@ import (
"os"
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs"
"k8s.io/klog"
)
var processStartTime = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "process_start_time_seconds",
Help: "Start time of the process since unix epoch in seconds.",
var processStartTime = NewGaugeVec(
&GaugeOpts{
Name: "process_start_time_seconds",
Help: "Start time of the process since unix epoch in seconds.",
StabilityLevel: ALPHA,
},
[]string{},
)
// Registerer is an interface expected by RegisterProcessStartTime in order to register the metric
type Registerer interface {
Register(prometheus.Collector) error
}
// RegisterProcessStartTime registers the process_start_time_seconds to
// a prometheus registry. This metric needs to be included to ensure counter
// data fidelity.
func RegisterProcessStartTime(registrationFunc func(prometheus.Collector) error) error {
func RegisterProcessStartTime(registrationFunc func(Registerable) error) error {
start, err := getProcessStart()
if err != nil {
klog.Errorf("Could not get process start time, %v", err)