Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: fixing disableprometheusannotation casing #2664

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .chloggen/default-prometheus-annotation-bugfix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
component: operator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Changing one of the fields to follow naming conventions with lowerCamelCase

# One or more tracking issues related to the change
issues: [2608]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
4 changes: 4 additions & 0 deletions apis/v1alpha1/collector_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ func (c CollectorWebhook) validate(ctx context.Context, r *OpenTelemetryCollecto
maxReplicas = r.Spec.MaxReplicas
}

if r.Spec.Observability.Metrics.DisablePrometheusAnnotations {
warnings = append(warnings, "DisablePrometheusAnnotations is deprecated, use DisableAutomaticPrometheusAnnotations instead")
}

var minReplicas *int32
if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.MinReplicas != nil {
minReplicas = r.Spec.Autoscaler.MinReplicas
Expand Down
7 changes: 7 additions & 0 deletions apis/v1alpha1/opentelemetrycollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,14 @@ type MetricsConfigSpec struct {
//
// +optional
// +kubebuilder:validation:Optional
// Deprecated: use "OpenTelemetryCollector.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations" instead
DisablePrometheusAnnotations bool `json:"DisablePrometheusAnnotations,omitempty"`
// DisableAutomaticPrometheusAnnotations controls the automatic addition of default Prometheus annotations
// ('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.io/path')
//
// +optional
// +kubebuilder:validation:Optional
DisableAutomaticPrometheusAnnotations bool `json:"disableAutomaticPrometheusAnnotations,omitempty"`
}

// ObservabilitySpec defines how telemetry data gets handled.
Expand Down
12 changes: 11 additions & 1 deletion bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3870,7 +3870,12 @@ spec:
DisablePrometheusAnnotations:
description: DisablePrometheusAnnotations controls the automatic
addition of default Prometheus annotations ('prometheus.io/scrape',
'prometheus.io/port', and 'prometheus.io/path')
'prometheus.io/port', and 'prometheus.
type: boolean
disableAutomaticPrometheusAnnotations:
description: DisableAutomaticPrometheusAnnotations controls
the automatic addition of default Prometheus annotations
('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.io/path')
type: boolean
enableMetrics:
description: EnableMetrics specifies if ServiceMonitor or
Expand Down Expand Up @@ -5214,6 +5219,11 @@ spec:
DisablePrometheusAnnotations:
description: DisablePrometheusAnnotations controls the
automatic addition of default Prometheus annotations
('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.
type: boolean
disableAutomaticPrometheusAnnotations:
description: DisableAutomaticPrometheusAnnotations controls
the automatic addition of default Prometheus annotations
('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.io/path')
type: boolean
enableMetrics:
Expand Down
12 changes: 11 additions & 1 deletion config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3867,7 +3867,12 @@ spec:
DisablePrometheusAnnotations:
description: DisablePrometheusAnnotations controls the automatic
addition of default Prometheus annotations ('prometheus.io/scrape',
'prometheus.io/port', and 'prometheus.io/path')
'prometheus.io/port', and 'prometheus.
type: boolean
disableAutomaticPrometheusAnnotations:
description: DisableAutomaticPrometheusAnnotations controls
the automatic addition of default Prometheus annotations
('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.io/path')
type: boolean
enableMetrics:
description: EnableMetrics specifies if ServiceMonitor or
Expand Down Expand Up @@ -5211,6 +5216,11 @@ spec:
DisablePrometheusAnnotations:
description: DisablePrometheusAnnotations controls the
automatic addition of default Prometheus annotations
('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.
type: boolean
disableAutomaticPrometheusAnnotations:
description: DisableAutomaticPrometheusAnnotations controls
the automatic addition of default Prometheus annotations
('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.io/path')
type: boolean
enableMetrics:
Expand Down
18 changes: 16 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -17815,7 +17815,14 @@ Metrics defines the metrics configuration for operands.
<td><b>DisablePrometheusAnnotations</b></td>
<td>boolean</td>
<td>
DisablePrometheusAnnotations controls the automatic addition of default Prometheus annotations ('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.io/path')<br/>
DisablePrometheusAnnotations controls the automatic addition of default Prometheus annotations ('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>disableAutomaticPrometheusAnnotations</b></td>
<td>boolean</td>
<td>
DisableAutomaticPrometheusAnnotations controls the automatic addition of default Prometheus annotations ('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.io/path')<br/>
</td>
<td>false</td>
</tr><tr>
Expand Down Expand Up @@ -20325,7 +20332,14 @@ Metrics defines the metrics configuration for operands.
<td><b>DisablePrometheusAnnotations</b></td>
<td>boolean</td>
<td>
DisablePrometheusAnnotations controls the automatic addition of default Prometheus annotations ('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.io/path')<br/>
DisablePrometheusAnnotations controls the automatic addition of default Prometheus annotations ('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>disableAutomaticPrometheusAnnotations</b></td>
<td>boolean</td>
<td>
DisableAutomaticPrometheusAnnotations controls the automatic addition of default Prometheus annotations ('prometheus.io/scrape', 'prometheus.io/port', and 'prometheus.io/path')<br/>
</td>
<td>false</td>
</tr><tr>
Expand Down
21 changes: 19 additions & 2 deletions internal/manifests/collector/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,25 @@
// new map every time, so that we don't touch the instance's annotations
annotations := map[string]string{}

// Enable Prometheus annotations by default if DisablePrometheusAnnotations is nil or true
if !instance.Spec.Observability.Metrics.DisablePrometheusAnnotations {
var enableAnnotations bool
// enableAnnotations is true only if both disable variables are false.
// DisableAutomaticPrometheusAnnotations takes precedence over DisablePrometheusAnnotations.
if instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations {

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-pdb)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-pdb)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-pdb)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-pdb)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-autoscale)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-autoscale)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-multi-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-multi-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-opampbridge)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-opampbridge)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-targetallocator)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-targetallocator)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-multi-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-multi-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-upgrade)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-upgrade)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Unit tests

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Unit tests

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-upgrade)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-upgrade)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-prometheuscr)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-prometheuscr)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-opampbridge)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-opampbridge)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-prometheuscr)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-prometheuscr)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-autoscale)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-autoscale)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Code standards (linting)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Code standards (linting)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Code standards (linting)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-targetallocator)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 33 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-targetallocator)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)
Copy link
Contributor

Choose a reason for hiding this comment

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

you'll need to add this to the v1beta1 type too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks fixed in beta version

enableAnnotations = !instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-pdb)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-pdb)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-pdb)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-pdb)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-autoscale)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-autoscale)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-multi-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-multi-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-opampbridge)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-opampbridge)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-targetallocator)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-targetallocator)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-multi-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-multi-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-upgrade)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-upgrade)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Unit tests

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Unit tests

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-upgrade)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-upgrade)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-prometheuscr)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-prometheuscr)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-opampbridge)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-opampbridge)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-prometheuscr)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-prometheuscr)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-autoscale)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-autoscale)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Code standards (linting)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Code standards (linting)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-targetallocator)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 34 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-targetallocator)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)
} else if instance.Spec.Observability.Metrics.DisablePrometheusAnnotations {
enableAnnotations = !instance.Spec.Observability.Metrics.DisablePrometheusAnnotations
} else {
enableAnnotations = true
}
if enableAnnotations {
// Set default Prometheus annotations
annotations["prometheus.io/scrape"] = "true"
annotations["prometheus.io/port"] = "8888"
annotations["prometheus.io/path"] = "/metrics"
}

// Enable Prometheus annotations by default if DisablePrometheusAnnotations|DisableAutomaticPrometheusAnnotations is nil or true
if !instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations {

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-pdb)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-pdb)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-pdb)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-pdb)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-autoscale)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-autoscale)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-multi-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-multi-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-opampbridge)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-opampbridge)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-targetallocator)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-targetallocator)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-multi-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-multi-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-instrumentation)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-upgrade)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-upgrade)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Unit tests

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Unit tests

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-upgrade)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-upgrade)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-prometheuscr)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-prometheuscr)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-opampbridge)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-opampbridge)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-prometheuscr)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-prometheuscr)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-autoscale)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-autoscale)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Code standards (linting)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)) (typecheck)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / Code standards (linting)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-targetallocator)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)

Check failure on line 48 in internal/manifests/collector/annotations.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-targetallocator)

instance.Spec.Observability.Metrics.DisableAutomaticPrometheusAnnotations undefined (type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec has no field or method DisableAutomaticPrometheusAnnotations)
// Set default Prometheus annotations
annotations["prometheus.io/scrape"] = "true"
annotations["prometheus.io/port"] = "8888"
Expand Down
3 changes: 2 additions & 1 deletion internal/manifests/collector/annotations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
Spec: v1beta1.OpenTelemetryCollectorSpec{
Observability: v1beta1.ObservabilitySpec{
Metrics: v1beta1.MetricsConfigSpec{
DisablePrometheusAnnotations: true,
DisablePrometheusAnnotations: true,
DisableAutomaticPrometheusAnnotations: true,

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-instrumentation)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-pdb)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-pdb)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-autoscale)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-multi-instrumentation)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-opampbridge)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-targetallocator)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-multi-instrumentation)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-instrumentation)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-upgrade)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / Unit tests

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-upgrade)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e-prometheuscr)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-opampbridge)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-prometheuscr)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-autoscale)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / Code standards (linting)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec (typecheck)

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.23, e2e)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec

Check failure on line 75 in internal/manifests/collector/annotations_test.go

View workflow job for this annotation

GitHub Actions / e2e-tests (1.29, e2e-targetallocator)

unknown field DisableAutomaticPrometheusAnnotations in struct literal of type "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1".MetricsConfigSpec
},
},
},
Expand Down
Loading