Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

[dev.operator-integrations] operator: add CRDs for integrations - #1288

Merged
rfratto merged 4 commits into
grafana-cold-storage:dev.operator-integrationsfrom
rfratto:operator-integration-crds
Jan 24, 2022
Merged

rfratto merged 4 commits into
grafana-cold-storage:dev.operator-integrationsfrom
rfratto:operator-integration-crds

Conversation

@rfratto

@rfratto rfratto commented Jan 19, 2022

Copy link
Copy Markdown
Contributor

This PR introduces CRDs for integrations:

  • MetricsIntegration is a child of GrafanaAgent and is used to specify a
    running metrics-based integration.

  • IntegrationMonitor is a child of MetricsInstance and is used to
    specify which MetricsIntegrations should be scraped for metrics.

The CRDs have been added to the resource hierarchy and will
automatically be discovered when reconciling a GrafanaAgent resource.
While the resources are discovered, this commit does not run
integrations or collect metrics from them.

As a part of this change, the old config.Deployment type has been moved
to pkg/operator/apis/monitoring/v1alpha1. This allows it to take
advantage of the DeepCopy function generation, a method which was
previously manually maintained.

(also use a consistent base image tag instead of latest)
@rfratto
rfratto changed the base branch from main to dev.operator-integrations January 19, 2022 22:38
This commit introduces CRDs for integrations:

* MetricsIntegration is a child of GrafanaAgent and is used to specify a
  running metrics-based integration.

* IntegrationMonitor is a child of MetricsInstance and is used to
  specify which MetricsIntegrations should be scraped for metrics.

The CRDs have been added to the resource hierarchy and will
automatically be discovered when reconciling a GrafanaAgent resource.
While the resources are discovered, this commit does *not* run
integrations or collect metrics from them.

As a part of this change, the old config.Deployment type has been moved
to pkg/operator/apis/monitoring/v1alpha1. This allows it to take
advantage of the DeepCopy function generation, a method which was
previously manually maintained.
@rfratto
rfratto force-pushed the operator-integration-crds branch from a3b6658 to 1f97650 Compare January 20, 2022 00:11

@rlankfo rlankfo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall but I believe the renaming of IgnoreNamespaceSelectors (in the comments) was unintentional and it's updating the generated CRD.

Comment thread pkg/operator/apis/monitoring/v1alpha1/types_logs.go Outdated
Comment thread pkg/operator/apis/monitoring/v1alpha1/types_metrics.go Outdated
Comment thread pkg/operator/reconciler.go Outdated
@rfratto
rfratto merged commit 3fefbf1 into grafana-cold-storage:dev.operator-integrations Jan 24, 2022
@rfratto
rfratto deleted the operator-integration-crds branch January 24, 2022 16:12
@github-actions github-actions Bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Apr 5, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants