mbp-1126: Network segmentation using UDN - #147
Draft
mlorenzofr wants to merge 2 commits into
Draft
Conversation
mlorenzofr
marked this pull request as draft
June 23, 2026 16:52
Collaborator
|
There seems to be a conflict role of the UDN. In
|
minmzzhang
reviewed
Jun 23, 2026
minmzzhang
reviewed
Jun 23, 2026
minmzzhang
reviewed
Jun 23, 2026
Signed-off-by: Manuel Lorenzo <[email protected]>
mlorenzofr
force-pushed
the
mbp-1126
branch
2 times, most recently
from
September 9, 2026 15:38
4a61331 to
ba01162
Compare
Signed-off-by: Manuel Lorenzo <[email protected]>
mlorenzofr
force-pushed
the
mbp-1126
branch
from
September 10, 2026 07:20
ba01162 to
f8a7fe3
Compare
mlorenzofr
marked this pull request as ready for review
September 10, 2026 11:34
mlorenzofr
marked this pull request as draft
September 10, 2026 15:41
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.
Implements network segmentation using User Defined Networks (UDNs) for the qtodo multi-tier application. The qtodo frontend (
qtodonamespace) and PostgreSQL database (qtodo-dbnamespace) join a shared Layer2 secondaryClusterUserDefinedNetwork(CUDN) so database traffic is isolated from the default cluster network.Because secondary UDNs do not support Kubernetes Services, the database pod uses a static UDN IP and qtodo's JDBC URL targets that address when UDN is enabled.
Summary
ClusterUserDefinedNetworkin theqtodo-dbchart spanning theqtodoandqtodo-dbnamespacesNetworkAttachmentDefinition; pods opt in via thek8s.v1.cni.cncf.io/networksannotationMultiNetworkPolicyon the UDN to allow PostgreSQL (5432/tcp) only fromapp=qtodotoapp=qtodo-dbNetworkPolicywhen UDN is enabled:10.100.0.10) when UDN is enableddocs/user-defined-networks.mdand related docsudnfeature flag to enable bothqtodo-db(udn.enabled) andqtodo(app.udn.enabled)Prerequisites
spec.useMultiNetworkPolicy: trueonnetwork.operator.openshift.io/cluster(required for UDNMultiNetworkPolicy. Can be disabled via chart values if needed)Test plan
useMultiNetworkPolicyon the Cluster Network Operatorpython3 scripts/gen-feature-variants.py --features udnqtodoandqtodo-dbClusterUserDefinedNetworkand NADs exist in both namespacesnet1) and qtodo-db has IP10.100.0.10NetworkPolicyrules (qtodo-db: DNS egress only; no PostgreSQL on eth0)MultiNetworkPolicyrules on the UDN (PostgreSQL allowed qtodo -> qtodo-db only)qtodo-db.qtodo-db.svcfails when UDN is enableddocs/user-defined-networks.md, sync-wave inventory, multi-tier guide)