Skip to content

Commit d728f7d

Browse files
committed
[all] move operator.observability.prometheus feature gate to stable
1 parent c8ae2d7 commit d728f7d

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: breaking
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action)
5+
component: all
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Move feature gate `operator.observability.prometheus` to stable
9+
10+
# One or more tracking issues related to the change
11+
issues: [3669]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext:

internal/manifests/collector/collector_test.go

-14
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"github.com/go-logr/logr"
1212
"github.com/stretchr/testify/assert"
1313
"github.com/stretchr/testify/require"
14-
otelColFeatureGate "go.opentelemetry.io/collector/featuregate"
1514
v1 "k8s.io/api/authorization/v1"
1615
rbacv1 "k8s.io/api/rbac/v1"
1716

@@ -21,7 +20,6 @@ import (
2120
"github.com/open-telemetry/opentelemetry-operator/internal/config"
2221
"github.com/open-telemetry/opentelemetry-operator/internal/manifests"
2322
irbac "github.com/open-telemetry/opentelemetry-operator/internal/rbac"
24-
"github.com/open-telemetry/opentelemetry-operator/pkg/featuregate"
2523
)
2624

2725
func TestNeedsCheckSaPermissions(t *testing.T) {
@@ -139,7 +137,6 @@ func TestBuild(t *testing.T) {
139137
params manifests.Params
140138
expectedObjects int
141139
wantErr bool
142-
featureGate *otelColFeatureGate.Gate
143140
}{
144141
{
145142
name: "deployment mode builds expected manifests",
@@ -229,7 +226,6 @@ func TestBuild(t *testing.T) {
229226
},
230227
expectedObjects: 6,
231228
wantErr: false,
232-
featureGate: featuregate.PrometheusOperatorIsAvailable,
233229
},
234230
{
235231
name: "metrics enabled adds service monitors",
@@ -265,7 +261,6 @@ func TestBuild(t *testing.T) {
265261
},
266262
expectedObjects: 9,
267263
wantErr: false,
268-
featureGate: featuregate.PrometheusOperatorIsAvailable,
269264
},
270265
{
271266
name: "check sa permissions",
@@ -304,20 +299,11 @@ func TestBuild(t *testing.T) {
304299
},
305300
expectedObjects: 9,
306301
wantErr: true,
307-
featureGate: featuregate.PrometheusOperatorIsAvailable,
308302
},
309303
}
310304

311305
for _, tt := range tests {
312306
t.Run(tt.name, func(t *testing.T) {
313-
if tt.featureGate != nil {
314-
err := otelColFeatureGate.GlobalRegistry().Set(tt.featureGate.ID(), true)
315-
require.NoError(t, err)
316-
defer func() {
317-
err := otelColFeatureGate.GlobalRegistry().Set(tt.featureGate.ID(), false)
318-
require.NoError(t, err)
319-
}()
320-
}
321307

322308
objects, err := Build(tt.params)
323309
if tt.wantErr {

pkg/featuregate/featuregate.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ var (
3838
// PrometheusOperatorIsAvailable is the feature gate that enables features associated to the Prometheus Operator.
3939
PrometheusOperatorIsAvailable = featuregate.GlobalRegistry().MustRegister(
4040
"operator.observability.prometheus",
41-
featuregate.StageBeta,
41+
featuregate.StageStable,
4242
featuregate.WithRegisterDescription("enables features associated to the Prometheus Operator"),
4343
featuregate.WithRegisterFromVersion("v0.82.0"),
44+
featuregate.WithRegisterToVersion("v0.122.0"),
4445
)
4546
// SetGolangFlags is the feature gate that enables automatically setting GOMEMLIMIT and GOMAXPROCS for the
4647
// collector, bridge, and target allocator.

0 commit comments

Comments
 (0)