Skip to content

Commit 50b074f

Browse files
author
Per Goncalves da Silva
committed
Add Boxcutter FG mapping
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent 050f9d2 commit 50b074f

File tree

7 files changed

+27
-3
lines changed

7 files changed

+27
-3
lines changed

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ module github.com/openshift/cluster-olm-operator
22

33
go 1.24.6
44

5+
// MUST BE REMOVED BEFORE MERGE
6+
replace github.com/openshift/api => github.com/anik120/openshift-api v0.0.0-20251113203504-11f7307b75ad
7+
58
require (
69
github.com/TwiN/deepmerge v0.2.2
710
github.com/blang/semver/v4 v4.0.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq
2626
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
2727
github.com/TwiN/deepmerge v0.2.2 h1:FUG9QMIYg/j2aQyPPhA3XTFJwXSNHI/swaR4Lbyxwg4=
2828
github.com/TwiN/deepmerge v0.2.2/go.mod h1:4OHvjV3pPNJCJZBHswYAwk6rxiD8h8YZ+9cPo7nu4oI=
29+
github.com/anik120/openshift-api v0.0.0-20251113203504-11f7307b75ad h1:EbKPpd737XnSW1rw7rw5b6U7oN6c7SZRJ6vhTUj9fcE=
30+
github.com/anik120/openshift-api v0.0.0-20251113203504-11f7307b75ad/go.mod h1:d5uzF0YN2nQQFA0jIEWzzOZ+edmo6wzlGLvx5Fhz4uY=
2931
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=
3032
github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw=
3133
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
@@ -296,8 +298,6 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
296298
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
297299
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
298300
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
299-
github.com/openshift/api v0.0.0-20251111013132-5c461e21bdb7 h1:fdvcDJySvjVJctbPbdLPoMiMk+bls34+eq6tWOqdFZg=
300-
github.com/openshift/api v0.0.0-20251111013132-5c461e21bdb7/go.mod h1:d5uzF0YN2nQQFA0jIEWzzOZ+edmo6wzlGLvx5Fhz4uY=
301301
github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee h1:+Sp5GGnjHDhT/a/nQ1xdp43UscBMr7G5wxsYotyhzJ4=
302302
github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE=
303303
github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235 h1:9JBeIXmnHlpXTQPi7LPmu1jdxznBhAE7bb1K+3D8gxY=

internal/featuregates/mapper.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const (
2323
// WebhookProviderCertManager: This is something that always needs to be disabled downstream
2424
WebhookProviderOpenshiftServiceCA = "WebhookProviderOpenshiftServiceCA"
2525
WebhookProviderCertManager = "WebhookProviderCertManager"
26+
NewOLMBoxCutterRuntime = "BoxcutterRuntime"
2627
)
2728

2829
type MapperInterface interface {
@@ -79,6 +80,9 @@ func NewMapper() *Mapper {
7980
features.FeatureGateNewOLMCatalogdAPIV1Metas: func(v *helmvalues.HelmValues, enabled bool) error {
8081
return enableCatalogdFeature(v, enabled, APIV1MetasHandler)
8182
},
83+
features.FeatureGateNewOLMBoxCutterRuntime: func(v *helmvalues.HelmValues, enabled bool) error {
84+
return enableOperatorControllerFeature(v, enabled, NewOLMBoxCutterRuntime)
85+
},
8286
}
8387

8488
for _, m := range []gateMapFunc{featureGates} {

internal/featuregates/mapper_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ func TestMapper_DownstreamFeatureGates(t *testing.T) {
3434
features.FeatureGateNewOLMOwnSingleNamespace,
3535
features.FeatureGateNewOLMWebhookProviderOpenshiftServiceCA,
3636
features.FeatureGateNewOLMCatalogdAPIV1Metas,
37+
features.FeatureGateNewOLMBoxCutterRuntime,
3738
}
3839

3940
if len(gates) != len(expectedGates) {
@@ -68,6 +69,12 @@ func TestMapper_UpstreamForDownstream(t *testing.T) {
6869
enabled: false,
6970
expectFunc: true,
7071
},
72+
{
73+
name: "valid downstream gate - boxcutter runtime",
74+
downstreamGate: features.FeatureGateNewOLMBoxCutterRuntime,
75+
enabled: false,
76+
expectFunc: true,
77+
},
7178
{
7279
name: "valid downstream gate - webhook provider",
7380
downstreamGate: features.FeatureGateNewOLMWebhookProviderOpenshiftServiceCA,

vendor/github.com/openshift/api/features.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/api/features/features.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ github.com/opencontainers/go-digest
366366
## explicit; go 1.18
367367
github.com/opencontainers/image-spec/specs-go
368368
github.com/opencontainers/image-spec/specs-go/v1
369-
# github.com/openshift/api v0.0.0-20251111013132-5c461e21bdb7
369+
# github.com/openshift/api v0.0.0-20251111013132-5c461e21bdb7 => github.com/anik120/openshift-api v0.0.0-20251113203504-11f7307b75ad
370370
## explicit; go 1.24.0
371371
github.com/openshift/api
372372
github.com/openshift/api/annotations
@@ -1904,3 +1904,4 @@ sigs.k8s.io/structured-merge-diff/v6/value
19041904
sigs.k8s.io/yaml
19051905
sigs.k8s.io/yaml/goyaml.v3
19061906
sigs.k8s.io/yaml/kyaml
1907+
# github.com/openshift/api => github.com/anik120/openshift-api v0.0.0-20251113203504-11f7307b75ad

0 commit comments

Comments
 (0)