Skip to content

Commit

Permalink
refactor readme and replace gomod version
Browse files Browse the repository at this point in the history
Signed-off-by: lmxia <[email protected]>
  • Loading branch information
lmxia authored and Airren committed Aug 2, 2024
1 parent 633619b commit b35b4a4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 31 deletions.
Binary file removed .DS_Store
Binary file not shown.
41 changes: 15 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
child cluster and has no limits of cluster IP CIDR or CNI types of kubernetes clusters and also
provide service discovery ability.

With ``Nauti``, you don't need to impose any specific requirements on the cluster or be aware of the cluster nodes.
Additionally, there are no intrusive modifications to the cluster. All tunnels and network policies are configured
within the containers.

It consists of several parts for networking between clusters:

- nri-controller add second network interface when pod created.
- crossdns provides DNS discovery of Services across clusters.
- `cnf` adds second network interface for pods and establishes VPN tunnels across inner-cluster and inter-cluster.
- `crossdns` provides DNS discovery of Services across clusters.

## Architecture

Expand All @@ -17,22 +21,19 @@ It consists of several parts for networking between clusters:

We use hub cluster to exchange MCS related resources for connecting clusters, and establish secure tunnels with
all other participating clusters. Hub defines a set of ServiceAccount, Secrets and RBAC to enable `Syncer` and
`octopus`to securely access the Hub cluster's API.

For develop guide, workflow show as.

![](doc/pic/tunnel.png)

## Syncer、Cross DNS
`cnf`to securely access the Hub cluster's API.

We may merge the two components into one Service Discovery Component.
## Child cluster

For every service in cluster which has ServiceExport created for it. A new EndpointSlice will be generated to represent
the running pods contain references to endpoint's secondary IP. These endpointSlice resources will be exported to
`Hub Cluster` and will be copied to other clusters.
For every service in the cluster that has a `ServiceExport` created, a new `EndpointSlice` will be generated to represent
the running pods and include references to the endpoint's secondary IP. These `EndpointSlice` resources will be exported
to the `Hub Cluster` and synchronized with other clusters.

![](doc/pic/servicediscovery.png)
``Nauti`` deploys ``cnf`` as a `DaemonSet` in the child clusters. A leader pod in cnf will be elected to establish
a VPN tunnel to the `Hub Cluster` and create tunnels to other cnf replicas on different nodes within the child cluster.

Additionally, all workload pods in the clusters will have a second network interface allocated by the ``cnf`` pod on the
same node, with this second interface assigned to the ``cnf`` network namespace.

## Helm Chart Installation

Expand Down Expand Up @@ -134,19 +135,7 @@ Test it in another cluster.
## Clear All
```shell
$ helm uninstall nauti -n nauti-system
$ kubectl delete -f local-pv.yaml
$ kubectl delete ns nauti-system
$ for ns in $(kubectl get ns -o name |cut -c 11-); do
echo "annotating pods in ns:$ns"
kubectl annotate pod --all nauti.io/cidr- -n "$ns"
kubectl annotate pod --all nauti.io/gateway- -n "$ns"
kubectl annotate pod --all nauti.io/ip_address- -n "$ns"
kubectl annotate pod --all nauti.io/logical_switch- -n "$ns"
kubectl annotate pod --all nauti.io/mac_address- -n "$ns"
kubectl annotate pod --all nauti.io/allocated- -n "$ns"
kubectl annotate pod --all nauti.io/pod_nic_type- -n "$ns"
kubectl annotate pod --all nauti.io/routes- -n "$ns"
done
```
Expand Down
Binary file removed deploy/.DS_Store
Binary file not shown.
Binary file modified doc/pic/arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 3 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ require (
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/sync v0.7.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
)

require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/DataDog/appsec-internal-go v1.0.0 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.45.0-rc.1 // indirect
Expand Down Expand Up @@ -184,7 +181,6 @@ replace k8s.io/endpointslice => ./staging/k8s.io/endpointslice

replace (
github.com/mdlayher/socket => github.com/mdlayher/socket v0.4.0
github.com/ovn-org/libovsdb => github.com/kubeovn/libovsdb v0.0.0-20230824051252-485a54fd6cb4
k8s.io/api => k8s.io/api v0.28.4
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.28.4
k8s.io/apimachinery => k8s.io/apimachinery v0.28.4
Expand Down Expand Up @@ -214,5 +210,7 @@ replace (
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.28.4
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.28.4
k8s.io/sample-controller => k8s.io/sample-controller v0.28.4

k8s.io/cli-runtime => k8s.io/cli-runtime v0.28.4
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.28.4
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.28.4
)

0 comments on commit b35b4a4

Please sign in to comment.