Documentation ¶
Index ¶
- func SanitizeSTS(sts *appsv1.StatefulSet)
- type Metrics
- func (m *Metrics) MustRegister(metrics ...prometheus.Collector)
- func (m *Metrics) NewInstrumentedListerWatcher(lw cache.ListerWatcher) cache.ListerWatcher
- func (m *Metrics) ReconcileErrorsCounter() prometheus.Counter
- func (m *Metrics) StsDeleteCreateCounter() prometheus.Counter
- func (m *Metrics) TriggerByCounter(triggered_by, action string) prometheus.Counter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizeSTS ¶ added in v0.37.0
func SanitizeSTS(sts *appsv1.StatefulSet)
SanitizeSTS removes values for APIVersion and Kind from the VolumeClaimTemplates. This prevents update failures due to these fields changing when applied. See https://github.com/kubernetes/kubernetes/issues/87583
Types ¶
type Metrics ¶ added in v0.35.0
type Metrics struct {
// contains filtered or unexported fields
}
Metrics represents metrics associated to an operator.
func NewMetrics ¶ added in v0.35.0
func NewMetrics(name string, r prometheus.Registerer) *Metrics
NewMetrics initializes operator metrics and registers them with the given registerer. All metrics have a "controller=<name>" label.
func (*Metrics) MustRegister ¶ added in v0.35.0
func (m *Metrics) MustRegister(metrics ...prometheus.Collector)
MustRegister registers metrics with the Metrics registerer.
func (*Metrics) NewInstrumentedListerWatcher ¶ added in v0.35.0
func (m *Metrics) NewInstrumentedListerWatcher(lw cache.ListerWatcher) cache.ListerWatcher
NewInstrumentedListerWatcher returns a cache.ListerWatcher with instrumentation.
func (*Metrics) ReconcileErrorsCounter ¶ added in v0.35.0
func (m *Metrics) ReconcileErrorsCounter() prometheus.Counter
ReconcileErrorsCounter returns a counter to track reconciliation errors.
func (*Metrics) StsDeleteCreateCounter ¶ added in v0.35.0
func (m *Metrics) StsDeleteCreateCounter() prometheus.Counter
StsDeleteCreateCounter returns a counter to track statefulset's recreations.
func (*Metrics) TriggerByCounter ¶ added in v0.35.0
func (m *Metrics) TriggerByCounter(triggered_by, action string) prometheus.Counter
TriggerByCounter returns a counter to track operator actions by operation (add/delete/update) and action.