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

[all] move operator.observability.prometheus feature gate to stable #3798

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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/prometheus_operator_feature_gate_stable.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: breaking

# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action)
component: all

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Move feature gate `operator.observability.prometheus` to stable

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

# (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:
14 changes: 0 additions & 14 deletions internal/manifests/collector/collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/go-logr/logr"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
otelColFeatureGate "go.opentelemetry.io/collector/featuregate"
v1 "k8s.io/api/authorization/v1"
rbacv1 "k8s.io/api/rbac/v1"

Expand All @@ -21,7 +20,6 @@ import (
"github.com/open-telemetry/opentelemetry-operator/internal/config"
"github.com/open-telemetry/opentelemetry-operator/internal/manifests"
irbac "github.com/open-telemetry/opentelemetry-operator/internal/rbac"
"github.com/open-telemetry/opentelemetry-operator/pkg/featuregate"
)

func TestNeedsCheckSaPermissions(t *testing.T) {
Expand Down Expand Up @@ -139,7 +137,6 @@ func TestBuild(t *testing.T) {
params manifests.Params
expectedObjects int
wantErr bool
featureGate *otelColFeatureGate.Gate
}{
{
name: "deployment mode builds expected manifests",
Expand Down Expand Up @@ -229,7 +226,6 @@ func TestBuild(t *testing.T) {
},
expectedObjects: 6,
wantErr: false,
featureGate: featuregate.PrometheusOperatorIsAvailable,
},
{
name: "metrics enabled adds service monitors",
Expand Down Expand Up @@ -265,7 +261,6 @@ func TestBuild(t *testing.T) {
},
expectedObjects: 9,
wantErr: false,
featureGate: featuregate.PrometheusOperatorIsAvailable,
},
{
name: "check sa permissions",
Expand Down Expand Up @@ -304,20 +299,11 @@ func TestBuild(t *testing.T) {
},
expectedObjects: 9,
wantErr: true,
featureGate: featuregate.PrometheusOperatorIsAvailable,
},
}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if tt.featureGate != nil {
err := otelColFeatureGate.GlobalRegistry().Set(tt.featureGate.ID(), true)
require.NoError(t, err)
defer func() {
err := otelColFeatureGate.GlobalRegistry().Set(tt.featureGate.ID(), false)
require.NoError(t, err)
}()
}

objects, err := Build(tt.params)
if tt.wantErr {
Expand Down
3 changes: 2 additions & 1 deletion pkg/featuregate/featuregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ var (
// PrometheusOperatorIsAvailable is the feature gate that enables features associated to the Prometheus Operator.
PrometheusOperatorIsAvailable = featuregate.GlobalRegistry().MustRegister(
"operator.observability.prometheus",
featuregate.StageBeta,
featuregate.StageStable,
featuregate.WithRegisterDescription("enables features associated to the Prometheus Operator"),
featuregate.WithRegisterFromVersion("v0.82.0"),
featuregate.WithRegisterToVersion("v0.122.0"),
)
// SetGolangFlags is the feature gate that enables automatically setting GOMEMLIMIT and GOMAXPROCS for the
// collector, bridge, and target allocator.
Expand Down
Loading