USHIFT-6790: MicroShift Cluster 2 Cluster Communication#1970
USHIFT-6790: MicroShift Cluster 2 Cluster Communication#1970pmtk wants to merge 13 commits intoopenshift:masterfrom
Conversation
|
@pmtk: This pull request references USHIFT-6790 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| 1. Pod-to-Pod, Pod-to-Service (ClusterIP), and | ||
| Pod-to-Service (DNS) communication between MicroShift | ||
| clusters with non-overlapping CIDRs. |
There was a problem hiding this comment.
Pod-to-Pod, Pod-to-Service (ClusterIP), and Pod-to-Service (DNS) must be always bidirectional? I mean, is it possible to have communication in only 1 direction: for example, from Pod(cluster1)->Pod(cluster2) but NOT from Pod(cluster2)->Pod(cluster1).
There was a problem hiding this comment.
It's certainly doable, but is it what we want? Maybe as an accidental by-product, but I would not support it. WDYT?
There was a problem hiding this comment.
I was asking to learn if this was already discussed. I'd say keep it simple, I'm happy if we advertised in the docs /enhacement something like: "By default it's always biderectional. One direction only is not tested neither supported." WDYT?
| domain: "cluster-b.remote" | ||
| ``` | ||
|
|
||
| 4. The user restarts MicroShift. |
There was a problem hiding this comment.
Which microshift? If I understand correctly MicroShift must be restarted every time the config under c2cc changes, right?.
There was a problem hiding this comment.
Yeah, as with any configuration changes - we don't have hot reloading.
| - 10.46.0.0/16 | ||
| ``` | ||
|
|
||
| 3. On each cluster, the user adds a `c2cc` section |
There was a problem hiding this comment.
What will happen if c2cc is only set in only 1 cluster, but not the other? Is this something we will support? Is it mandatory to configure it always in both clusters?
There was a problem hiding this comment.
I guess it's related to #1970 (comment)
What would happen? Provided that firewall ports are open on both hosts, I would assume that the C1 -> C2 would succeed, but I have not tested it.
There was a problem hiding this comment.
As I said before, I prefer to keep it simple and add a note: we only support when c2cc is set in both cluster. I think it's a limitation @DanielFroehlich will agree about. I just want to keep the scope as small as possible.
@DanielFroehlich what do you think?
| 1. The user removes the `c2cc` section from the | ||
| config and restarts MicroShift. |
There was a problem hiding this comment.
Should this be removed from both clusters at the same time, right?
There was a problem hiding this comment.
Yeah... I haven't considered partial configuration of "Cluster TO Cluster communication" :D
There was a problem hiding this comment.
So far, there's nothing in the enhancement about MicroShifts communicating with each other to ensure proper cross-config. Maybe it's a GA feature?
There was a problem hiding this comment.
Is it easy to add a check and if not report an error in the log? Do you think is a good idea?
There was a problem hiding this comment.
What kind of check? Do you mean like ask other clusters what their c2cc configuration is?
There was a problem hiding this comment.
If Daniel agree only bidirectional is supported I was thinking on different checks, from easy to more complex:
- Every MicroShift check if
c2ccis defined in the remote cluster, if not report an error. - Every MicroShift check if the subnets defined in the
c2ccmatch the network subnet of the remote cluster.- I guess this is more complicated when more than 2 clusters, it's mostly about user experience and probably not worth it.
| ### Implementation Details/Notes/Constraints | ||
|
|
||
| **Configuration**: | ||
| - `C2CC` struct with `RemoteClusters []RemoteCluster` |
There was a problem hiding this comment.
because RemoteClusters []RemoteCluster is an array, does it means we can configure more than 1 remote cluster? How would the routing work then?
There was a problem hiding this comment.
For TP, I think we'll want to support only 1 remote, but it's an array to keep the API open for the future (if we need it).
Each cluster would have different Cluster and Service CIDRs:
# Cluster B
network:
clusterNetwork:
- 10.45.0.0/16
serviceNetwork:
- 10.46.0.0/16
# Cluster C
network:
clusterNetwork:
- 10.48.0.0/16
serviceNetwork:
- 10.49.0.0/16
-
# Cluster D
network:
clusterNetwork:
- 10.51.0.0/16
serviceNetwork:
- 10.52.0.0/16
# Cluster A config
c2cc:
remoteClusters:
- nextHop: "192.168.122.101"
clusterNetwork:
- "10.45.0.0/16"
serviceNetwork:
- "10.46.0.0/16"
domain: "cluster-b.remote"
- nextHop: "192.168.122.102"
clusterNetwork:
- "10.48.0.0/16"
serviceNetwork:
- "10.49.0.0/16"
domain: "cluster-c.remote"
- nextHop: "192.168.122.103"
clusterNetwork:
- "10.51.0.0/16"
serviceNetwork:
- "10.52.0.0/16"
domain: "cluster-d.remote"
There was a problem hiding this comment.
It's great we can configure more than 1 cluster to comunicate multiple cluster between them. I really like it. I think to think about this in deep mostly about how can this be tested and all the unexpected and conflicts in configurations.
There was a problem hiding this comment.
I think would be good to capture it explicitly in Goal section that this is for 1 remote cluster and that multiple remotes is a non goal. Can have a separate EP later for multiple remotes.
|
|
||
| * As a MicroShift user, I want to reach services on a | ||
| remote cluster using DNS names (e.g., | ||
| `myservice.mynamespace.svc.remote-cluster.local`). |
There was a problem hiding this comment.
remote-cluster here refers to remote cluster name or a generic replacement for cluster?
There was a problem hiding this comment.
That would come from the config
c2cc:
remoteClusters:
- nextHop: "192.168.122.101"
clusterNetwork:
- "10.45.0.0/16"
serviceNetwork:
- "10.46.0.0/16"
domain: "cluster-b.remote" <-----
I haven't decided on specific names yet (if we'll put remote-cluster.local or cluster-b.remote as an example config)
| 1. Pod-to-Pod, Pod-to-Service (ClusterIP), and | ||
| Pod-to-Service (DNS) communication between MicroShift | ||
| clusters with non-overlapping CIDRs. | ||
| 2. Declarative configuration via the MicroShift config |
There was a problem hiding this comment.
Does this include validating peer configuration to make sure using correct CIDRs for a given remote or onus on user to make sure it is correct?
There was a problem hiding this comment.
Right now it's on user to make sure the configs are correct.
Mutual configuration check between MicroShift instances could be a goal for GA.
| ### Implementation Details/Notes/Constraints | ||
|
|
||
| **Configuration**: | ||
| - `C2CC` struct with `RemoteClusters []RemoteCluster` |
There was a problem hiding this comment.
I think would be good to capture it explicitly in Goal section that this is for 1 remote cluster and that multiple remotes is a non goal. Can have a separate EP later for multiple remotes.
|
|
||
| **CoreDNS Integration**: Per-remote-cluster server | ||
| block with domain rewrite and forwarding to the remote | ||
| DNS IP (10th IP in service CIDR). |
There was a problem hiding this comment.
Would be good to provide sample CoreDNS config for a server block.
There was a problem hiding this comment.
Added to the enhancement
other-cluster.local:5353 {
bufsize 1232
errors
rewrite name suffix .other-cluster.local .cluster.local answer auto
forward . 10.46.0.10:53
}
| probe pod discover the remote probe pod's IP? DNS | ||
| is not reliable for this since the user will be | ||
| able to override CoreDNS configuration completely. | ||
| Maybe we can hardcode Cluster IP like the CoreDNS? |
There was a problem hiding this comment.
Can you clarify "user will be able to override CoreDNS configuration completely"?
One option can be to deploy probe pods as headless service with single pod and use same name for probe pod service on all clusters.
There was a problem hiding this comment.
We have another feature (OCPSTRAT-2998) for complete override of the config.
Let me clarify the enhancement
There was a problem hiding this comment.
And this is what the customer is planning to do, so the other-cluster.local:5353 { on our side is more for completeness at this time.
Probably unnecessary complexity
Let's only allow for traffic from Pods to Pods/Services, no traffic from host level
|
@pmtk: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
No description provided.