kcp-dev / contrib-tmc

An experimental add-on readding some Kubernetes compute APIs and impement transparent multi-cluster scheduling
Apache License 2.0
5 stars 3 forks source link

epic: Complete InCluster Networking #95

Open davidfestal opened 2 years ago

davidfestal commented 2 years ago

TL;DR

Extend the limited In Cluster Network support provided in PR kcp-dev/kcp#1708, in order to add:

Progress tracking #

EPIC detailed issues and overall progress can be tracked with the following project view

Work Items

david-martin commented 1 year ago

@davidfestal @sttts I was having a look through the codebase to get an understanding of how kcp-dev/contrib-tmc#113 might be solved by creating a NetworkPolicy in each namespace. One that would "lock down by default between workspaces, but allow namespace comm for the same workspace"

Some related discusssion in slack here https://kubernetes.slack.com/archives/C021U8WSAFK/p1667469578560679

A few thoughts:

My instinct is to create a default NetworkPolicy in every namespace that gets transformed when synced downstream.

davidfestal commented 1 year ago

@davidfestal @sttts I was having a look through the codebase to get an understanding of how kcp-dev/contrib-tmc#113 might be solved by creating a NetworkPolicy in each namespace. One that would "lock down by default between workspaces, but allow namespace comm for the same workspace"

Some related discusssion in slack here https://kubernetes.slack.com/archives/C021U8WSAFK/p1667469578560679

A few thoughts:

  • Is there a precedence in the code where some resource(s) are created in each namespace? I can see a kcp-default-token secret and kcp-root-ca.crt configmap whos name gets transformed when syncing, which leads to another question
  • Would the NetworkPolicy be created by kcp in the upstream namespace, and synced to the downstream namespace(s), with transforms to ensure appropriate restrictions? Or would the NetworkPolicy be a 'special case' like Namespaces where they aren't synced, but instead created and managed in the downstream namespace(s) only?

My instinct is to create a default NetworkPolicy in every namespace that gets transformed when synced downstream.

Here is the current take on this (still need to formalize it in an issue / EPIC):

We did not contemplate enabling the use-case when communications would be allowed between namespaces of originating from different KCP workspaces

mjudeikis commented 11 months ago

/transfer-issue contrib-tmc