GoogleCloudPlatform / GoogleCloudPlatform/prometheus-engine
Remove webhooks from Operator
- Dominant language
- Go
- Stars
- 232
- Forks
- 109
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 27
Description
Over time, validating and mutating webhooks have been a source of several types of bugs for GMP:
1. Zero-node problems: When the operator is not scheduled because no nodes are available, webhooks fail and reject GMP Custom Resources.
2. Startup races: If a user installs GMP and PodMonitorings (for instance) at the same time, the webhook server may not yet be available, and the PodMonitoring will be rejected.
3. Instability problems: Any time the operator experiences downtime, CRDs validated/mutated by webhooks will be rejected.
4. Security concerns: Theoretically, if the operator is compromised, the webhook server could allow the attacker a vector to expand the attack.
5. Webhook server certificates: The operator currently has to generate and configure TLS certificates for the webhook server, which impacts several areas.
Broadly, the approach to remediate all of these issues is removal of webhooks and the webhook server, to be replaced with [built-in Kubernetes validation using OpenAPI schemas](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation) and [Common Expression Language (CEL)](https://kubernetes.io/docs/reference/using-api/cel/).
Affected Custom Resources:
- [X] ClusterNodeMonitorings
- [ ] Rules/ClusterRules/GlobalRules
- [ ] OperatorConfigs
- [X] PodMonitorings/ClusterPodMonitorings
Related work to date includes:
- #1266
- #1267
- #1329
- #1332
- #1338
- #1341
- #1342
- #1348
- #1349
- #1350
- #1375
- #1386
Contributor guide
Assessment
This issue has not been assessed yet.