Documentation
¶
Index ¶
Constants ¶
const ( REQUEST_TIMEOUT = 15 * time.Second MAX_RETRIES = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RetinaEndpointReconciler ¶
RetinaEndpointReconciler managed the lifecycle of RetinaEndpoints from Pods.
func New ¶
func New(client client.Client, podchannel chan cache.PodCacheObject) *RetinaEndpointReconciler
func (*RetinaEndpointReconciler) DeleteOrphanedEndpoints ¶ added in v1.2.9
func (r *RetinaEndpointReconciler) DeleteOrphanedEndpoints(ctx context.Context) error
DeleteOrphanedEndpoints deletes RetinaEndpoints whose Pod no longer exists, once, when the operator starts. Owner references make the API server garbage collect RetinaEndpoints from then on, but ones already orphaned carry no reference and would never receive a Pod event, so nothing else would reclaim them.
This is best effort: errors are logged rather than returned, since the manager treats a failing runnable as fatal and the next operator start sweeps again anyway.
func (*RetinaEndpointReconciler) ReconcilePod ¶
func (r *RetinaEndpointReconciler) ReconcilePod(pctx context.Context)
when a pod reaches here, it indicates that there is a metricsconfiguration that references it, or doesn't and a RetinaEndpoint needs to be created or updated. This is a blocking function, and will wait on the pod channel until a pod is received.