Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
baf4b9d
:seedling: Bump actions/upload-artifact from 4 to 5 (#2288)
dependabot[bot] Oct 27, 2025
3c2fcb4
✨ Promote Single Own Feature Gate AND Config spec in the CR to GA (OP…
camilamacedo86 Oct 27, 2025
d0e3fcd
:seedling: Bump github.com/prometheus/common from 0.67.1 to 0.67.2 (#…
dependabot[bot] Oct 28, 2025
760855f
Revert "✨ Promote Single Own Feature Gate AND Config spec in the CR t…
perdasilva Oct 30, 2025
8bda126
Refactor e2e tests to support feature-gate aware skipping (#2293)
tmshort Oct 31, 2025
1572d1c
Remove `creationTimestamp` and status fields from webhook-operator te…
pedjak Oct 31, 2025
314e59f
Add regression test for bundles with webhooks (#2294)
perdasilva Oct 31, 2025
18142b3
:seedling: Bump mkdocs-material from 9.6.22 to 9.6.23 (#2297)
dependabot[bot] Nov 3, 2025
76c8774
Merge branch 'main' into synchronize
Nov 4, 2025
a497526
UPSTREAM: <carry>: Add OpenShift specific files
dtfranz Oct 26, 2023
bad1f1c
UPSTREAM: <carry>: Add new tests for single/own namespaces install modes
camilamacedo86 Oct 6, 2025
ceb2ead
UPSTREAM: <carry>: Upgrade OCP image from 4.20 to 4.21
camilamacedo86 Oct 13, 2025
58ef92e
UPSTREAM: <carry>: [Default Catalog Tests] - Change logic to get ocp …
camilamacedo86 Oct 13, 2025
e28c71e
UPSTREAM: <carry>: Update OCP catalogs to v4.21
tmshort Oct 13, 2025
2c319da
UPSTREAM: <carry>: support singleown cases in disconnected
kuiwang02 Oct 16, 2025
2880383
UPSTREAM: <carry>: fix cases 81696 and 74618 for product code changes
kuiwang02 Oct 17, 2025
a08fe1a
UPSTREAM: <carry>: Define Default timeouts and apply their usage accr…
camilamacedo86 Oct 22, 2025
3b5c583
UPSTREAM: <carry>: Update to new feature-gate options in helm
tmshort Oct 22, 2025
a260ab4
UPSTREAM: <carry>: Fix flake for single/own ns tests by ensuring uniq…
camilamacedo86 Oct 22, 2025
17a1dda
UPSTREAM: <carry>: [OTE]: Enhance single/own ns based on review comme…
camilamacedo86 Oct 24, 2025
4339d30
UPSTREAM: <drop>: go mod vendor
Nov 4, 2025
e912635
UPSTREAM: <drop>: remove upstream GitHub configuration
Nov 4, 2025
1aadadc
UPSTREAM: <drop>: configure the commit-checker
Nov 4, 2025
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
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,6 @@ test: manifests generate fmt lint test-unit test-e2e test-regression #HELP Run a
e2e: #EXHELP Run the e2e tests.
go test -count=1 -v ./test/e2e/...

.PHONY: experimental-e2e
experimental-e2e: #EXHELP Run the experimental e2e tests.
go test -count=1 -v ./test/experimental-e2e/...

E2E_REGISTRY_NAME := docker-registry
E2E_REGISTRY_NAMESPACE := operator-controller-e2e

Expand Down Expand Up @@ -288,7 +284,7 @@ test-experimental-e2e: KIND_CLUSTER_NAME := operator-controller-e2e
test-experimental-e2e: GO_BUILD_EXTRA_FLAGS := -cover
test-experimental-e2e: COVERAGE_NAME := experimental-e2e
test-experimental-e2e: export MANIFEST := $(EXPERIMENTAL_RELEASE_MANIFEST)
test-experimental-e2e: run-internal image-registry prometheus experimental-e2e e2e e2e-coverage kind-clean #HELP Run experimental e2e test suite on local kind cluster
test-experimental-e2e: run-internal image-registry prometheus e2e e2e-coverage kind-clean #HELP Run experimental e2e test suite on local kind cluster

.PHONY: prometheus
prometheus: PROMETHEUS_NAMESPACE := olmv1-system
Expand Down
2 changes: 1 addition & 1 deletion commitchecker.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
expectedMergeBase: f71870daded48936c5d2012211a885b339d1182f
expectedMergeBase: 18142b3f8aea16cf700633399af33b0f81a676c6
upstreamBranch: main
upstreamOrg: operator-framework
upstreamRepo: operator-controller
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/operator-framework/helm-operator-plugins v0.8.0
github.com/operator-framework/operator-registry v1.60.0
github.com/prometheus/client_golang v1.23.2
github.com/prometheus/common v0.67.1
github.com/prometheus/common v0.67.2
github.com/spf13/cobra v1.10.1
github.com/spf13/pflag v1.0.10
github.com/stretchr/testify v1.11.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UH
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
github.com/prometheus/common v0.67.1 h1:OTSON1P4DNxzTg4hmKCc37o4ZAZDv0cfXLkOt0oEowI=
github.com/prometheus/common v0.67.1/go.mod h1:RpmT9v35q2Y+lsieQsdOh5sXZ6ajUGC8NjZAmr8vb0Q=
github.com/prometheus/common v0.67.2 h1:PcBAckGFTIHt2+L3I33uNRTlKTplNzFctXcWhPyAEN8=
github.com/prometheus/common v0.67.2/go.mod h1:63W3KZb1JOKgcjlIr64WW/LvFGAqKPj0atm+knVGEko=
github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0=
github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw=
github.com/redis/go-redis/extra/rediscmd/v9 v9.10.0 h1:uTiEyEyfLhkw678n6EulHVto8AkcXVr8zUcBJNZ0ark=
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ markdown2==2.5.4
MarkupSafe==3.0.3
mergedeep==1.3.4
mkdocs==1.6.1
mkdocs-material==9.6.22
mkdocs-material==9.6.23
mkdocs-material-extensions==1.3.1
packaging==25.0
paginate==0.5.7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package experimental_e2e
package e2e

import (
"context"
"fmt"
"os"
"testing"
"time"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand All @@ -16,46 +15,19 @@ import (
apimeta "k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/rest"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

ocv1 "github.com/operator-framework/operator-controller/api/v1"
"github.com/operator-framework/operator-controller/internal/operator-controller/scheme"
utils "github.com/operator-framework/operator-controller/internal/shared/util/testutils"
. "github.com/operator-framework/operator-controller/test/helpers"
)

const (
artifactName = "operator-controller-experimental-e2e"
pollDuration = time.Minute
pollInterval = time.Second
soNsFlag = "SingleOwnNamespaceInstallSupport"
)

var (
cfg *rest.Config
c client.Client
)

func TestMain(m *testing.M) {
cfg = ctrl.GetConfigOrDie()

var err error
utilruntime.Must(apiextensionsv1.AddToScheme(scheme.Scheme))
c, err = client.New(cfg, client.Options{Scheme: scheme.Scheme})
utilruntime.Must(err)

os.Exit(m.Run())
}

func TestNoop(t *testing.T) {
t.Log("Running experimental-e2e tests")
defer utils.CollectTestArtifacts(t, artifactName, c, cfg)
}

func TestClusterExtensionSingleNamespaceSupport(t *testing.T) {
SkipIfFeatureGateDisabled(t, soNsFlag)
t.Log("Test support for cluster extension config")
defer utils.CollectTestArtifacts(t, artifactName, c, cfg)

Expand Down Expand Up @@ -213,6 +185,7 @@ func TestClusterExtensionSingleNamespaceSupport(t *testing.T) {
}

func TestClusterExtensionOwnNamespaceSupport(t *testing.T) {
SkipIfFeatureGateDisabled(t, soNsFlag)
t.Log("Test support for cluster extension with OwnNamespace install mode support")
defer utils.CollectTestArtifacts(t, artifactName, c, cfg)

Expand Down Expand Up @@ -382,6 +355,7 @@ func TestClusterExtensionOwnNamespaceSupport(t *testing.T) {
}

func TestClusterExtensionVersionUpdate(t *testing.T) {
SkipIfFeatureGateDisabled(t, soNsFlag)
t.Log("When a cluster extension is installed from a catalog")
t.Log("When resolving upgrade edges")

Expand Down
7 changes: 2 additions & 5 deletions test/e2e/webhook_support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@ import (

ocv1 "github.com/operator-framework/operator-controller/api/v1"
utils "github.com/operator-framework/operator-controller/internal/shared/util/testutils"
. "github.com/operator-framework/operator-controller/test/helpers"
)

var dynamicClient dynamic.Interface

func TestNoop(t *testing.T) {
t.Log("Running experimental-e2e tests")
defer utils.CollectTestArtifacts(t, artifactName, c, cfg)
}

func TestWebhookSupport(t *testing.T) {
SkipIfFeatureGateDisabled(t, "WebhookProviderCertManager")
t.Log("Test support for bundles with webhooks")
defer utils.CollectTestArtifacts(t, artifactName, c, cfg)

Expand Down
108 changes: 108 additions & 0 deletions test/helpers/feature_gates.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// Package utils provides helper functions for e2e tests, including
// feature gate detection and validation utilities.
package utils

import (
"strings"
"sync"
"testing"

"github.com/stretchr/testify/require"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/component-base/featuregate"
"sigs.k8s.io/controller-runtime/pkg/client"

catdfeatures "github.com/operator-framework/operator-controller/internal/catalogd/features"
opconfeatures "github.com/operator-framework/operator-controller/internal/operator-controller/features"
)

var (
featureGateStatus map[string]bool
featureGateStatusOnce sync.Once
)

const (
fgPrefix = "--feature-gates="
)

// SkipIfFeatureGateDisabled skips the test if the specified feature gate is disabled.
// It queries the OLM deployments to detect feature gate settings and falls back to
// programmatic defaults if the feature gate is not explicitly configured.
func SkipIfFeatureGateDisabled(t *testing.T, fg string) {
if !isFeatureGateEnabled(t, fg) {
t.Skipf("Feature-gate %q disabled", fg)
}
}

func isFeatureGateEnabled(t *testing.T, fg string) bool {
gatherFeatureGates(t)
enabled, ok := featureGateStatus[fg]
if ok {
return enabled
}

// Not found (i.e. not explicitly set), so we need to find the programmed default.
// Because feature-gates are organized by catd/opcon, we need to check each individually.
// To avoid a panic, we need to check if it's a known gate first.
mfgs := []featuregate.MutableFeatureGate{
catdfeatures.CatalogdFeatureGate,
opconfeatures.OperatorControllerFeatureGate,
}
f := featuregate.Feature(fg)
for _, mfg := range mfgs {
known := mfg.GetAll()
if _, ok := known[f]; ok {
e := mfg.Enabled(f)
t.Logf("Feature-gate %q not found in arguments, defaulting to %v", fg, e)
return e
}
}

t.Fatalf("Unknown feature-gate: %q", fg)
return false // unreachable, but required for compilation
}

func processFeatureGate(t *testing.T, featureGateValue string) {
fgvs := strings.Split(featureGateValue, ",")
for _, fg := range fgvs {
v := strings.Split(fg, "=")
require.Len(t, v, 2, "invalid feature-gate format: %q (expected name=value)", fg)
switch v[1] {
case "true":
featureGateStatus[v[0]] = true
t.Logf("Feature-gate %q enabled", v[0])
case "false":
featureGateStatus[v[0]] = false
t.Logf("Feature-gate %q disabled", v[0])
default:
t.Fatalf("invalid feature-gate value: %q (expected true or false)", fg)
}
}
}

func gatherFeatureGatesFromDeployment(t *testing.T, dep *appsv1.Deployment) {
for _, con := range dep.Spec.Template.Spec.Containers {
for _, arg := range con.Args {
if strings.HasPrefix(arg, fgPrefix) {
processFeatureGate(t, strings.TrimPrefix(arg, fgPrefix))
}
}
}
}

func gatherFeatureGates(t *testing.T) {
featureGateStatusOnce.Do(func() {
featureGateStatus = make(map[string]bool)

depList := &appsv1.DeploymentList{}
err := c.List(t.Context(), depList, client.MatchingLabels{
"app.kubernetes.io/part-of": "olm",
})
require.NoError(t, err)
require.Len(t, depList.Items, 2)

for _, d := range depList.Items {
gatherFeatureGatesFromDeployment(t, &d)
}
})
}
5 changes: 5 additions & 0 deletions test/regression/convert/generate-manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ func main() {
watchNamespace: "argocd-system",
bundle: "argocd-operator.v0.6.0",
testCaseName: "own-namespace",
}, {
name: "Webhooks",
installNamespace: "webhook-system",
bundle: "webhook-operator.v0.0.5",
testCaseName: "all-webhook-types",
},
} {
bundlePath := filepath.Join(bundleRootDir, tc.bundle)
Expand Down
Loading