Rails: Update network policy to use pod selectors to target the workspace pod
MR: Update workspaces config to apply when shared_n... (!189441 - merged)
Description
The network policy generated for each workspace right now applies to all pods in a namespace. This works out well until now because each workspace is created in a new namespace.
As part of this epic, we want to create a workspace in a shared namespace. Thus, the created network policy should explicitly filter the workspace pods to which it will be applied to.
Since there is no unique label added to the workspace pods to filter on, we will have to first add those labels. We will have to do it in a manner where the existing workspaces are not affected by it.
Acceptance criteria
-
Generated Network Policy for the workspace has spec.podSelectorspecified. -
This spec.podSelectorshould uniquely select the workspace pod.
Implementation plan
TODO: Fill out or delete (optional)
[Provide a high-level plan for implementation of this issue, including relevant technical and/or design details.]