Repository navigation
Add envoy proxy for per-beamline ingress routing - #11
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## auto-roll-deployments #11 +/- ##
==========================================================
- Coverage 90.55% 61.64% -28.91%
==========================================================
Files 5 3 -2
Lines 868 219 -649
==========================================================
- Hits 786 135 -651
- Misses 82 84 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks for this, @ZohebShaikh . Routing in envoy is a sensible way round the Kyverno regex-path restriction. Envoy forwards the path unchanged, so the links tiled returns stay correct: tiled builds them from Envoy config: blocking for a data service
Routing Templates Direction: one central tiled for DLS
The larger question is whether a separate pod per beamline is a hard requirement (for POSIX group access to |
Ported from DiamondLightSource/diamond-tiled#2. The Kyverno cluster policy disallows regex ingress paths, so "/" routes to an envoy Service that matches beamline names in the path and forwards to each beamline's own tiled Service and Deployment. Paths move from helm/tiled to Charts/tiled. The TILED_SINGLE_USER_API_KEY env var is kept, as optional, rather than removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CCtPFejfd3WP589miPqaL3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
66d2cda to
44b4645
Compare
…only Every beamline pod now uses the catalog at TILED_CATALOG_URI, from the tiled-secrets secret, and mounts all of /dls read only rather than a beamline specific path. Access to each beamline's data is still limited by its supplementalGroups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ls read only" This reverts commit 650050b.
Envoy forwards the path unchanged, so the beamline is the first node under the tree's root rather than the tree's mount point. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
If I understand the discussion with Cloud team correctly, 'a separate pod per beamline is a hard requirement (for POSIX group access to /dls//data)' to prevent cross-beamline data access. @ZohebShaikh could you confirm if this is still the case? |
|
Yes it is a hard requirement from scicomp |
|
Here is the copilot suggestion to my question of 'how to do a federated deployment in kubernetes, i.e. one instance per beamline but all instance managed and configured centrally. Is there a standard architect for this?' Hopefully it provides a way to avoid expose regular expression Could we adapt the deployment management and configuration suggested in this link for Tiled deployment per beamline? |
From what I understand, you would like to use The main drawback of this approach is that it would require changes to the client, such as The regex-based solution described above may seem slightly more complicated, but it helps abstract away the internal implementation details of Tiled. This ensures that clients remain decoupled from Tiled’s internal architecture and do not need to know how requests are routed internally. |
|
There was also a discussion about using the Envoy Gateway Helm chart. This approach can be extended in the future. At the time, my goal was to keep the solution simple and focused on its core functionality: routing requests through Envoy proxy. As we explore this further, we could also consider Istio and investigate options for adding observability, metrics, and other monitoring capabilities at the Envoy Gateway API level. This could provide additional value alongside pod-level monitoring and help us evaluate which approach would be the best fit for our requirements. |
|
I thought k8s restricts the use of regular expression in ingress for security reason. If Cloud team recommend to use Envoy proxy to handle regular expressions that is fine with me. Personally I like more explicit list of beamlines in the configuration YAML files - we only have a limited number of beamlines in Diamond, so these can be configured exactly! |
Ports DiamondLightSource/diamond-tiled#2 by @ZohebShaikh into this repo's chart (
helm/tiled→Charts/tiled). The original commit's authorship is kept.Kyverno's cluster policy disallows regex ingress paths. So the ingress sends
/to an envoy Service, which matches the beamline name in the path and forwards to that beamline's own tiled Service and Deployment. Each entry inbeamlines:in the values gets its own Deployment.How this differs from the original PR:
TILED_SINGLE_USER_API_KEYenv var is kept, as optional, rather than removed.Charts/tiledstays: the dls-tiled image, versions stamped from the tag, andIfNotPresent.Known issue, carried over from the original: the ingress template treats
ingress.hostsas a list of strings, butvalues.yamlstill holds{host, paths}maps. Withingress.enabled=trueit renders a bad host.A design review of this chart as a central tiled for all of DLS is in progress. Follow-ups will come from that.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CCtPFejfd3WP589miPqaL3