-
Notifications
You must be signed in to change notification settings - Fork 86
LCORE-2035: Add logic for tunnel and interception proxies on konflux #1758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
radofuchs
merged 6 commits into
lightspeed-core:main
from
radofuchs:LCORE_2035_konflux_fix
May 21, 2026
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
tests/e2e-prow/rhoai/manifests/lightspeed/e2e-interception-proxy.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| # In-cluster TLS-intercepting proxy for proxy.feature (Konflux / Prow). | ||
| # Llama Stack run.yaml points at http://e2e-interception-proxy.<ns>.svc.cluster.local:8889 | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: e2e-interception-proxy | ||
| labels: | ||
| app: e2e-interception-proxy | ||
| spec: | ||
| securityContext: | ||
| runAsNonRoot: true | ||
| seccompProfile: | ||
| type: RuntimeDefault | ||
| containers: | ||
| - name: e2e-interception-proxy | ||
| image: python:3.12-slim | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: ["ALL"] | ||
| runAsNonRoot: true | ||
| runAsUser: 1000 | ||
| seccompProfile: | ||
| type: RuntimeDefault | ||
| workingDir: /app | ||
| env: | ||
| - name: HOME | ||
| value: /tmp | ||
| - name: PYTHONPATH | ||
| value: /app:/tmp/pydeps | ||
| command: | ||
| - /bin/sh | ||
| - -c | ||
| - | | ||
| set -e | ||
| pip install --quiet --no-cache-dir --target /tmp/pydeps 'trustme>=1.2.1' | ||
| exec python /app/interception_proxy.py | ||
| ports: | ||
| - containerPort: 8889 | ||
| name: proxy | ||
| - containerPort: 8886 | ||
| name: stats | ||
| volumeMounts: | ||
| - name: proxy-scripts | ||
| mountPath: /app | ||
| readOnly: true | ||
| readinessProbe: | ||
| httpGet: | ||
| path: /stats | ||
| port: stats | ||
| initialDelaySeconds: 5 | ||
| periodSeconds: 5 | ||
| livenessProbe: | ||
| httpGet: | ||
| path: /stats | ||
| port: stats | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 15 | ||
| volumes: | ||
| - name: proxy-scripts | ||
| configMap: | ||
| name: e2e-interception-proxy-script | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: e2e-interception-proxy | ||
| spec: | ||
| selector: | ||
| app: e2e-interception-proxy | ||
| ports: | ||
| - name: proxy | ||
| port: 8889 | ||
| targetPort: proxy | ||
| - name: stats | ||
| port: 8886 | ||
| targetPort: stats | ||
69 changes: 69 additions & 0 deletions
69
tests/e2e-prow/rhoai/manifests/lightspeed/e2e-tunnel-proxy.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # In-cluster HTTP CONNECT tunnel proxy for proxy.feature (Konflux / Prow). | ||
| # Llama Stack run.yaml points at http://e2e-tunnel-proxy.<ns>.svc.cluster.local:8888 | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: e2e-tunnel-proxy | ||
| labels: | ||
| app: e2e-tunnel-proxy | ||
| spec: | ||
| securityContext: | ||
| runAsNonRoot: true | ||
| seccompProfile: | ||
| type: RuntimeDefault | ||
| containers: | ||
| - name: e2e-tunnel-proxy | ||
| image: python:3.12-slim | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: ["ALL"] | ||
| runAsNonRoot: true | ||
| runAsUser: 1000 | ||
| seccompProfile: | ||
| type: RuntimeDefault | ||
| workingDir: /app | ||
| env: | ||
| - name: PYTHONPATH | ||
| value: /app | ||
| command: ["python", "/app/tunnel_proxy.py"] | ||
| ports: | ||
| - containerPort: 8888 | ||
| name: proxy | ||
| - containerPort: 8887 | ||
| name: stats | ||
| volumeMounts: | ||
| - name: proxy-scripts | ||
| mountPath: /app | ||
| readOnly: true | ||
| readinessProbe: | ||
| httpGet: | ||
| path: /stats | ||
| port: stats | ||
| initialDelaySeconds: 2 | ||
| periodSeconds: 5 | ||
| livenessProbe: | ||
| httpGet: | ||
| path: /stats | ||
| port: stats | ||
| initialDelaySeconds: 5 | ||
| periodSeconds: 15 | ||
| volumes: | ||
| - name: proxy-scripts | ||
| configMap: | ||
| name: e2e-tunnel-proxy-script | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: e2e-tunnel-proxy | ||
| spec: | ||
| selector: | ||
| app: e2e-tunnel-proxy | ||
| ports: | ||
| - name: proxy | ||
| port: 8888 | ||
| targetPort: proxy | ||
| - name: stats | ||
| port: 8887 | ||
| targetPort: stats |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: lightspeed-core/lightspeed-stack
Length of output: 892
Avoid runtime package installation in pod startup path.
The
pip install trustmecommand in the pod startup (line 36) introduces an external network dependency during pod initialization, which can cause flaky or slow e2e runs. Sincetrustmeis required by the interception proxy logic (tests/e2e/proxy/interception_proxy.pyimports and uses it), prebuild the container image with this dependency included so pod startup is deterministic and does not depend on external package indices.🤖 Prompt for AI Agents