GoogleCloudPlatform / GoogleCloudPlatform/prometheus-engine
Add defaulting logic for OperatorConfig's external labels during collection reconcile
- Dominant language
- Go
- Stars
- 232
- Forks
- 109
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 27
Description
Currently, the `collectionReconciler` uses either:
1. The operator's `--project-id`, `--location`, and `--cluster` labels, or
2. 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.
Contributor guide
Assessment
This issue has not been assessed yet.