Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Phase out deprecated "any" selector for prometheus (#274)
The client-go update might have caused some prometheus CRD keys to become deprecated: ``` W1211 22:57:47.332524 1 warnings.go:70] unknown field "spec.podMonitorNamespaceSelector.any" │ │ W1211 22:57:47.332547 1 warnings.go:70] unknown field "spec.podMonitorSelector.any" │ │ W1211 22:57:47.332551 1 warnings.go:70] unknown field "spec.ruleNamespaceSelector.any" │ │ W1211 22:57:47.332555 1 warnings.go:70] unknown field "spec.serviceMonitorNamespaceSelector.any" │ │ W1211 22:57:47.332558 1 warnings.go:70] unknown field "spec.serviceMonitorSelector.any" │ │ W1211 22:57:55.074526 1 warnings.go:70] unknown field "spec.podMonitorNamespaceSelector.any" │ │ W1211 22:57:55.074561 1 warnings.go:70] unknown field "spec.podMonitorSelector.any" │ │ W1211 22:57:55.074567 1 warnings.go:70] unknown field "spec.ruleNamespaceSelector.any" │ │ W1211 22:57:55.074572 1 warnings.go:70] unknown field "spec.serviceMonitorNamespaceSelector.any" │ │ W1211 22:57:55.074577 1 warnings.go:70] unknown field "spec.serviceMonitorSelector.any" ``` It's a little strange because looking at the CRDs, the any field [is still supported](https://github.com/prometheus-community/helm-charts/blob/e698c26417128aca0de24170f3155894aa881d4c/charts/kube-prometheus-stack/charts/crds/crds/crd-podmonitors.yaml#L88). Well, but on the `prometheus` CRD that we're actually using, it doesn't look like it [was ever supported](https://github.com/prometheus-community/helm-charts/blob/e698c26417128aca0de24170f3155894aa881d4c/charts/kube-prometheus-stack/charts/crds/crds/crd-prometheuses.yaml). Indeed, even in our internal replication, the "any" field isn't there: https://github.com/googlecloudrobotics/core/blob/7772ffdec00289a98edb9757beb716923dde3003/third_party/kube-prometheus-stack/01-crds.yaml Regardless, I moved to using an inverse match on an expression that really shouldn't exist to approximate a universal "any" match instead. Green **postsubmit** here: https://github.com/googlecloudrobotics/core/actions/runs/7174582208 Signed-off-by: methylDragon <[email protected]>
- Loading branch information