Documentation ¶
Index ¶
- Variables
- func IgnoreAlreadyExists(err error) error
- func IgnoreNotFound(err error) error
- func IgnoreReportError(err error) error
- func NewConversionSerializer(scheme *runtime.Scheme) runtime.NegotiatedSerializer
- func RequeueConflict(err error) (*ctrl.Result, error)
- func RequeueIfUnavailable(err error) (*ctrl.Result, error)
- func WithConversion(config *rest.Config, scheme *runtime.Scheme) *rest.Config
- type ConversionDecoder
- type ConversionSerializer
Constants ¶
This section is empty.
Variables ¶
var ( // ReconcileConflictErrors is a Prometheus counter metric which holds the total // number of conflict errors from the Reconciler ReconcileConflictErrors = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "controller_runtime_reconcile_conflict_errors_total", Help: "Total number of reconciliation conflict errors per controller", }, []string{"controller"}) // ExperimentTrials is a Prometheus gauge metric which holds the total number // of trials for an experiment (trial counts can go down when they are cleaned up) ExperimentTrials = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "redsky_experiment_trials_total", Help: "Total number of trials present for an experiment", }, []string{"experiment"}) // ExperimentActiveTrials is a Prometheus gauge metric which holds the total number // of active trials for an experiment ExperimentActiveTrials = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "redsky_experiment_active_trials_total", Help: "Total number of active trials present for an experiment", }, []string{"experiment"}) )
Functions ¶
func IgnoreAlreadyExists ¶
IgnoreAlreadyExists returns the supplied error, unless that error is an "already exists" error
func IgnoreNotFound ¶
IgnoreNotFound returns the supplied error, unless that error is a "not found" error
func IgnoreReportError ¶
IgnoreReportError returns the supplied error, unless the error is ignorable when reporting trials
func NewConversionSerializer ¶
func NewConversionSerializer(scheme *runtime.Scheme) runtime.NegotiatedSerializer
NewConversionSerializer creates a new negotiated serializer that handles detection/conversion between versions of redskyops.dev objects.
func RequeueConflict ¶
RequeueConflict will return a new result and the supplied error, adjusted for Kubernetes conflict errors
func RequeueIfUnavailable ¶
RequeueIfUnavailable will return a new result and the supplied error, adjusted for trial unavailable errors
func WithConversion ¶
WithConversion returns the supplied rest.Config with the negotiated serializer set so version conversion between objects occurs during client-go reads into the cache. This ensures the controller never actually sees old representations of the objects (and we lazily migrate storage to the latest representation).
Types ¶
type ConversionDecoder ¶
ConversionDecoder is a decoder that decodes with the representation migration hack.
func (*ConversionDecoder) Decode ¶
func (c *ConversionDecoder) Decode(data []byte, defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error)
type ConversionSerializer ¶
type ConversionSerializer struct { runtime.NegotiatedSerializer // contains filtered or unexported fields }
ConversionSerializer is a negotiated serializer that also handles the representation migration hack.
func (*ConversionSerializer) DecoderToVersion ¶
func (c *ConversionSerializer) DecoderToVersion(serializer runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder