Closed slopezz closed 1 year ago
LGTM label has been added.
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: slopezz
The full list of commands accepted by this bot can be found here.
The pull request process is described here
On https://github.com/3scale-ops/prometheus-exporter-operator/issues/48 it was reported a bug which made the operator to fail on the management of the GrafanaDashboard custom resource, due to using an old API.
It seems there is an API change on grafana-operator v5.0.0 from June 2023 https://github.com/grafana-operator/grafana-operator/releases/tag/v5.0.0
According to the migration docs https://github.com/grafana-operator/grafana-operator/blob/master/docs/blog/v4-v5-migration.md, it affects to prometheus-exporter-operator on 2 places:
integreatly.org/v1alpha1
grafana.integreatly.org/v1beta1
)metadata.labelX
spec.instanceSelector.matchLabels.labelX
So the operator has been adapted to have the 2 possible
GrafanaDashboard
apiVersions
, since there is a breaking change at grafana-operator level, and it is really possible that not everybody have updated yet to newer grafana-operator v5.0.0:grafanaDashboard.apiVersion
CRD field with the 2 possible apiVersionsGrafanaDashboard
with the 2 different apiversion/ labelSelector depending on the value ofgrafanaDashboard.apiVersion
(if defined in the CR), or using the default value (if not defined in the CR)grafanaDashboard.apiVersion
will be the oldapiVersion=v1alpha1
, the one used by most people at the momentspec.grafanaDashboard.apiVersion = v1beta1
apiVersion=v1beta1
spec.grafanaDashboard.apiVersion
/kind bug /kind feature /priority important-soon /assign