The operator's --project-id, --location, and --cluster labels, or
The OperatorConfig.collection.externalLabels argument for project_id, location, and cluster
to enforce the corresponding metric labels on exported time series to Cloud Monitoring, with a preference for (2), given they are not necessarily needed for the operator to function and are more directly exposed to end users.
However, we neither intercept CREATE calls to the OperatorConfig with our defaulting webhooks, nor do we in-memory default the OperatorConfig during the collection reconcile loop (e.g. when a new PodMonitoring is created).
Thus, we should add both webhook-based and reconcile-based defaulting to ensure a more consistent UX when understanding our relabeling.
Currently, the
collectionReconciler
uses either:--project-id
,--location
, and--cluster
labels, orOperatorConfig.collection.externalLabels
argument forproject_id
,location
, andcluster
to enforce the corresponding metric labels on exported time series to Cloud Monitoring, with a preference for (2), given they are not necessarily needed for the operator to function and are more directly exposed to end users.
However, we neither intercept
CREATE
calls to the OperatorConfig with our defaulting webhooks, nor do we in-memory default the OperatorConfig during the collection reconcile loop (e.g. when a new PodMonitoring is created).Thus, we should add both webhook-based and reconcile-based defaulting to ensure a more consistent UX when understanding our relabeling.