Skip to content

MULTIARCH-5550: add vault test for ppc64le#134

Open
raja-0940 wants to merge 1 commit into
openshift:mainfrom
raja-0940:eso-e2e-clean
Open

MULTIARCH-5550: add vault test for ppc64le#134
raja-0940 wants to merge 1 commit into
openshift:mainfrom
raja-0940:eso-e2e-clean

Conversation

@raja-0940

@raja-0940 raja-0940 commented Apr 7, 2026

Copy link
Copy Markdown

Summary

Adds e2e test suite for vault with IBM power.

Description

Platform:Vault - ESO CR-based flow:

  • Enabled Hashicorp Vault in ExternalSecretsConfig
  • Created a secret in P specific vault instance during BeforeAll
  • Verified the secret value through:
    • ClusterSecretStore
    • ExternalSecret
  • Cleaned up cretaed resources in AfterAll

Testing

  • Verified e2e flow locally
  • Confirmed secret creation and retrieval
  • Conformed cleanup after execution

Summary by CodeRabbit

  • Tests

    • Added comprehensive Vault Secret Manager end-to-end coverage with an isolated in-cluster Vault environment, automatic initialization/unsealing, KV v2 setup, and ExternalSecret validation.
    • Extended the test fixtures to provision Vault resources and verify network egress policy behavior.
    • Added support for architecture-aware Vault image substitution and improved pod exec-based assertions.
  • Chores

    • Updated test utilities to support template replacements when loading resource manifests and enhanced manifest/image substitution application.
    • Refreshed test module dependencies.

@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@raja-0940, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 15 minutes and 56 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4d8f274d-5188-4b1e-8bf4-86c3446095d7

📥 Commits

Reviewing files that changed from the base of the PR and between f57a0e5 and e7ace52.

⛔ Files ignored due to path filters (72)
  • go.work.sum is excluded by !**/*.sum
  • test/go.sum is excluded by !**/*.sum
  • vendor/github.com/gorilla/websocket/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/AUTHORS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/compression.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/conn.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/join.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/json.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/mask.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/mask_safe.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/prepared.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/proxy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/util.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/CONTRIBUTING.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/MAINTAINERS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/NOTICE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/connection.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/handlers.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/priority.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/PATENTS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/dictionary.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/options.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/read.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/write.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/stream.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/utils.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/mxk/go-flowrate/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/mxk/go-flowrate/flowrate/io.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/mxk/go-flowrate/flowrate/util.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/internal/socks/client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/internal/socks/socks.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/proxy/dial.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/proxy/direct.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/proxy/per_host.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/proxy/proxy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/proxy/socks5.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/proxy/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/OWNERS is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/errorstream.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/fallback.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/reader.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/resize.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/spdy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/v1.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/v2.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/v3.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/v4.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/v5.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/websocket.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/transport/spdy/spdy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/transport/websocket/roundtripper.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/util/exec/exec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (8)
  • test/e2e/e2e_test.go
  • test/e2e/testdata/vault/external_secret.yaml
  • test/e2e/testdata/vault/externalsecretsconfig.yaml
  • test/e2e/testdata/vault/secret_store.yaml
  • test/e2e/testdata/vault/vault.yaml
  • test/go.mod
  • test/utils/dynamic_resources.go
  • test/utils/kube_client.go

Walkthrough

A new end-to-end Vault Secret Manager Ginkgo test context is added that provisions a self-contained Vault instance in the vault-test namespace, initializes and unseals Vault via pod exec, enables KV v2, configures the External Secrets Operator with a Vault egress NetworkPolicy, then applies a SecretStore and ExternalSecret and asserts the resulting Kubernetes Secret contains the expected value. Supporting utilities for manifest apply with template/image substitution, pod command execution, and architecture detection are introduced.

Changes

Vault Secret Manager e2e test suite

Layer / File(s) Summary
Manifest apply and template substitution utilities
test/utils/dynamic_resources.go, test/utils/kube_client.go
CreateFromFileWithReplacements and doWithReplacements add string-substitution before YAML decoding. ApplyManifest, ApplyManifestFromReader*, and pluralizeResource add multi-document YAML/JSON create-or-update via the dynamic client.
Pod execution and architecture detection
test/utils/kube_client.go
PodExecOptions and ExecCommandInPod add SPDY-based pod command streaming. GetOperatorPodNodeArchitecture, GetClusterArchitecture, and GetVaultImageForArchitecture add arch detection with non-amd64 priority and map architectures to Vault image tags.
Manifest application with image substitution
test/utils/kube_client.go
ApplyManifestWithImageSubstitution replaces container images in Deployments/StatefulSets and sets pod template node selectors per detected target architecture.
Vault test fixture manifests
test/e2e/testdata/vault/vault.yaml, test/e2e/testdata/vault/secret_store.yaml, test/e2e/testdata/vault/external_secret.yaml, test/e2e/testdata/vault/externalsecretsconfig.yaml
Embedded YAML manifests define the vault-test Namespace/SA/ConfigMap/Deployment/Service with arch-templated node affinity, a Vault-backed SecretStore with templated address, an ExternalSecret mapping foo/my-value to password, and the allow-vault-egress egress NetworkPolicy for ExternalSecretsCoreController.
Vault e2e Ginkgo spec with initialization, config, and cleanup
test/e2e/e2e_test.go, test/go.mod
Adds the ordered Vault Ginkgo context that sequences manifest provisioning, Vault init/unseal via pod exec, token creation, KV v2 setup, config patching, SecretStore/ExternalSecret creation, readiness polling, and assertion of resulting Kubernetes Secret, with AfterAll namespace cleanup. Adds three indirect Go modules required by SPDY exec (gorilla/websocket, moby/spdystream, mxk/go-flowrate).

Sequence Diagram(s)

sequenceDiagram
  participant Spec as Vault Ginkgo Spec
  participant ApplyVault
  participant SetupVault
  participant ExecCmd as ExecCommandInPod
  participant K8sAPI as Kubernetes API
  participant VaultPod
  participant ESO as External Secrets Operator

  rect rgba(100, 149, 237, 0.5)
    note over Spec,K8sAPI: Vault provisioning and initialization
    Spec->>ApplyVault: apply vault manifests with image and arch substitution
    ApplyVault->>K8sAPI: create Namespace SA ConfigMap Deployment Service
    ApplyVault->>ApplyVault: wait for Vault pod ready
    Spec->>SetupVault: initialize and unseal
    SetupVault->>ExecCmd: vault operator init
    ExecCmd->>VaultPod: stream exec
    VaultPod-->>SetupVault: unseal key and root token in stdout
    SetupVault->>ExecCmd: vault operator unseal and vault login
  end

  rect rgba(144, 238, 144, 0.5)
    note over Spec,K8sAPI: Token and secret configuration
    Spec->>K8sAPI: create vault-token Secret
    Spec->>ExecCmd: enable KV engine
    ExecCmd->>VaultPod: enable KV v2 at secret path
    Spec->>ExecCmd: create test secret
    ExecCmd->>VaultPod: vault kv put foo my-value bar
    Spec->>K8sAPI: ensure allow-vault-egress policy
    K8sAPI-->>Spec: patch ExternalSecretsConfig if missing
  end

  rect rgba(255, 165, 100, 0.5)
    note over ESO,K8sAPI: Secret reconciliation and verification
    Spec->>K8sAPI: apply SecretStore and ExternalSecret
    ESO->>K8sAPI: watch ExternalSecret vault-example
    ESO->>VaultPod: read secret data from Vault
    VaultPod-->>ESO: return secret value
    ESO->>K8sAPI: create k8s-secret-to-create password bar
    Spec->>K8sAPI: assert k8s-secret-to-create password equals bar
    Spec->>K8sAPI: delete vault-test namespace
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 4 warnings)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error Error messages at lines 2232, 2264, and 2279 log stdout/stderr from vault initialization commands that contain sensitive credentials (unseal keys, root tokens, authentication responses). Remove stdout from error messages and avoid logging stderr from vault commands. Replace with generic error messages that don't expose sensitive credential data from vault operations.
Test Structure And Quality ⚠️ Warning Vault test missing assertion failure messages and cleanup for created resources. Violates codebase patterns: assertions lack messages (e.g., line 2020 Expect(exists).To(BeTrue()) has no message);... Add error messages to all assertions (e.g., g.Expect(exists).To(BeTrue(), "password key should exist in secret")); add defer loader.DeleteFromFile() for SecretStore and ExternalSecret resources to match established test cleanup pattern.
Microshift Test Compatibility ⚠️ Warning The new Vault e2e test uses ExternalSecretsConfig (operator.openshift.io/v1alpha1), which is not available on MicroShift. The test lacks MicroShift skip protection mechanisms. Add [apigroup:operator.openshift.io] label to the Vault Context, or add [Skipped:MicroShift] label, or guard with exutil.IsMicroShiftCluster() check with g.Skip().
Single Node Openshift (Sno) Test Compatibility ⚠️ Warning New Ginkgo e2e test "Vault Secret Manager" added without SNO compatibility protection. Test has no [Skipped:SingleReplicaTopology] label or exutil.IsSingleNode() check, violating OpenShift CI test... Add [Skipped:SingleReplicaTopology] label to test name OR add exutil.IsSingleNode() guard with g.Skip() call in test body to explicitly handle SNO topology.
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning The Vault e2e test contains IPv4-specific assumptions that will fail in IPv6-only disconnected environments. The vault.yaml manifest hardcodes VAULT_ADDR=http://127.0.0.1:8200, which is IPv4-only l... Fix IPv4 localhost issue by changing VAULT_ADDR from 127.0.0.1 to [::1] for IPv6 or use 0.0.0.0:8200. Ensure Vault image is available in disconnected environments via mirror registry or use environment-specific image substitution.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'MULTIARCH-5550: add vault test for ppc64le' directly corresponds to the main change: adding a Vault e2e test for the ppc64le architecture with multiarch support.
Docstring Coverage ✅ Passed Docstring coverage is 85.19% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The Vault Secret Manager test uses stable, deterministic test names. Context title "Vault Secret Manager" and It() title "should create secret mentioned in ExternalSecret using the referenced Secre...
Topology-Aware Scheduling Compatibility ✅ Passed All changes are in test/ directory only. Vault deployment uses topology-safe nodeAffinity based on dynamically detected architecture, avoiding problematic scheduling constraints across SNO, TNF, TN...
Ote Binary Stdout Contract ✅ Passed PR adds Vault e2e test in Ginkgo v2 format with no process-level stdout writes: no main(), init(), TestMain(), or BeforeSuite/AfterSuite; all logging uses By() or GinkgoWriter; only safe fmt.Sprint...
No-Weak-Crypto ✅ Passed No weak cryptography patterns detected. Code contains no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB usage, no custom crypto implementations, and no non-constant-time secret comparisons.
Container-Privileges ✅ Passed No privileged containers found. The Vault Deployment enforces strong security controls: runs as non-root, disables privilege escalation, drops all capabilities, and uses RuntimeDefault seccomp prof...
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot requested review from TrilokGeer and mytreya-rh April 7, 2026 06:22

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (3)
test/e2e/e2e_test.go (2)

726-727: Remove unused constants.

clusterSecretStoreFile and externalSecretFile are declared but never used. The actual file paths are defined locally in the test function (lines 790-792).

 	Context("Vault Secret Manager", Label("Platform:Vault"), func() {
 		const (
-			clusterSecretStoreFile = "testdata/vault/secret_store.yaml"
-			externalSecretFile     = "testdata/vault/external_secret.yaml"
 			vaultSecretName        = "foo"
 			vaultSecretKey         = "my-value"
 			vaultSecretValue       = "bar"
 		)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/e2e_test.go` around lines 726 - 727, Remove the unused constants
clusterSecretStoreFile and externalSecretFile from the top-level declarations in
the test file; they are never referenced and duplicate the local paths that are
used inside the test function (where the actual file paths are defined around
lines ~790-792). Locate and delete the constant definitions named
clusterSecretStoreFile and externalSecretFile so only the locally scoped
variables remain.

1031-1037: Shell command construction may break with special characters.

The fmt.Sprintf constructs a shell command with direct string interpolation. If secretname, key, or value contain shell metacharacters (quotes, backticks, $), the command could fail or behave unexpectedly.

For test code with controlled inputs this is low risk, but consider using separate arguments to vault kv put to avoid shell interpretation issues.

Alternative: pass key-value without shell quoting
 	cmd := exec.Command(
-		"oc", "exec", "-n", vaultNamespace, podName, "--", "sh", "-c",
-		fmt.Sprintf(
-			"vault kv put secret/%s %s=\"%s\"",
-			secretname, key, value,
-		),
+		"oc", "exec", "-n", vaultNamespace, podName, "--",
+		"vault", "kv", "put", fmt.Sprintf("secret/%s", secretname),
+		fmt.Sprintf("%s=%s", key, value),
 	)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/e2e_test.go` around lines 1031 - 1037, The test builds a shell
command via fmt.Sprintf and sh -c which allows shell metacharacters in
secretname/key/value to break behavior; update the exec.Command invocation (the
cmd := exec.Command(...) that currently uses "sh", "-c" and fmt.Sprintf("vault
kv put secret/%s %s=\"%s\"")) to call vault kv put with separate arguments
instead of a shell string—e.g., remove "sh", "-c" and pass "vault","kv","put",
fmt.Sprintf("secret/%s", secretname), fmt.Sprintf("%s=%s", key, value) (or
construct the key=value arg safely) so that exec.Command handles argument
quoting and no shell interpolation occurs.
Makefile (1)

219-230: Inconsistencies with existing test-e2e target may cause issues.

The new e2e-test-vault target differs from test-e2e in several ways that could cause problems:

  1. Missing GOFLAGS= override — line 182 sets this for test-e2e to avoid conflicts with go.work, but e2e-test-vault is not included
  2. Missing @ prefix to suppress command echo
  3. Missing -ginkgo.trace flag
  4. Different working directory approach (./test/e2e vs -C $(PROJECT_ROOT)/test ./e2e)
Suggested fix for consistency
-	
-.PHONY: e2e-test-vault  # Run the e2e tests against a Kind k8s instance that is spun up.
+
+# Targets that need Go workspace mode (CI sets GOFLAGS=-mod=vendor which conflicts with go.work)
+fmt vet test test-unit test-e2e e2e-test-vault run update-vendor update-dep: GOFLAGS=
+
+.PHONY: e2e-test-vault
 e2e-test-vault:
-	go test \
+	`@go` test -C $(PROJECT_ROOT)/test \
 	-timeout $(E2E_TIMEOUT) \
 	-count 1 \
 	-v \
 	-p 1 \
 	-tags e2e \
-	./test/e2e \
+	./e2e \
 	-ginkgo.v \
+	-ginkgo.trace \
 	-ginkgo.show-node-events \
 	-ginkgo.label-filter="$(E2E_GINKGO_LABEL_FILTER)"

Note: Update line 182 to include e2e-test-vault in the GOFLAGS override list.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 219 - 230, The new e2e-test-vault Make target is
inconsistent with test-e2e; update e2e-test-vault to match: ensure it's covered
by the GOFLAGS override (add e2e-test-vault to the existing GOFLAGS= override
that prevents go.work conflicts), prefix the go test invocation with @ to
suppress echo, add the -ginkgo.trace flag to the ginkgo flags, and run the tests
from the same directory style as test-e2e (use -C $(PROJECT_ROOT)/test ./e2e
rather than ./test/e2e) while keeping the same flags (-timeout $(E2E_TIMEOUT)
-count 1 -v -p 1 -tags e2e -ginkgo.v -ginkgo.show-node-events
-ginkgo.label-filter="$(E2E_GINKGO_LABEL_FILTER)").
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/e2e/e2e_test.go`:
- Around line 762-785: The AfterEach cleanup currently removes Vault
namespace/networkpolicy and also deletes the global ExternalSecretsConfig
"cluster"; change this block to run in AfterAll (replace AfterEach with
AfterAll) so cleanup runs once, and remove the deletion of the shared
ExternalSecretsConfig "cluster" (do not call safeDelete for
ExternalSecretsConfig "cluster"); if you need to revert Vault-specific config
changes, instead restore the ExternalSecretsConfig to its prior state (or delete
only Vault-scoped resources) using the same safeDelete helper and referencing
vaultNamespace, networkpolicy name "allow-to-vault-test", and the
ExternalSecretsConfig resource only when scoped to Vault-specific changes.
- Around line 1044-1069: In createVaultTokenSecret, don’t assume any Get() error
means “not found”: use the Kubernetes API error helper
(apierrors.IsNotFound(err)) to distinguish a missing secret from other errors;
keep the existing update path when err == nil, call Create only when
apierrors.IsNotFound(err), and for any other non-nil error return it immediately
(adjust imports to include k8s.io/apimachinery/pkg/api/errors as apierrors).

In `@test/e2e/testdata/vault/externalsecretsconfig.yaml`:
- Around line 10-14: The network policy for ExternalSecretsCoreController is
overly permissive because the egress entry `- {}` (in the policy named
`allow-external-secrets-egress`) allows all outbound traffic; update the
`networkPolicies` for componentName `ExternalSecretsCoreController` to either
remove this empty egress rule if redundant with `vault-networkpolicy.yaml` or
replace it with explicit egress rules (e.g., allow TCP/UDP port 53 for DNS and
TCP port 8200 to the Vault namespace) so only required destinations/ports are
permitted.

---

Nitpick comments:
In `@Makefile`:
- Around line 219-230: The new e2e-test-vault Make target is inconsistent with
test-e2e; update e2e-test-vault to match: ensure it's covered by the GOFLAGS
override (add e2e-test-vault to the existing GOFLAGS= override that prevents
go.work conflicts), prefix the go test invocation with @ to suppress echo, add
the -ginkgo.trace flag to the ginkgo flags, and run the tests from the same
directory style as test-e2e (use -C $(PROJECT_ROOT)/test ./e2e rather than
./test/e2e) while keeping the same flags (-timeout $(E2E_TIMEOUT) -count 1 -v -p
1 -tags e2e -ginkgo.v -ginkgo.show-node-events
-ginkgo.label-filter="$(E2E_GINKGO_LABEL_FILTER)").

In `@test/e2e/e2e_test.go`:
- Around line 726-727: Remove the unused constants clusterSecretStoreFile and
externalSecretFile from the top-level declarations in the test file; they are
never referenced and duplicate the local paths that are used inside the test
function (where the actual file paths are defined around lines ~790-792). Locate
and delete the constant definitions named clusterSecretStoreFile and
externalSecretFile so only the locally scoped variables remain.
- Around line 1031-1037: The test builds a shell command via fmt.Sprintf and sh
-c which allows shell metacharacters in secretname/key/value to break behavior;
update the exec.Command invocation (the cmd := exec.Command(...) that currently
uses "sh", "-c" and fmt.Sprintf("vault kv put secret/%s %s=\"%s\"")) to call
vault kv put with separate arguments instead of a shell string—e.g., remove
"sh", "-c" and pass "vault","kv","put", fmt.Sprintf("secret/%s", secretname),
fmt.Sprintf("%s=%s", key, value) (or construct the key=value arg safely) so that
exec.Command handles argument quoting and no shell interpolation occurs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cf609882-7f2b-4bc5-a693-4dddaa3125dc

📥 Commits

Reviewing files that changed from the base of the PR and between 2a65cb8 and 57fdb31.

📒 Files selected for processing (7)
  • Makefile
  • test/e2e/e2e_test.go
  • test/e2e/testdata/vault/cluster_secret_store.yaml
  • test/e2e/testdata/vault/external_secret.yaml
  • test/e2e/testdata/vault/externalsecretsconfig.yaml
  • test/e2e/testdata/vault/vault-networkpolicy.yaml
  • test/e2e/testdata/vault/vault.yaml

Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/e2e/e2e_test.go
Comment thread test/e2e/testdata/vault/externalsecretsconfig.yaml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
test/e2e/e2e_test.go (3)

725-731: Remove unused constants.

clusterSecretStoreFile and externalSecretFile are declared but never used. The test instead defines local variables vaultSecretStoreFile and vaultExternalSecretFile at lines 784-785.

Suggested fix
 	Context("Vault Secret Manager", Label("Platform:Vault"), func() {
 		const (
-			clusterSecretStoreFile = "testdata/vault/secret_store.yaml"
-			externalSecretFile     = "testdata/vault/external_secret.yaml"
-			vaultSecretName        = "foo"
-			vaultSecretKey         = "my-value"
-			vaultSecretValue       = "bar"
+			vaultSecretName  = "foo"
+			vaultSecretKey   = "my-value"
+			vaultSecretValue = "bar"
 		)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/e2e_test.go` around lines 725 - 731, Remove the unused constants
clusterSecretStoreFile and externalSecretFile from the constants block (they are
shadowed by local variables vaultSecretStoreFile and vaultExternalSecretFile
later in the test), leaving only the actually used constants vaultSecretName,
vaultSecretKey, and vaultSecretValue; update the constants declaration near the
top of the test in e2e_test.go so there are no unused variables left.

874-874: Remove unused loader parameter.

The loader parameter is passed to applyVault but never used within the function.

Suggested fix
-func applyVault(ctx context.Context, loader utils.DynamicResourceLoader) error {
+func applyVault(ctx context.Context) error {

And update the call site at line 735:

-		Expect(applyVault(ctx, loader)).To(Succeed())
+		Expect(applyVault(ctx)).To(Succeed())
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/e2e_test.go` at line 874, The applyVault function signature includes
an unused parameter loader; remove the unused parameter from the applyVault
declaration (change func applyVault(ctx context.Context, loader
utils.DynamicResourceLoader) to func applyVault(ctx context.Context)) and update
all call sites that pass a loader to call applyVault with only the ctx argument
(i.e., remove the extra argument where applyVault is invoked) so the function
and its callers remain consistent.

1004-1014: Consider more granular error handling in enableKVEngine.

The || true at line 1007 masks all errors, including authentication failures or Vault unavailability. While this is intentional for idempotent KV engine enabling, consider checking only for the "already enabled" error.

Alternative approach
 	cmd := exec.Command(
 		"oc", "exec", "-n", vaultNamespace, podName, "--", "sh", "-c",
 		fmt.Sprintf(
-			"vault status && vault login %s && vault secrets enable -path=secret kv-v2 || true",
+			"vault status && vault login %s && (vault secrets enable -path=secret kv-v2 2>&1 || echo 'KV engine may already be enabled')",
 			token,
 		),
 	)

Alternatively, check the exit code explicitly and only ignore the "path is already in use" error.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/e2e_test.go` around lines 1004 - 1014, The current command uses "||
true" which masks all errors; in the enableKVEngine logic replace the blanket
ignore with targeted handling: run the same exec.Command via utils.Run (the
existing cmd, podName, vaultNamespace, token) but if it returns an error inspect
the output/error string or exit code and only suppress the error when it
indicates the KV engine is already enabled (e.g., message like "path is already
in use" or equivalent); for any other error (authentication failure, vault
unavailable, etc.) propagate/return the error so failures are not silently
ignored.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@test/e2e/e2e_test.go`:
- Around line 725-731: Remove the unused constants clusterSecretStoreFile and
externalSecretFile from the constants block (they are shadowed by local
variables vaultSecretStoreFile and vaultExternalSecretFile later in the test),
leaving only the actually used constants vaultSecretName, vaultSecretKey, and
vaultSecretValue; update the constants declaration near the top of the test in
e2e_test.go so there are no unused variables left.
- Line 874: The applyVault function signature includes an unused parameter
loader; remove the unused parameter from the applyVault declaration (change func
applyVault(ctx context.Context, loader utils.DynamicResourceLoader) to func
applyVault(ctx context.Context)) and update all call sites that pass a loader to
call applyVault with only the ctx argument (i.e., remove the extra argument
where applyVault is invoked) so the function and its callers remain consistent.
- Around line 1004-1014: The current command uses "|| true" which masks all
errors; in the enableKVEngine logic replace the blanket ignore with targeted
handling: run the same exec.Command via utils.Run (the existing cmd, podName,
vaultNamespace, token) but if it returns an error inspect the output/error
string or exit code and only suppress the error when it indicates the KV engine
is already enabled (e.g., message like "path is already in use" or equivalent);
for any other error (authentication failure, vault unavailable, etc.)
propagate/return the error so failures are not silently ignored.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 92efc958-9b30-428c-b949-6e886bc8d253

📥 Commits

Reviewing files that changed from the base of the PR and between 57fdb31 and 78f70d7.

📒 Files selected for processing (1)
  • test/e2e/e2e_test.go

@raja-0940

raja-0940 commented Apr 8, 2026

Copy link
Copy Markdown
Author

/retitle MULTIARCH-5550: add vault test for ppc64le

@openshift-ci openshift-ci Bot changed the title feat: e2e for vault with ibm power MULTIARCH-5550: add vault test for ppc64le Apr 8, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 8, 2026
@openshift-ci-robot

openshift-ci-robot commented Apr 8, 2026

Copy link
Copy Markdown

@raja-0940: This pull request references MULTIARCH-5550 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target either version "4.22." or "openshift-4.22.", but it targets "openshift-4.21" instead.

Details

In response to this:

e2e test suite for vault with IBM power.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
test/e2e/testdata/vault/vault.yaml (1)

53-84: Consider adding resource requests/limits.

The container lacks resource requests and limits. While acceptable for e2e tests, defining them can prevent resource contention and improve scheduling predictability in shared test clusters.

💡 Optional: Add resource constraints
           ports:
             - containerPort: 8200          
           securityContext:            
             allowPrivilegeEscalation: false            
             capabilities:
               drop:
                 - ALL              
+          resources:
+            requests:
+              cpu: 100m
+              memory: 256Mi
+            limits:
+              cpu: 500m
+              memory: 512Mi
           volumeMounts:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/testdata/vault/vault.yaml` around lines 53 - 84, The vault container
spec (container name "vault") is missing resources; add a resources block under
the container to set requests and limits (e.g., resources.requests.cpu,
resources.requests.memory and resources.limits.cpu, resources.limits.memory) so
the "vault" container has both minimal guaranteed resources and caps; update the
same container entry that contains command/args/readinessProbe/volumeMounts to
include these fields with appropriate values for the e2e environment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Makefile`:
- Around line 219-230: The Makefile target e2e-test-vault is missing from the
target-specific GOFLAGS reset list, causing exported GOFLAGS (e.g. -mod=vendor)
to be applied and break workspace mode; update the GOFLAGS override list (the
target-specific GOFLAGS= reset block) to include e2e-test-vault so that the
e2e-test-vault target uses a clean GOFLAGS environment when invoking go test.
- Line 230: Remove the extraneous double quotes around E2E_GINKGO_LABEL_FILTER
so the ginkgo.label-filter uses the already-quoted variable (match the pattern
used by test-e2e for E2E_GINKGO_LABEL_FILTER), and update the GOFLAGS reset list
to include the e2e-test-vault target so it does not inherit CI's -mod=vendor
(add e2e-test-vault to the list where GOFLAGS is cleared/reset).

In `@test/e2e/testdata/vault/vault.yaml`:
- Around line 1-5: The YAML file defining a Namespace (kind: Namespace,
metadata.name: vault-test) uses incorrect line endings; convert the file
test/e2e/testdata/vault/vault.yaml to use Unix-style LF line endings (\n)
throughout (ensure no CRLF sequences), then re-save/commit the file so CI and
parsers read the manifest correctly.

---

Nitpick comments:
In `@test/e2e/testdata/vault/vault.yaml`:
- Around line 53-84: The vault container spec (container name "vault") is
missing resources; add a resources block under the container to set requests and
limits (e.g., resources.requests.cpu, resources.requests.memory and
resources.limits.cpu, resources.limits.memory) so the "vault" container has both
minimal guaranteed resources and caps; update the same container entry that
contains command/args/readinessProbe/volumeMounts to include these fields with
appropriate values for the e2e environment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 12c742d1-a59f-434a-b8d0-27caf760dca9

📥 Commits

Reviewing files that changed from the base of the PR and between 78f70d7 and 3343ffa.

📒 Files selected for processing (7)
  • Makefile
  • test/e2e/e2e_test.go
  • test/e2e/testdata/vault/cluster_secret_store.yaml
  • test/e2e/testdata/vault/external_secret.yaml
  • test/e2e/testdata/vault/externalsecretsconfig.yaml
  • test/e2e/testdata/vault/vault-networkpolicy.yaml
  • test/e2e/testdata/vault/vault.yaml
✅ Files skipped from review due to trivial changes (3)
  • test/e2e/testdata/vault/external_secret.yaml
  • test/e2e/testdata/vault/externalsecretsconfig.yaml
  • test/e2e/testdata/vault/vault-networkpolicy.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • test/e2e/testdata/vault/cluster_secret_store.yaml
  • test/e2e/e2e_test.go

Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread test/e2e/testdata/vault/vault.yaml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
test/e2e/testdata/vault/vault.yaml (1)

1-5: ⚠️ Potential issue | 🟡 Minor

Fix newline character format.

Static analysis indicates the file uses incorrect line endings (CRLF). Convert to Unix-style line endings (\n) for CI compatibility.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/testdata/vault/vault.yaml` around lines 1 - 5, The YAML file
defining the Namespace (look for the block with "apiVersion: v1", "kind:
Namespace", and "name: vault-test") uses CRLF line endings and must be converted
to Unix-style LF; open that vault.yaml, normalize line endings to "\n" (e.g.,
use your editor's EOL conversion, run dos2unix, or git's core.autocrlf
settings), verify there are no trailing CR (\r) characters, and recommit the
file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@test/e2e/testdata/vault/vault.yaml`:
- Around line 1-5: The YAML file defining the Namespace (look for the block with
"apiVersion: v1", "kind: Namespace", and "name: vault-test") uses CRLF line
endings and must be converted to Unix-style LF; open that vault.yaml, normalize
line endings to "\n" (e.g., use your editor's EOL conversion, run dos2unix, or
git's core.autocrlf settings), verify there are no trailing CR (\r) characters,
and recommit the file.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 58ce074d-3ad7-4f54-bfdf-f62ae51dcb00

📥 Commits

Reviewing files that changed from the base of the PR and between 3343ffa and 84f811c.

📒 Files selected for processing (4)
  • Makefile
  • test/e2e/e2e_test.go
  • test/e2e/testdata/vault/externalsecretsconfig.yaml
  • test/e2e/testdata/vault/vault.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/e2e/testdata/vault/externalsecretsconfig.yaml

@raja-0940

raja-0940 commented Apr 8, 2026

Copy link
Copy Markdown
Author

/retitle MULTIARCH-5550: add vault test for ppc64le

@raja-0940

Copy link
Copy Markdown
Author

/test verify

Comment thread Makefile Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
test/e2e/testdata/vault/vault.yaml (1)

1-115: ⚠️ Potential issue | 🟡 Minor

Re-save this manifest with LF line endings.

YAMLlint is still reporting CRLF here, so CI will keep failing until the file is saved with Unix newlines.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/testdata/vault/vault.yaml` around lines 1 - 115, The manifest uses
CRLF endings; re-save vault.yaml with Unix LF line endings so YAML lint passes
(affects resources like the Namespace named "vault-test",
Deployment/ServiceAccount/Deployment named "vault", and ConfigMap
"vault-config"); open the file in your editor or run a tool (e.g., convert line
endings or dos2unix) to normalize to LF, commit the updated file, and ensure
your local git autocrlf setting won't reintroduce CRLF.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/e2e/e2e_test.go`:
- Around line 918-924: The test currently prints the raw Vault command outputs
(initOut from utils.Run(initCmd) and similarly login output) via
By(fmt.Sprintf(...)), leaking unseal keys and tokens; change the test to NOT
print raw command output to logs/artifacts—keep capturing initOut/loginOut for
error handling but replace the By(fmt.Sprintf(...)) calls with sanitized status
messages like "Vault operator init completed" and "Vault login completed", and
if you must log details, redact sensitive fields from initOut/loginOut before
logging or only log non-sensitive status lines; ensure functions/variables
initOut, initCmd, and the By(...) calls are updated accordingly.
- Around line 762-767: The test suite currently spawns oc subprocesses with
exec.Command which can hang; change calls in functions that accept a context
(setupVault, enableKVEngine, createVaultTestSecret) to use
exec.CommandContext(ctx, ...) so they respect the caller's timeout, and update
all cleanup invocations to create a short deadline context (context.WithTimeout)
and call a modified safeDelete(ctx, cmd) that uses exec.CommandContext
internally; specifically update safeDelete to accept a context.Context and run
the oc delete/apply/exec commands via exec.CommandContext, and replace the
listed direct exec.Command usages (around the safeDelete calls and the lines for
setupVault/enableKVEngine/createVaultTestSecret) to use the context-aware
variants so subprocesses are bounded by deadlines.

---

Duplicate comments:
In `@test/e2e/testdata/vault/vault.yaml`:
- Around line 1-115: The manifest uses CRLF endings; re-save vault.yaml with
Unix LF line endings so YAML lint passes (affects resources like the Namespace
named "vault-test", Deployment/ServiceAccount/Deployment named "vault", and
ConfigMap "vault-config"); open the file in your editor or run a tool (e.g.,
convert line endings or dos2unix) to normalize to LF, commit the updated file,
and ensure your local git autocrlf setting won't reintroduce CRLF.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 16992a33-62aa-4ee9-93a4-e0710accdc67

📥 Commits

Reviewing files that changed from the base of the PR and between 84f811c and e6f51b2.

📒 Files selected for processing (3)
  • Makefile
  • test/e2e/e2e_test.go
  • test/e2e/testdata/vault/vault.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • Makefile

Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/e2e/e2e_test.go Outdated

@prb112 prb112 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 10, 2026
@openshift-ci

openshift-ci Bot commented Apr 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: prb112, raja-0940
Once this PR has been reviewed and has the lgtm label, please assign swghosh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@raja-0940

Copy link
Copy Markdown
Author

@swghosh Could you please review this PR?

@prb112

prb112 commented May 3, 2026

Copy link
Copy Markdown

/retest-required

@prb112

prb112 commented May 13, 2026

Copy link
Copy Markdown

Hi @swghosh - our tests are passing on IBM Power. We'd appreciate a merge so we can start testing it. Thank you, Paul

@mytreya-rh

Copy link
Copy Markdown
Contributor

Hi @swghosh - our tests are passing on IBM Power. We'd appreciate a merge so we can start testing it. Thank you, Paul

hey @prb112 cc: @bharath-b-rh as he is leading the ESO efforts now.

@prb112

prb112 commented May 14, 2026

Copy link
Copy Markdown

Thank you @mytreya-rh

Hi @bharath-b-rh happy to take feedback, many thanks in advance, Paul

@bharath-b-rh

Copy link
Copy Markdown
Contributor

Thank you @prb112 ! I will take a look tomorrow or early next week.

@bharath-b-rh bharath-b-rh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the PR description with more details to help with the reviews.

Comment thread test/e2e/testdata/vault/vault-networkpolicy.yaml Outdated
Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/e2e/e2e_test.go Outdated
Comment thread Makefile Outdated
@openshift-ci-robot

openshift-ci-robot commented May 18, 2026

Copy link
Copy Markdown

@raja-0940: This pull request references MULTIARCH-5550 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target either version "5.0." or "openshift-5.0.", but it targets "openshift-4.21" instead.

Details

In response to this:

Summary

Adds e2e test suite for vault with IBM power.

Description

Platform:Vault - ESO CR-based flow:

  • Enabled Hashicorp Vault in ExternalSecretsConfig
  • Created a secret in P specific vault instance during BeforeAll
  • Verified the secret value through:
  • ClusterSecretStore
  • ExternalSecret
  • Cleaned up cretaed resources in AfterAll

Testing

  • Verified e2e flow locally
  • Confirmed secret creation and retrieval
  • Conformed cleanup after execution

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label May 18, 2026
Comment thread test/utils/kube_client.go
@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@raja-0940 raja-0940 force-pushed the eso-e2e-clean branch 3 times, most recently from bdf52eb to c904975 Compare May 25, 2026 13:57
@raja-0940

Copy link
Copy Markdown
Author

Hi @bharath-b-rh, I have resolved all the PR review comments. Could you please review them again? Thanks

@bharath-b-rh

Copy link
Copy Markdown
Contributor

Hi @raja-0940 , Thank you for addressing the comments! I will take a look at the changes on Thursday.

@prb112

prb112 commented Jun 8, 2026

Copy link
Copy Markdown

/retest-required

@prb112

prb112 commented Jun 8, 2026

Copy link
Copy Markdown

Hey @bharath-b-rh looking at the retest, I think this is saying the go.mod is missing a dependency? I think we've got it all covered already, any advice. Thank you, Paul

p.s. Also happy to make changes based on review comments.

cc: @raja-0940

@bharath-b-rh bharath-b-rh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the verify CI failure, please use make update-vendor and include the changes in repo root and test dir go mods too.

Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/utils/kube_client.go Outdated
Comment thread test/utils/kube_client.go Outdated
Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/utils/kube_client.go
var arch string

// Try multiple sources for architecture information
if a, ok := node.Labels["kubernetes.io/arch"]; ok && a != "" {

@bharath-b-rh bharath-b-rh Jun 13, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I am not well versed with OpenShift CI infra. But are there any chances of multi-arch data plane clusters, in which case this could fail I think.

If we want to enhance the handling, what we could do is, check the node arch where the operator is scheduled and deploy the vault pod too on the same node by using podAffinity. WDYT?

Comment thread test/e2e/testdata/vault/secret_store.yaml
Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/e2e/e2e_test.go Outdated
Comment thread test/e2e/e2e_test.go Outdated
metadata:
labels:
app: vault
spec:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for discussion

@raja-0940 raja-0940 force-pushed the eso-e2e-clean branch 3 times, most recently from 07af3ac to be8537f Compare June 19, 2026 14:06
- key: kubernetes.io/arch
operator: In
values:
- {{VAULT_ARCH}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK.

@raja-0940

Copy link
Copy Markdown
Author

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews resumed.

@raja-0940 raja-0940 force-pushed the eso-e2e-clean branch 2 times, most recently from b14581a to fadf332 Compare June 22, 2026 09:51
@raja-0940

Copy link
Copy Markdown
Author

/retest-required

@raja-0940

Copy link
Copy Markdown
Author

/test verify

@raja-0940 raja-0940 force-pushed the eso-e2e-clean branch 3 times, most recently from edc8d9a to f57a0e5 Compare June 23, 2026 06:39

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
test/e2e/testdata/vault/externalsecretsconfig.yaml (1)

10-19: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low value

Consider scoping egress destinations for defense-in-depth.

The first egress rule permits ports 6443 (K8s API), 443 (HTTPS), and 5353 (DNS) to ANY destination without a to selector. While the ESO controller legitimately requires K8s API and DNS access, scoping these destinations would follow defense-in-depth principles.

For a test fixture, the current pragmatic approach is acceptable. If tightening is desired, consider restricting:

  • Ports 6443/443 to the kubernetes.default service or API server endpoints
  • Port 5353 to DNS service pods (e.g., kube-dns or openshift-dns namespaces)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/e2e/testdata/vault/externalsecretsconfig.yaml` around lines 10 - 19, The
egress rules in the network policy (ports 6443, 443, and 5353) currently lack
destination scoping with a `to` selector, allowing traffic to any destination.
To apply defense-in-depth principles, add a `to` selector for each egress rule
that specifies the legitimate destination endpoints: restrict TCP ports 6443 and
443 to the kubernetes.default service or API server endpoints, and restrict
UDP/TCP port 5353 to DNS service pods in the kube-dns or openshift-dns
namespaces. Note that this is optional for a test fixture, but implementing it
would improve the security posture of the configuration.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e/testdata/vault/externalsecretsconfig.yaml`:
- Around line 10-22: The externalsecretsconfig.yaml NetworkPolicy has a
conflicting port 8200 TCP rule in the first unrestricted egress section that
permits traffic to any destination, which overrides the subsequent
namespace-scoped egress rule (lines 23-29) that attempts to restrict port 8200
traffic to the vault-test namespace. Remove the port 8200 entry (the TCP rule on
port 8200 at lines 20-21) from the first egress block to eliminate the conflict
and allow the namespace-scoped rule to take effect, since NetworkPolicy rules
are evaluated with OR semantics where the broader permission takes precedence.

---

Nitpick comments:
In `@test/e2e/testdata/vault/externalsecretsconfig.yaml`:
- Around line 10-19: The egress rules in the network policy (ports 6443, 443,
and 5353) currently lack destination scoping with a `to` selector, allowing
traffic to any destination. To apply defense-in-depth principles, add a `to`
selector for each egress rule that specifies the legitimate destination
endpoints: restrict TCP ports 6443 and 443 to the kubernetes.default service or
API server endpoints, and restrict UDP/TCP port 5353 to DNS service pods in the
kube-dns or openshift-dns namespaces. Note that this is optional for a test
fixture, but implementing it would improve the security posture of the
configuration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0fd11aec-d5e7-440a-aed9-a8f37de77f94

📥 Commits

Reviewing files that changed from the base of the PR and between 9ddc9a2 and f57a0e5.

⛔ Files ignored due to path filters (72)
  • go.work.sum is excluded by !**/*.sum
  • test/go.sum is excluded by !**/*.sum
  • vendor/github.com/gorilla/websocket/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/AUTHORS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/compression.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/conn.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/join.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/json.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/mask.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/mask_safe.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/prepared.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/proxy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/gorilla/websocket/util.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/CONTRIBUTING.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/MAINTAINERS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/NOTICE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/connection.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/handlers.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/priority.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/PATENTS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/dictionary.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/options.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/read.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/spdy/write.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/stream.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/moby/spdystream/utils.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/mxk/go-flowrate/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/mxk/go-flowrate/flowrate/io.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/mxk/go-flowrate/flowrate/util.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/internal/socks/client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/internal/socks/socks.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/proxy/dial.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/proxy/direct.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/proxy/per_host.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/proxy/proxy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/proxy/socks5.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/proxy/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/OWNERS is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/errorstream.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/fallback.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/reader.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/resize.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/spdy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/v1.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/v2.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/v3.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/v4.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/v5.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/tools/remotecommand/websocket.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/transport/spdy/spdy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/transport/websocket/roundtripper.go is excluded by !**/vendor/**, !vendor/**
  • vendor/k8s.io/client-go/util/exec/exec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (8)
  • test/e2e/e2e_test.go
  • test/e2e/testdata/vault/external_secret.yaml
  • test/e2e/testdata/vault/externalsecretsconfig.yaml
  • test/e2e/testdata/vault/secret_store.yaml
  • test/e2e/testdata/vault/vault.yaml
  • test/go.mod
  • test/utils/dynamic_resources.go
  • test/utils/kube_client.go
🚧 Files skipped from review as they are similar to previous changes (7)
  • test/e2e/testdata/vault/secret_store.yaml
  • test/e2e/testdata/vault/external_secret.yaml
  • test/e2e/testdata/vault/vault.yaml
  • test/utils/dynamic_resources.go
  • test/go.mod
  • test/e2e/e2e_test.go
  • test/utils/kube_client.go

Comment thread test/e2e/testdata/vault/externalsecretsconfig.yaml
Signed-off-by: Rajakumar Battula <rbattula@redhat.com>
@openshift-ci

openshift-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown

@raja-0940: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants