Skip to content

ESO-447: Expand Vault e2e for TLS trustedCABundle and ExternalSecret templating#169

Open
bharath-b-rh wants to merge 1 commit into
openshift:mainfrom
bharath-b-rh:eso-447
Open

ESO-447: Expand Vault e2e for TLS trustedCABundle and ExternalSecret templating#169
bharath-b-rh wants to merge 1 commit into
openshift:mainfrom
bharath-b-rh:eso-447

Conversation

@bharath-b-rh

@bharath-b-rh bharath-b-rh commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Convert Vault e2e to HTTPS via Red Hat cert-manager Operator (OLM install in root BeforeAll) with a real CA→server cert chain for trustedCABundle validation.
  • Cover trustedCABundle switch (sample CA → Vault CA), SecretStore InvalidProviderConfig→Ready, PushSecret/ExternalSecret sync, and ExternalSecret templating merge (Kubernetes + Vault dockerconfig).
  • Add trustedCABundle watch-label restore coverage; document labels/prereqs and exclude Provider:Vault from the default e2e filter.

Test plan

  • make test-e2e E2E_GINKGO_LABEL_FILTER="!(Feature: containsAny {Proxy, Upgrade})"
Ran 53 of 58 Specs in 496.973 seconds
SUCCESS! -- 53 Passed | 0 Failed | 0 Pending | 5 Skipped
--- PASS: TestE2E (497.00s)
PASS
ok  	github.com/openshift/external-secrets-operator/test/e2e	497.027s

Summary by CodeRabbit

  • New Features

    • Added end-to-end coverage for Vault over TLS, trusted CA bundles, certificate management, secret templating, and merged registry credentials.
    • Added validation that trusted CA configuration is restored after accidental label removal.
  • Documentation

    • Expanded E2E guidance with new Vault providers, feature filters, prerequisites, and test scenarios.
  • Tests

    • Improved readiness checks and resource cleanup for more reliable integration testing.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 25, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 25, 2026

Copy link
Copy Markdown

@bharath-b-rh: This pull request references ESO-447 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 story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Convert Vault e2e to HTTPS via Red Hat cert-manager Operator (OLM install in root BeforeAll) with a real CA→server cert chain for trustedCABundle validation.
  • Cover trustedCABundle switch (sample CA → Vault CA), SecretStore InvalidProviderConfig→Ready, PushSecret/ExternalSecret sync, and ExternalSecret templating merge (Kubernetes + Vault dockerconfig).
  • Add trustedCABundle watch-label restore coverage; document labels/prereqs and exclude Provider:Vault from the default e2e filter.

Test plan

  • make test-e2e E2E_GINKGO_LABEL_FILTER="!(Feature: containsAny {Proxy, Upgrade})"
Ran 53 of 58 Specs in 496.973 seconds
SUCCESS! -- 53 Passed | 0 Failed | 0 Pending | 5 Skipped
--- PASS: TestE2E (497.00s)
PASS
ok  	github.com/openshift/external-secrets-operator/test/e2e	497.027s

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 commented Jul 25, 2026

Copy link
Copy Markdown

Walkthrough

The E2E suite now installs cert-manager through OLM, provisions TLS-enabled Vault resources, tests trusted CA bundle recovery and reconciliation, validates merged Kubernetes/Vault registry credentials, and adds supporting polling, deletion, documentation, and fixtures.

Changes

Vault E2E coverage

Layer / File(s) Summary
Cert-manager installation and readiness
test/e2e/cert_manager_helpers_test.go, test/e2e/e2e_test.go, test/e2e/testdata/cert-manager/*
Installs cert-manager when unavailable and waits for operand pods and the Certificate API.
Vault TLS provisioning and operation
test/e2e/e2e_test.go, test/e2e/testdata/vault/{issuer,ca_*,certificate,vault}.yaml
Creates cert-manager-issued Vault certificates and changes Vault initialization and probes to HTTPS/TLS.
Trusted CA bundle validation
test/e2e/e2e_test.go, test/e2e/trusted_ca_bundle_test.go, test/e2e/testdata/vault/{external_secret,push_*}.yaml
Tests invalid-to-valid trustedCABundle recovery, SecretStore readiness, PushSecret flow, and watch-label restoration.
Merged registry authentication templating
test/e2e/e2e_test.go, test/e2e/testdata/vault/templating_*.yaml
Combines Kubernetes and Vault dockerconfigjson data and verifies both registry entries.
E2E utilities and documentation
test/e2e/README.md, Makefile, test/utils/{conditions,dynamic_resources}.go
Documents new labels and prerequisites, generalizes condition polling, and adds replacement-aware deletion.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant E2ETests
  participant CertManager
  participant Vault
  participant ExternalSecretsOperator
  participant Kubernetes
  E2ETests->>CertManager: provision Vault CA and TLS certificates
  E2ETests->>Vault: deploy and initialize TLS-enabled Vault
  E2ETests->>ExternalSecretsOperator: set trustedCABundle and apply SecretStores
  ExternalSecretsOperator->>Vault: connect using the trusted CA
  ExternalSecretsOperator->>Kubernetes: reconcile ExternalSecrets and PushSecrets
  E2ETests->>Kubernetes: verify readiness and merged secret data
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 11

❌ Failed checks (1 warning, 10 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Stable And Deterministic Test Names ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Test Structure And Quality ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Microshift Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Single Node Openshift (Sno) Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Topology-Aware Scheduling Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ote Binary Stdout Contract ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ipv6 And Disconnected Network Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Weak-Crypto ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Container-Privileges ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Sensitive-Data-In-Logs ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: expanded Vault e2e coverage for TLS trustedCABundle handling and ExternalSecret templating.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

Error: build linters: unable to load custom analyzer "kubeapilinter": bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": bin/kube-api-linter.so, plugin: not implemented


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

…templating

Signed-off-by: Bharath B <bhb@redhat.com>
@openshift-ci

openshift-ci Bot commented Jul 25, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bharath-b-rh

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

The pull request process is described 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 25, 2026

@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: 4

🧹 Nitpick comments (3)
test/e2e/cert_manager_helpers_test.go (1)

109-141: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Prefer k8serrors.IsNotFound over string matching.

strings.Contains(err.Error(), "not found") is fragile compared to the structured k8serrors.IsNotFound(err) check used elsewhere in this PR (e.g. ensureVaultNamespace). Text matching can silently misclassify errors if the message format changes.

♻️ Proposed fix
 		pods, err := clientset.CoreV1().Pods(certManagerOperandNamespace).List(ctx, metav1.ListOptions{})
 		if err != nil {
-			if strings.Contains(err.Error(), "not found") {
+			if k8serrors.IsNotFound(err) {
 				return false, nil
 			}
 			return false, err
 		}
🤖 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/cert_manager_helpers_test.go` around lines 109 - 141, Update
waitForCertManagerOperandPods to use the Kubernetes structured not-found check
k8serrors.IsNotFound(err) instead of matching "not found" in err.Error(), while
preserving the existing retry behavior for not-found errors and propagation of
all other errors.
test/e2e/e2e_test.go (1)

2759-2816: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Wrap ConfigMap update with retry.RetryOnConflict.

createVaultCAConfigMap and createSampleCAConfigMap do a plain Get→mutate .Data→Update without conflict retry. The referenced ConfigMap (vaultCAConfigMapName) is the same object the operator's watch-label reconciler patches once it's referenced by trustedCABundle (per trusted_ca_bundle_test.go's watch-label restoration test), so a concurrent operator patch between our Get and Update can produce a conflict error that isn't retried, unlike the established retry.RetryOnConflict pattern used in setTrustedCABundle/clearTrustedCABundle in this same file.

♻️ Proposed fix (apply the same pattern to both functions)
-	existing, err := clientset.CoreV1().ConfigMaps(operandNamespace).Get(ctx, vaultCAConfigMapName, metav1.GetOptions{})
-	if k8serrors.IsNotFound(err) {
-		_, err = clientset.CoreV1().ConfigMaps(operandNamespace).Create(ctx, cm, metav1.CreateOptions{})
-		return err
-	}
-	if err != nil {
-		return err
-	}
-	existing.Data = cm.Data
-	_, err = clientset.CoreV1().ConfigMaps(operandNamespace).Update(ctx, existing, metav1.UpdateOptions{})
-	return err
+	return retry.RetryOnConflict(retry.DefaultRetry, func() error {
+		existing, err := clientset.CoreV1().ConfigMaps(operandNamespace).Get(ctx, vaultCAConfigMapName, metav1.GetOptions{})
+		if k8serrors.IsNotFound(err) {
+			_, err = clientset.CoreV1().ConfigMaps(operandNamespace).Create(ctx, cm, metav1.CreateOptions{})
+			return err
+		}
+		if err != nil {
+			return err
+		}
+		existing.Data = cm.Data
+		_, err = clientset.CoreV1().ConfigMaps(operandNamespace).Update(ctx, existing, metav1.UpdateOptions{})
+		return err
+	})
🤖 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/e2e_test.go` around lines 2759 - 2816, Wrap the existing ConfigMap
Get, Data mutation, and Update flow in both createVaultCAConfigMap and
createSampleCAConfigMap with retry.RetryOnConflict, re-fetching the ConfigMap on
each retry and returning non-conflict errors immediately. Preserve the existing
create-on-NotFound behavior and ensure the retry callback propagates the final
update error.
test/e2e/trusted_ca_bundle_test.go (1)

236-238: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add failure messages to newly added Gomega assertions. Both sites add new Expect/g.Expect assertions without a descriptive failure message, unlike neighboring assertions in the same PR (e.g. the restoration check a few lines below in the same test) that do include one — this is explicitly called out for **/*_test.go files.

  • test/e2e/trusted_ca_bundle_test.go#L236-L238: add a message to g.Expect(cm.Labels).To(HaveKeyWithValue(...)), e.g. "ConfigMap %s should have the watch label after ExternalSecretsConfig is Ready".
  • test/e2e/e2e_test.go#L2012-L2014: add messages to Expect(createVaultCAConfigMap(...)).To(Succeed()) and Expect(createSampleCAConfigMap(...)).To(Succeed()), e.g. "failed to create Vault CA ConfigMap" / "failed to create sample CA ConfigMap".
🤖 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/trusted_ca_bundle_test.go` around lines 236 - 238, Add descriptive
failure messages to all newly added Gomega assertions: update the ConfigMap
label assertion near the ExternalSecretsConfig readiness check in
test/e2e/trusted_ca_bundle_test.go (lines 236-238), and add distinct
creation-failure messages to the createVaultCAConfigMap and
createSampleCAConfigMap assertions in test/e2e/e2e_test.go (lines 2012-2014).

Source: Coding guidelines

🤖 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/e2e_test.go`:
- Around line 164-167: Remove the suite-level ensureCertManagerOperatorReady
call from the top-level Ordered Describe BeforeAll, and invoke it in the “Vault
Secret Manager” Context’s own BeforeAll near its existing setup. Keep
cert-manager installation scoped to Vault tests, and add the appropriate
MicroShift skip or guard alongside the Context’s existing Skipped:Disconnected
handling.

In `@test/e2e/README.md`:
- Line 155: Move the “Custom Network Policy Naming” paragraph from beneath
trusted_ca_bundle_test.go to the section containing the NetworkPolicy entry for
e2e_test.go. Preserve the paragraph text unchanged and keep it associated with
the NetworkPolicy spec documentation.
- Around line 87-91: The executable default e2e filter must match the documented
exclusion of Vault. Update the default filter in the Makefile target governing
make test-e2e to exclude both Bitwarden and Vault, preserving the existing
behavior for other suites and avoiding changes to the README unless Vault is
intentionally meant to run by default.

In `@test/e2e/testdata/vault/vault.yaml`:
- Around line 51-52: Update the Deployment pod security configuration in
vault.yaml to explicitly set runAsNonRoot and readOnlyRootFilesystem, retain
capability dropping and allowPrivilegeEscalation: false, and disable
service-account token automount unless required. Ensure the /vault/data volume
remains writable while the container root filesystem is read-only.

---

Nitpick comments:
In `@test/e2e/cert_manager_helpers_test.go`:
- Around line 109-141: Update waitForCertManagerOperandPods to use the
Kubernetes structured not-found check k8serrors.IsNotFound(err) instead of
matching "not found" in err.Error(), while preserving the existing retry
behavior for not-found errors and propagation of all other errors.

In `@test/e2e/e2e_test.go`:
- Around line 2759-2816: Wrap the existing ConfigMap Get, Data mutation, and
Update flow in both createVaultCAConfigMap and createSampleCAConfigMap with
retry.RetryOnConflict, re-fetching the ConfigMap on each retry and returning
non-conflict errors immediately. Preserve the existing create-on-NotFound
behavior and ensure the retry callback propagates the final update error.

In `@test/e2e/trusted_ca_bundle_test.go`:
- Around line 236-238: Add descriptive failure messages to all newly added
Gomega assertions: update the ConfigMap label assertion near the
ExternalSecretsConfig readiness check in test/e2e/trusted_ca_bundle_test.go
(lines 236-238), and add distinct creation-failure messages to the
createVaultCAConfigMap and createSampleCAConfigMap assertions in
test/e2e/e2e_test.go (lines 2012-2014).
🪄 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: 30b54f36-5d8e-478d-9d6f-0961fa177082

📥 Commits

Reviewing files that changed from the base of the PR and between 65f39bd and 303aa54.

📒 Files selected for processing (20)
  • Makefile
  • test/e2e/README.md
  • test/e2e/cert_manager_helpers_test.go
  • test/e2e/e2e_test.go
  • test/e2e/testdata/cert-manager/operator.yaml
  • test/e2e/testdata/vault/ca_certificate.yaml
  • test/e2e/testdata/vault/ca_issuer.yaml
  • test/e2e/testdata/vault/certificate.yaml
  • test/e2e/testdata/vault/external_secret.yaml
  • test/e2e/testdata/vault/issuer.yaml
  • test/e2e/testdata/vault/push_secret.yaml
  • test/e2e/testdata/vault/push_source_secret.yaml
  • test/e2e/testdata/vault/templating_external_secret.yaml
  • test/e2e/testdata/vault/templating_k8s_backend.yaml
  • test/e2e/testdata/vault/templating_push_secret.yaml
  • test/e2e/testdata/vault/templating_source_secrets.yaml
  • test/e2e/testdata/vault/vault.yaml
  • test/e2e/trusted_ca_bundle_test.go
  • test/utils/conditions.go
  • test/utils/dynamic_resources.go

Comment thread test/e2e/e2e_test.go
Comment on lines +164 to +167
By("Ensuring Red Hat cert-manager Operator is installed and ready")
Expect(ensureCertManagerOperatorReady(ctx, clientset, dynamicClient)).To(Succeed(),
"Red Hat cert-manager Operator is required for e2e (OLM install from redhat-operators); see test/e2e/README.md")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Scope cert-manager operator install to the Vault context, not the whole suite.

ensureCertManagerOperatorReady runs in the top-level suite BeforeAll, which executes before every spec in this Ordered Describe block (AWS, env-var, annotations, network-policy, proxy tests, etc.), not just the Vault tests that actually need it. Since the PR explicitly excludes Provider:Vault from the default filter, requiring OLM/cert-manager install for non-Vault runs undermines that goal — and because this is the suite-wide BeforeAll, a failure here (e.g. missing redhat-operators catalog source, disconnected cluster, or MicroShift without OLM/CSV support) aborts the entire suite, not just Vault specs.

Move the ensureCertManagerOperatorReady call into the "Vault Secret Manager" Context's own BeforeAll (near line 1906), and consider adding a MicroShift skip (e.g. Skipped:MicroShift label or exutil.IsMicroShiftCluster() guard) alongside the existing Skipped:Disconnected label on that Context, since installing cert-manager via OLM Subscription/OperatorGroup is not supported on MicroShift.

Also applies to: 1888-1888

🤖 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/e2e_test.go` around lines 164 - 167, Remove the suite-level
ensureCertManagerOperatorReady call from the top-level Ordered Describe
BeforeAll, and invoke it in the “Vault Secret Manager” Context’s own BeforeAll
near its existing setup. Keep cert-manager installation scoped to Vault tests,
and add the appropriate MicroShift skip or guard alongside the Context’s
existing Skipped:Disconnected handling.

Source: Coding guidelines

Comment thread test/e2e/README.md
Comment on lines +87 to +91
| `Provider:Vault` | Vault HTTPS + trustedCABundle failure/recovery (uses suite-installed Red Hat cert-manager Operator) |
| `API:Bitwarden` | bitwarden-sdk-server HTTP API (deploys plugin + `bitwarden-tls-certs` automatically) |
| `API:Bitwarden \|\| Provider:Bitwarden` | All Bitwarden HTTP and provider tests (requires `bitwarden-creds` for Secrets API / provider sync) |
| `Feature:TrustedCABundle` | Trusted CA bundle suite |
| `Feature:TrustedCABundle` | Trusted CA bundle suite (mount/validation + Vault TLS path when combined with `Provider:Vault`) |
| `Feature:ExternalSecretsTemplating` | ExternalSecret templating merge (Kubernetes + Vault dockerconfig) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep the executable default filter aligned with the Vault documentation.

The README and PR objective say Provider:Vault is excluded by default, but Makefile Line 217 excludes only Bitwarden. Vault specs that satisfy the platform predicate can therefore run during make test-e2e, unexpectedly requiring cert-manager/OLM prerequisites.

Update the Makefile filter to exclude {Bitwarden, Vault}, or correct this documentation if Vault is intended to run by default.

🤖 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/README.md` around lines 87 - 91, The executable default e2e filter
must match the documented exclusion of Vault. Update the default filter in the
Makefile target governing make test-e2e to exclude both Bitwarden and Vault,
preserving the existing behavior for other suites and avoiding changes to the
README unless Vault is intentionally meant to run by default.

Comment thread test/e2e/README.md
| `TrustedCABundle` | Trusted CA Bundle |
| `TrustedCABundle` | Trusted CA Bundle (mount / `SSL_CERT_DIR` / Degraded / watch-label restore) |

The **Custom Network Policy Naming** spec adds a dummy egress port to `ExternalSecretsConfig` (if not already present — entries cannot be removed due to CEL immutability), verifies the operator creates `eso-user-e2e-test-custom-np` in the operand namespace (`external-secrets`), and leaves the CR entry in place.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Move the Custom Network Policy paragraph to its owning section.

This paragraph appears immediately under trusted_ca_bundle_test.go, although the feature table identifies Custom Network Policy Naming as an e2e_test.go NetworkPolicy spec. Move it near the NetworkPolicy entry to keep the documentation mapping accurate.

🤖 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/README.md` at line 155, Move the “Custom Network Policy Naming”
paragraph from beneath trusted_ca_bundle_test.go to the section containing the
NetworkPolicy entry for e2e_test.go. Preserve the paragraph text unchanged and
keep it associated with the NetworkPolicy spec documentation.

Comment on lines +51 to 52
annotations:
openshift.io/scc: restricted-v2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Declare the required pod hardening explicitly.

The Deployment currently sets capability dropping and allowPrivilegeEscalation: false, but not runAsNonRoot or readOnlyRootFilesystem; the service-account token is also automounted by default. Add these controls, keeping /vault/data writable through its volume.

Suggested hardening
       serviceAccountName: vault
+      automountServiceAccountToken: false
...
           securityContext:
+            runAsNonRoot: true
+            readOnlyRootFilesystem: true
             allowPrivilegeEscalation: false

As per path instructions, Kubernetes/OpenShift manifests must set runAsNonRoot, readOnlyRootFilesystem, allowPrivilegeEscalation: false, and disable service-account token automount unless needed.

🤖 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/vault.yaml` around lines 51 - 52, Update the
Deployment pod security configuration in vault.yaml to explicitly set
runAsNonRoot and readOnlyRootFilesystem, retain capability dropping and
allowPrivilegeEscalation: false, and disable service-account token automount
unless required. Ensure the /vault/data volume remains writable while the
container root filesystem is read-only.

Source: Path instructions

@openshift-ci

openshift-ci Bot commented Jul 25, 2026

Copy link
Copy Markdown

@bharath-b-rh: 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

approved Indicates a PR has been approved by an approver from all required OWNERS files. 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.

2 participants