mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
Lift kube dependency to 1.14.2
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
3
vendor/k8s.io/kubernetes/pkg/proxy/apis/config/types.go
generated
vendored
3
vendor/k8s.io/kubernetes/pkg/proxy/apis/config/types.go
generated
vendored
@ -55,6 +55,9 @@ type KubeProxyIPVSConfiguration struct {
|
||||
// excludeCIDRs is a list of CIDR's which the ipvs proxier should not touch
|
||||
// when cleaning up ipvs services.
|
||||
ExcludeCIDRs []string
|
||||
// strict ARP configure arp_ignore and arp_announce to avoid answering ARP queries
|
||||
// from kube-ipvs0 interface
|
||||
StrictARP bool
|
||||
}
|
||||
|
||||
// KubeProxyConntrackConfiguration contains conntrack settings for
|
||||
|
21
vendor/k8s.io/kubernetes/pkg/volume/util/metrics.go
generated
vendored
21
vendor/k8s.io/kubernetes/pkg/volume/util/metrics.go
generated
vendored
@ -24,11 +24,16 @@ import (
|
||||
"k8s.io/kubernetes/pkg/volume"
|
||||
)
|
||||
|
||||
const (
|
||||
statusSuccess = "success"
|
||||
statusFailUnknown = "fail-unknown"
|
||||
)
|
||||
|
||||
var storageOperationMetric = prometheus.NewHistogramVec(
|
||||
prometheus.HistogramOpts{
|
||||
Name: "storage_operation_duration_seconds",
|
||||
Help: "Storage operation duration",
|
||||
Buckets: []float64{.1, .25, .5, 1, 2.5, 5, 10, 15, 25, 50},
|
||||
Buckets: []float64{.1, .25, .5, 1, 2.5, 5, 10, 15, 25, 50, 120, 300, 600},
|
||||
},
|
||||
[]string{"volume_plugin", "operation_name"},
|
||||
)
|
||||
@ -41,6 +46,14 @@ var storageOperationErrorMetric = prometheus.NewCounterVec(
|
||||
[]string{"volume_plugin", "operation_name"},
|
||||
)
|
||||
|
||||
var storageOperationStatusMetric = prometheus.NewCounterVec(
|
||||
prometheus.CounterOpts{
|
||||
Name: "storage_operation_status_count",
|
||||
Help: "Storage operation return statuses count",
|
||||
},
|
||||
[]string{"volume_plugin", "operation_name", "status"},
|
||||
)
|
||||
|
||||
func init() {
|
||||
registerMetrics()
|
||||
}
|
||||
@ -48,6 +61,7 @@ func init() {
|
||||
func registerMetrics() {
|
||||
prometheus.MustRegister(storageOperationMetric)
|
||||
prometheus.MustRegister(storageOperationErrorMetric)
|
||||
prometheus.MustRegister(storageOperationStatusMetric)
|
||||
}
|
||||
|
||||
// OperationCompleteHook returns a hook to call when an operation is completed
|
||||
@ -56,11 +70,16 @@ func OperationCompleteHook(plugin, operationName string) func(*error) {
|
||||
opComplete := func(err *error) {
|
||||
timeTaken := time.Since(requestTime).Seconds()
|
||||
// Create metric with operation name and plugin name
|
||||
status := statusSuccess
|
||||
if *err != nil {
|
||||
// TODO: Establish well-known error codes to be able to distinguish
|
||||
// user configuration errors from system errors.
|
||||
status = statusFailUnknown
|
||||
storageOperationErrorMetric.WithLabelValues(plugin, operationName).Inc()
|
||||
} else {
|
||||
storageOperationMetric.WithLabelValues(plugin, operationName).Observe(timeTaken)
|
||||
}
|
||||
storageOperationStatusMetric.WithLabelValues(plugin, operationName, status).Inc()
|
||||
}
|
||||
return opComplete
|
||||
}
|
||||
|
Reference in New Issue
Block a user