Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove no need octopus and remove global cidr as secondary ip range #82

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ifdef HTTPS_PROXY
endif

lint: golangci-lint
golangci-lint run -c .golangci.yaml --timeout=10m
GOARCH=amd64 GOOS=linux golangci-lint run -c .golangci.yaml --timeout=10m


# Generate manifests e.g. CRD, RBAC etc.
Expand Down Expand Up @@ -57,9 +57,6 @@ endif
crossdns:
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -a -installsuffix cgo -o bin/crossdns cmd/crossdns/main.go

octopus:
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -ldflags "-w -s" -a -installsuffix cgo -o bin/octopus cmd/octopus/main.go

cnf:
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -ldflags "-w -s" -a -installsuffix cgo -o bin/cnf cmd/cnf/main.go

Expand All @@ -69,18 +66,14 @@ ep-controller:

images:
docker build $(DOCKERARGS) -f ./build/crossdns.Dockerfile ./ -t ${REGISTRY}/${REGISTRY_NAMESPACE}/crossdns:${IMAGE_TAG}
docker build $(DOCKERARGS) -f ./build/octopus.Dockerfile ./ -t ${REGISTRY}/${REGISTRY_NAMESPACE}/octopus:${IMAGE_TAG}
docker build $(DOCKERARGS) -f ./build/cnf.Dockerfile ./ -t ${REGISTRY}/${REGISTRY_NAMESPACE}/cnf:${IMAGE_TAG}
docker build $(DOCKERARGS) -f ./build/dedinic.Dockerfile ./ -t ${REGISTRY}/${REGISTRY_NAMESPACE}/dedinic:${IMAGE_TAG}
docker build $(DOCKERARGS) -f ./build/ep-controller.Dockerfile ./ -t ${REGISTRY}/${REGISTRY_NAMESPACE}/ep-controller:${IMAGE_TAG}

image-crossdns:
docker build $(DOCKERARGS) -f ./build/crossdns.Dockerfile ./ -t ${REGISTRY}/${REGISTRY_NAMESPACE}/crossdns:${IMAGE_TAG}
docker push ${REGISTRY}/${REGISTRY_NAMESPACE}/crossdns:${IMAGE_TAG}

image-octopus:
docker build $(DOCKERARGS) -f ./build/octopus.Dockerfile ./ -t ${REGISTRY}/${REGISTRY_NAMESPACE}/octopus:${IMAGE_TAG}
docker push ${REGISTRY}/${REGISTRY_NAMESPACE}/octopus:${IMAGE_TAG}

image-dedinic:
docker build $(DOCKERARGS) -f ./build/dedinic.Dockerfile ./ -t ${REGISTRY}/${REGISTRY_NAMESPACE}/dedinic:${IMAGE_TAG}
docker push ${REGISTRY}/${REGISTRY_NAMESPACE}/dedinic:${IMAGE_TAG}
Expand All @@ -96,7 +89,7 @@ image-ep-controller:

images-push:
docker push ${REGISTRY}/${REGISTRY_NAMESPACE}/crossdns:${IMAGE_TAG}
docker push ${REGISTRY}/${REGISTRY_NAMESPACE}/octopus:${IMAGE_TAG}
docker push ${REGISTRY}/${REGISTRY_NAMESPACE}/cnf:${IMAGE_TAG}
docker push ${REGISTRY}/${REGISTRY_NAMESPACE}/dedinic:${IMAGE_TAG}
docker push ${REGISTRY}/${REGISTRY_NAMESPACE}/ep-controller:${IMAGE_TAG}

Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ provide service discovery ability.
It consists of several parts for networking between clusters:

- nri-controller add second network interface when pod created.
- octopus manages secure tunnels between hub and clusters, sync multi cluster services related resource across clusters
- crossdns provides DNS discovery of Services across clusters.

## Architecture
Expand All @@ -20,13 +19,6 @@ We use hub cluster to exchange MCS related resources for connecting clusters, an
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.

## Octopus

Octopus maintains the tunnels by using of [WireGuard](https://www.wireguard.com/), a performant and secure VPN
in`CNF pod`. The `CNF pod` can run on any node without specifically designated. `CNF pod` will generate key pairs
every time it starts, creates and up wiregurad network interface and config the wireguard device with `peer` CRD.


For develop guide, workflow show as.

![](doc/pic/tunnel.png)
Expand Down
15 changes: 0 additions & 15 deletions build/octopus.Dockerfile

This file was deleted.

162 changes: 0 additions & 162 deletions cmd/octopus/main.go

This file was deleted.

6 changes: 6 additions & 0 deletions deploy/cluster/templates/cnf-cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.cluster.localnamespace }}
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
Expand Down
67 changes: 0 additions & 67 deletions deploy/cluster/templates/tunnel_deployment.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions deploy/hub/templates/cnf-hub.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.cluster.sharenamespace }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
4 changes: 1 addition & 3 deletions deploy/hub/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.cluster.hub -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -16,5 +15,4 @@ spec:
nodePort: {{ .Values.service.nodePort }}
selector:
app: cnf-nauti
cnf-leader: "true"
{{- end }}
router.nauti.io/leader: "true"
Loading
Loading