fix: add RestartPolicy Always to UI sidecar containers to prevent Job…#1782
Merged
Conversation
digitronik
reviewed
Jun 8, 2026
| containers = append(containers, *pwContainer) | ||
| } | ||
|
|
||
| j.Spec.Template.Spec.Containers = containers |
There was a problem hiding this comment.
Don't you think both pw and selenium should be InitContainers then only policy will apply?
… hang Adds RestartPolicy: Always to both Selenium and Playwright sidecar containers to fix Job completion deadlock issue where UI containers would run forever after IQE tests complete. **Problem:** - UI containers (Selenium/Playwright) run long-lived services (VNC + browser) - After main test container exits, Job waits for all containers to complete - Sidecar containers never exit on their own → Job hangs forever - CJI never completes, namespace cleanup never happens **Solution:** - Use Kubernetes 1.29+ native sidecar support via RestartPolicy: Always - Kubernetes automatically terminates sidecar when main container exits - Job completes immediately after tests finish **Changes:** 1. controllers/cloud.redhat.com/providers/iqe/impl.go: - Add RestartPolicy: Always to createSeleniumContainer() - Add RestartPolicy: Always to createPlaywrightContainer() 2. Update test assertions to verify RestartPolicy is set: - tests/kuttl/test-iqe-jobs-selenium/01-assert.yaml - tests/kuttl/test-iqe-jobs-playwright/01-assert.yaml **Compatibility:** - Requires Kubernetes 1.29+ (production cluster is 1.34+) - Backward compatible - field ignored on older clusters Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
01c20be to
b3d4ed0
Compare
bsquizz
approved these changes
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… hang
Adds RestartPolicy: Always to both Selenium and Playwright sidecar containers to fix Job completion deadlock issue where UI containers would run forever after IQE tests complete.
Problem:
Solution:
Changes:
controllers/cloud.redhat.com/providers/iqe/impl.go:
Update test assertions to verify RestartPolicy is set:
Compatibility: