Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
735b41e
refactor(e2e): rename ClusterObjectSet secret cucumber steps for clar…
pedjak Apr 2, 2026
a6989b7
Fix ClusterObjectSet ref resolution for Secrets outside system namesp…
pedjak Apr 2, 2026
985d23a
:seedling: Bump github.com/klauspost/compress from 1.18.4 to 1.18.5 (…
dependabot[bot] Apr 2, 2026
9525539
:seedling: Bump github.com/go-jose/go-jose/v4 from 4.1.3 to 4.1.4 (#2…
dependabot[bot] Apr 3, 2026
5060cae
:seedling: Bump mkdocs-material from 9.7.5 to 9.7.6 (#2629)
dependabot[bot] Apr 3, 2026
2b102ab
Merge branch 'main' into synchronize
Apr 4, 2026
f1f4994
UPSTREAM: <carry>: Add OpenShift specific files
dtfranz Oct 26, 2023
ad2c6c2
UPSTREAM: <carry>: Add new tests for single/own namespaces install modes
camilamacedo86 Oct 6, 2025
832a91d
UPSTREAM: <carry>: Upgrade OCP image from 4.20 to 4.21
camilamacedo86 Oct 13, 2025
04d1e60
UPSTREAM: <carry>: [Default Catalog Tests] - Change logic to get ocp …
camilamacedo86 Oct 13, 2025
b9e7bf0
UPSTREAM: <carry>: Update OCP catalogs to v4.21
tmshort Oct 13, 2025
a9f6bfc
UPSTREAM: <carry>: support singleown cases in disconnected
kuiwang02 Oct 16, 2025
84b3036
UPSTREAM: <carry>: fix cases 81696 and 74618 for product code changes
kuiwang02 Oct 17, 2025
ef131f2
UPSTREAM: <carry>: Define Default timeouts and apply their usage accr…
camilamacedo86 Oct 22, 2025
973c6bb
UPSTREAM: <carry>: Update to new feature-gate options in helm
tmshort Oct 22, 2025
5ae90f8
UPSTREAM: <carry>: Fix flake for single/own ns tests by ensuring uniq…
camilamacedo86 Oct 22, 2025
16ef66a
UPSTREAM: <carry>: [OTE]: Enhance single/own ns based on review comme…
camilamacedo86 Oct 24, 2025
747fcaf
UPSTREAM: <carry>: Update OwnSingle template to use spec.config.inlin…
kuiwang02 Nov 3, 2025
e2e26c0
UPSTREAM: <carry>: [OTE]: Add webhook cleanup validation on extension…
camilamacedo86 Nov 4, 2025
0d2ffda
UPSTREAM: <carry>: Add [OTP] to migrated cases
kuiwang02 Nov 7, 2025
af0b785
UPSTREAM: <carry>: [OTE]: Upgrade dependencies used
camilamacedo86 Nov 5, 2025
14e28c8
UPSTREAM: <carry>: fix(OTE): fix OpenShift Kubernetes replace version…
camilamacedo86 Nov 10, 2025
22e3328
UPSTREAM: <carry>: [Default Catalog Tests] Upgrade go 1.24.6 and depe…
camilamacedo86 Nov 11, 2025
0d7b69e
UPSTREAM: <carry>: add disconnected environment support with custom p…
kuiwang02 Nov 12, 2025
5e11ba2
UPSTREAM: <carry>: migrate jiazha test cases to OTE
jianzhangbjz Nov 14, 2025
4fa9e6e
UPSTREAM: <carry>: migrate clustercatalog case to ote
Xia-Zhao-rh Oct 17, 2025
5d57254
UPSTREAM: <carry>: migrate olmv1 QE stress cases
kuiwang02 Nov 20, 2025
4611bfe
UPSTREAM: <carry>: Use busybox/httpd to simulate probes
tmshort Nov 25, 2025
f0eb256
UPSTREAM: <carry>: migrate olmv1 QE cases
Xia-Zhao-rh Nov 25, 2025
475b696
UPSTREAM: <carry>: add agent for olmv1 qe cases
kuiwang02 Oct 21, 2025
cb78629
UPSTREAM: <carry>: Disable upstream PodDisruptionBudget
tmshort Dec 3, 2025
fde04b4
UPSTREAM: <carry>: Add AGENTS.md for AI code contributions
rashmigottipati Dec 11, 2025
e375dbd
UPSTREAM: <carry>: address review comments through addl prompts
rashmigottipati Dec 11, 2025
b91b84b
UPSTREAM: <carry>: addressing some more review comments
rashmigottipati Dec 11, 2025
1dbbc9c
UPSTREAM: <carry>: remove DCO line
rashmigottipati Dec 11, 2025
3378bea
UPSTREAM: <carry>: migrate bandrade test cases to OTE
bandrade Nov 18, 2025
b0bdc4b
UPSTREAM: <carry>: update metadata
bandrade Dec 3, 2025
43d2de1
UPSTREAM: <carry>: remove originalName
bandrade Dec 3, 2025
942ab32
UPSTREAM: <carry>: update 80458's timeout to 180s
jianzhangbjz Dec 8, 2025
514bcb1
UPSTREAM: <carry>: update 83026 to specify the clustercatalog
jianzhangbjz Dec 15, 2025
51620ee
UPSTREAM: <carry>: Update to golang 1.25 and ocp 4.22
oceanc80 Dec 18, 2025
ec8f0e3
UPSTREAM: <carry>: Use oc client for running e2e tests
pedjak Jan 13, 2026
c68362b
UPSTREAM: <carry>: Run upstream e2e tests tagged with `@catalogd-update`
pedjak Jan 14, 2026
69e502b
UPSTREAM: <carry>: enhance case to make it more stable
kuiwang02 Jan 6, 2026
676829b
UPSTREAM: <carry>: add service account to curl job
ehearne-redhat Jan 7, 2026
67dc263
UPSTREAM: <carry>: move sa creation out of buildCurlJob()
ehearne-redhat Jan 8, 2026
7c9e4f6
UPSTREAM: <carry>: comment out delete service account
ehearne-redhat Jan 9, 2026
4d6c087
UPSTREAM: <carry>: move defercleanup for sa for LIFO
ehearne-redhat Jan 9, 2026
0dd2a0c
UPSTREAM: <carry>: add polling so job fully deleted before proceed
ehearne-redhat Jan 12, 2026
fd32bcf
UPSTREAM: <carry>: Revert "Merge pull request #594 from ehearne-redha…
sosiouxme Jan 20, 2026
573b61b
UPSTREAM: <carry>: Remove openshift-redhat-marketplace catalog tests
camilamacedo86 Jan 8, 2026
5768ff0
UPSTREAM: <carry>: config watchnamespace cases
kuiwang02 Jan 6, 2026
2f39d09
UPSTREAM: <carry>: enhance ocp-79770
Xia-Zhao-rh Jan 26, 2026
480421e
UPSTREAM: <carry>: upgrade version support case
kuiwang02 Jan 28, 2026
fea120d
UPSTREAM: <carry>: Remove installed condition check from auth preflig…
Jan 30, 2026
030b802
UPSTREAM: <carry>: Add openshift/api dependency
Jan 30, 2026
ac7e3fb
UPSTREAM: <carry>: Add boxcutter specific preflight auth test
Jan 30, 2026
3d72d22
UPSTREAM: <carry>: adjust watchnamespace case based on change
kuiwang02 Feb 2, 2026
42cc17d
UPSTREAM: <carry>: fix(ote): Use as operator-controller dep from root…
camilamacedo86 Feb 3, 2026
a87be4c
UPSTREAM: <carry>: add 83979 automation
bandrade Feb 2, 2026
7577c11
UPSTREAM: <carry>: add 85889 automation
bandrade Feb 2, 2026
5a120f6
UPSTREAM: <carry>: Update test-operator startup script to fix pod pro…
Feb 4, 2026
db6f852
UPSTREAM: <carry>: Fix up own-namespace invalid configuration test
Feb 7, 2026
fed095f
UPSTREAM: <carry>: Preflight tests use in-cluster catalog and bundles…
camilamacedo86 Feb 24, 2026
e511e98
UPSTREAM: <carry>: adjust sa and permission test cases per new change…
kuiwang02 Feb 2, 2026
217d45f
UPSTREAM: <carry>: Update OCP catalogs to v4.22
camilamacedo86 Feb 3, 2026
0b11f55
UPSTREAM: <carry>: chore(OTE and Default Catalog Tests) Update go and…
camilamacedo86 Feb 26, 2026
e1178ec
UPSTREAM: <carry>: fix 83026 for TP cluster
jianzhangbjz Feb 28, 2026
46796cc
UPSTREAM: <carry>: serviceAccount validation unified across all runtimes
kuiwang02 Mar 6, 2026
e4e54ef
UPSTREAM: <carry>: Fix OLMv1 test operator to listen on IPv6
stbenjam Mar 6, 2026
a8784e6
UPSTREAM: <carry>: Increase install timeout and add diagnostic loggin…
camilamacedo86 Mar 11, 2026
e488b1d
UPSTREAM: <carry>: add service account to curl job
ehearne-redhat Mar 2, 2026
c86aa8c
UPSTREAM: <carry>: update OCP-75441 to support multi-arch
jianzhangbjz Mar 19, 2026
59759a4
UPSTREAM: <carry>: deployment config cases
kuiwang02 Feb 6, 2026
8bca875
UPSTREAM: <carry>: Add OTE tests for OLMv1 DeploymentConfig support
tmshort Mar 11, 2026
5250eb0
UPSTREAM: <carry>: Update openshift/api and client-go
tmshort Mar 19, 2026
affa16b
UPSTREAM: <carry>: Add boxcutter tests
camilamacedo86 Mar 23, 2026
2a5288e
UPSTREAM: <carry>: enhance QE cases
Xia-Zhao-rh Mar 17, 2026
0d27a8b
UPSTREAM: <carry>: Update quay-operator version to one containing arm…
dtfranz Mar 24, 2026
c3d35b8
UPSTREAM: <carry>: verify volume/volumeMount override
kuiwang02 Mar 25, 2026
cd8359e
UPSTREAM: <carry>: Add long-duration test script and documents
jianzhangbjz Mar 11, 2026
c0c3ad1
UPSTREAM: <carry>: Update grpc in default-catalog-consistency tests
tmshort Mar 27, 2026
73f69cc
UPSTREAM: <carry>: Rename ClusterExtensionRevision to ClusterObjectSe…
camilamacedo86 Mar 31, 2026
b453f30
UPSTREAM: <carry>: Skip incompatible operator test when Boxcutter use…
camilamacedo86 Mar 31, 2026
d59c765
UPSTREAM: <carry>: add ocp-87557
bandrade Feb 8, 2026
9cca4e8
UPSTREAM: <carry>: Add fgiudici as reviewer
fgiudici Mar 31, 2026
7399ffe
UPSTREAM: <carry>: Remove skip for incompatible operator check after …
camilamacedo86 Apr 1, 2026
693ccc3
UPSTREAM: <carry>: Test empty affinity erasure and cleanup
kuiwang02 Apr 1, 2026
82b5d71
UPSTREAM: <drop>: go mod vendor
Apr 4, 2026
68bdf6f
UPSTREAM: <drop>: remove upstream GitHub configuration
Apr 4, 2026
2c564e0
UPSTREAM: <drop>: configure the commit-checker
Apr 4, 2026
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
23 changes: 22 additions & 1 deletion cmd/operator-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (

"github.com/spf13/cobra"
"go.podman.io/image/v5/types"
corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
apiextensionsv1client "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1"
Expand Down Expand Up @@ -697,8 +698,13 @@ func (c *boxcutterReconcilerConfigurator) Configure(ceReconciler *controllers.Cl
return fmt.Errorf("unable to create revision engine factory: %w", err)
}

cosClient := &secretFallbackClient{
Client: c.mgr.GetClient(),
apiReader: c.mgr.GetAPIReader(),
systemNamespace: cfg.systemNamespace,
}
if err = (&controllers.ClusterObjectSetReconciler{
Client: c.mgr.GetClient(),
Client: cosClient,
RevisionEngineFactory: revisionEngineFactory,
TrackingCache: trackingCache,
}).SetupWithManager(c.mgr); err != nil {
Expand Down Expand Up @@ -791,3 +797,18 @@ func main() {
os.Exit(1)
}
}

// secretFallbackClient wraps a cached client.Client and falls back to direct
// API reads for Secrets outside the system namespace, where the cache does not watch.
type secretFallbackClient struct {
client.Client
apiReader client.Reader
systemNamespace string
}

func (c *secretFallbackClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error {
if _, isSecret := obj.(*corev1.Secret); isSecret && key.Namespace != c.systemNamespace {
return c.apiReader.Get(ctx, key, obj, opts...)
}
return c.Client.Get(ctx, key, obj, opts...)
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/google/go-containerregistry v0.21.3
github.com/google/renameio/v2 v2.0.2
github.com/gorilla/handlers v1.5.2
github.com/klauspost/compress v1.18.4
github.com/klauspost/compress v1.18.5
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.1
github.com/operator-framework/api v0.41.0
Expand Down Expand Up @@ -113,7 +113,7 @@ require (
github.com/go-git/go-billy/v5 v5.8.0 // indirect
github.com/go-git/go-git/v5 v5.17.1 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/go-jose/go-jose/v4 v4.1.3 // indirect
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.22.5 // indirect
github.com/go-openapi/jsonreference v0.21.5 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ github.com/go-git/go-git/v5 v5.17.1 h1:WnljyxIzSj9BRRUlnmAU35ohDsjRK0EKmL0evDqi5
github.com/go-git/go-git/v5 v5.17.1/go.mod h1:pW/VmeqkanRFqR6AljLcs7EA7FbZaN5MQqO7oZADXpo=
github.com/go-gorp/gorp/v3 v3.1.0 h1:ItKF/Vbuj31dmV4jxA1qblpSwkl9g1typ24xoe70IGs=
github.com/go-gorp/gorp/v3 v3.1.0/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpjH8TixEw=
github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs=
github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA=
github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
Expand Down Expand Up @@ -324,8 +324,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c=
github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
github.com/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE=
github.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ rules:
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- apiGroups:
- olm.operatorframework.io
resources:
Expand Down
6 changes: 6 additions & 0 deletions manifests/experimental-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2167,6 +2167,12 @@ rules:
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- apiGroups:
- olm.operatorframework.io
resources:
Expand Down
6 changes: 6 additions & 0 deletions manifests/experimental.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2128,6 +2128,12 @@ rules:
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- apiGroups:
- olm.operatorframework.io
resources:
Expand Down
4 changes: 2 additions & 2 deletions openshift/tests-extension/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c=
github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
github.com/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE=
github.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
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.5
MarkupSafe==3.0.3
mergedeep==1.3.4
mkdocs==1.6.1
mkdocs-material==9.7.5
mkdocs-material==9.7.6
mkdocs-material-extensions==1.3.1
packaging==26.0
paginate==0.5.7
Expand Down
15 changes: 9 additions & 6 deletions test/e2e/features/install.feature
Original file line number Diff line number Diff line change
Expand Up @@ -524,12 +524,15 @@ Feature: Install ClusterExtension
"""
Then ClusterExtension is rolled out
And ClusterExtension is available
And ClusterObjectSet "${NAME}-1" phase objects use refs
And ClusterObjectSet "${NAME}-1" ref Secrets exist in "olmv1-system" namespace
And ClusterObjectSet "${NAME}-1" ref Secrets are immutable
And ClusterObjectSet "${NAME}-1" ref Secrets are labeled with revision and owner
And ClusterObjectSet "${NAME}-1" ref Secrets have ownerReference to the revision
And ClusterObjectSet "${NAME}-1" ref Secrets have type "olm.operatorframework.io/object-data"
And ClusterObjectSet "${NAME}-1" phase objects are managed in Kubernetes secrets
And ClusterObjectSet "${NAME}-1" referred secrets exist in "olmv1-system" namespace
And ClusterObjectSet "${NAME}-1" referred secrets are immutable
And ClusterObjectSet "${NAME}-1" referred secrets contain labels
| key | value |
| olm.operatorframework.io/revision-name | ${NAME}-1 |
| olm.operatorframework.io/owner-name | ${NAME} |
And ClusterObjectSet "${NAME}-1" referred secrets are owned by the object set
And ClusterObjectSet "${NAME}-1" referred secrets have type "olm.operatorframework.io/object-data"

@DeploymentConfig
Scenario: deploymentConfig nodeSelector is applied to the operator deployment
Expand Down
106 changes: 105 additions & 1 deletion test/e2e/features/revision.feature
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,108 @@ Feature: Install ClusterObjectSet
And resource "pod/test-pod" is installed
And resource "configmap/test-configmap-3" is installed
And ClusterObjectSet "${COS_NAME}" reports Progressing as True with Reason Succeeded
And ClusterObjectSet "${COS_NAME}" reports Available as True with Reason ProbesSucceeded
And ClusterObjectSet "${COS_NAME}" reports Available as True with Reason ProbesSucceeded

Scenario: User can install a ClusterObjectSet with objects stored in Secrets
Given ServiceAccount "olm-sa" with needed permissions is available in test namespace
When resource is applied
"""
apiVersion: v1
kind: Secret
metadata:
name: ${COS_NAME}-ref-secret
namespace: ${TEST_NAMESPACE}
immutable: true
type: olm.operatorframework.io/object-data
stringData:
configmap: |
{
"apiVersion": "v1",
"kind": "ConfigMap",
"metadata": {
"name": "test-configmap-ref",
"namespace": "${TEST_NAMESPACE}"
},
"data": {
"key": "value"
}
}
deployment: |
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": "test-httpd",
"namespace": "${TEST_NAMESPACE}",
"labels": {
"app": "test-httpd"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"app": "test-httpd"
}
},
"template": {
"metadata": {
"labels": {
"app": "test-httpd"
}
},
"spec": {
"containers": [
{
"name": "httpd",
"image": "busybox:1.36",
"imagePullPolicy": "IfNotPresent",
"command": ["httpd"],
"args": ["-f", "-p", "8080"],
"securityContext": {
"runAsNonRoot": true,
"runAsUser": 1000,
"allowPrivilegeEscalation": false,
"capabilities": {
"drop": ["ALL"]
},
"seccompProfile": {
"type": "RuntimeDefault"
}
}
}
]
}
}
}
}
"""
And ClusterObjectSet is applied
"""
apiVersion: olm.operatorframework.io/v1
kind: ClusterObjectSet
metadata:
annotations:
olm.operatorframework.io/service-account-name: olm-sa
olm.operatorframework.io/service-account-namespace: ${TEST_NAMESPACE}
name: ${COS_NAME}
spec:
lifecycleState: Active
collisionProtection: Prevent
phases:
- name: resources
objects:
- ref:
name: ${COS_NAME}-ref-secret
namespace: ${TEST_NAMESPACE}
key: configmap
- ref:
name: ${COS_NAME}-ref-secret
namespace: ${TEST_NAMESPACE}
key: deployment
revision: 1
"""
Then ClusterObjectSet "${COS_NAME}" reports Progressing as True with Reason Succeeded
And ClusterObjectSet "${COS_NAME}" reports Available as True with Reason ProbesSucceeded
And resource "configmap/test-configmap-ref" is installed
And resource "deployment/test-httpd" is installed
13 changes: 9 additions & 4 deletions test/e2e/steps/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ import (
)

type resource struct {
name string
kind string
name string
kind string
namespace string
}

type scenarioContext struct {
Expand Down Expand Up @@ -195,8 +196,12 @@ func ScenarioCleanup(ctx context.Context, _ *godog.Scenario, err error) (context
forDeletion = append(forDeletion, resource{name: sc.namespace, kind: "namespace"})
for _, r := range forDeletion {
go func(res resource) {
if _, err := k8sClient("delete", res.kind, res.name, "--ignore-not-found=true"); err != nil {
logger.Info("Error deleting resource", "name", res.name, "namespace", sc.namespace, "stderr", stderrOutput(err))
args := []string{"delete", res.kind, res.name, "--ignore-not-found=true"}
if res.namespace != "" {
args = append(args, "-n", res.namespace)
}
if _, err := k8sClient(args...); err != nil {
logger.Info("Error deleting resource", "name", res.name, "namespace", res.namespace, "stderr", stderrOutput(err))
}
}(r)
}
Expand Down
Loading