fleet-networking

module
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2023 License: MIT

README

Fleet-networking

CI Go Report Card Releases GitHub go.mod Go version

Fleet-networking provides following capabilities

  • expose a Kubernetes service from a single cluster
  • create a multi-cluster service that exposes endpoints from a number of Kubernetes clusters

Architecture

Architecture

The fleet networking consists of the following components:

  • hub-net-controller-manager running in the hub cluster
  • mcs-controller-manager running in the member clusters
  • member-net-controller-manager running in the member clusters

The Controller Manager runs the various controllers built up on controller-runtime by watching fleet networking resources.

Constraints

  • Assuming member clusters are Kubernetes clusters on the same virtual networking,
    • Clusters on virtual network peers (virtual networks connected within same region)
    • Clusters on global virtual network peers (virtual networks connected across regions).
    • Non-overlapping pod CIDRs for all the above.
  • Each member cluster could talk with hub cluster.

Concepts

Fleet: A multi cluster solution that users use to manage Kubernetes clusters.

Hub cluster: An Kubernetes cluster that hosts the control plane of the fleet.

Member cluster: A Kubernetes cluster that is part of the fleet.

Fleet-system Namespace: A reserved namespace in all clusters for running Fleet networking controllers and putting internal resources.

Reserved member cluster namespace in the hub cluster: A reserved namespace in the hub cluster where a member cluster can access to communicate with the hub cluster.

Quick Start

This document features a tutorial that explains how to set up and make use of the networking capabilities provided by Fleet.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the networking.fleet v1alpha1 API group.
Package v1alpha1 contains API Schema definitions for the networking.fleet v1alpha1 API group.
cmd
hub-net-controller-manager
Binary hub-net-controller-manager watches fleet-networking CRDs in the hub cluster to export/import multi-cluster services.
Binary hub-net-controller-manager watches fleet-networking CRDs in the hub cluster to export/import multi-cluster services.
member-net-controller-manager
Binary member-net-controller-manager watches fleet-networking CRDs in the member cluster to export/import multi-cluster services.
Binary member-net-controller-manager watches fleet-networking CRDs in the member cluster to export/import multi-cluster services.
pkg
common/apiretry
Package apiretry provides the retry func shared between networking controllers.
Package apiretry provides the retry func shared between networking controllers.
common/condition
Package condition provides condition related utils.
Package condition provides condition related utils.
common/env
Package env provides shared functions to handle environment variables.
Package env provides shared functions to handle environment variables.
common/hubconfig
package hubconfig provides common functionalities for hub configuration.
package hubconfig provides common functionalities for hub configuration.
common/metrics
Package metrics features some consts and variables used for exposing metrics.
Package metrics features some consts and variables used for exposing metrics.
common/objectmeta
Package objectmeta defines shared meta const used by the networking objects.
Package objectmeta defines shared meta const used by the networking objects.
common/uniquename
Package uniquename features utility functions that help format unique names for exporting and importing cluster-scoped and fleet-scoped resources.
Package uniquename features utility functions that help format unique names for exporting and importing cluster-scoped and fleet-scoped resources.
controllers/hub/endpointsliceexport
Package endpointsliceexport features the EndpointSliceExport controller running on the hub cluster, which is responsible for distributing EndpointSlices exported from member clusters.
Package endpointsliceexport features the EndpointSliceExport controller running on the hub cluster, which is responsible for distributing EndpointSlices exported from member clusters.
controllers/hub/internalserviceexport
Package internalserviceexport features the InternalServiceExport controller for exporting services from member to the fleet.
Package internalserviceexport features the InternalServiceExport controller for exporting services from member to the fleet.
controllers/hub/internalserviceimport
Package internalserviceimport features the InternalServiceImport controller for importing an exported service into a member cluster.
Package internalserviceimport features the InternalServiceImport controller for importing an exported service into a member cluster.
controllers/hub/serviceimport
Package serviceimport features the serviceimport controller to resolve the service spec when exporting multi-cluster services.
Package serviceimport features the serviceimport controller to resolve the service spec when exporting multi-cluster services.
controllers/member/endpointslice
Package endpointslice features the EndpointSlice controller for exporting an EndpointSlice from a member cluster to its fleet.
Package endpointslice features the EndpointSlice controller for exporting an EndpointSlice from a member cluster to its fleet.
controllers/member/endpointsliceexport
Package endpointsliceexport features the EndpointSliceExport controller for cleaning up left over EndpointSlices on the hub cluster.
Package endpointsliceexport features the EndpointSliceExport controller for cleaning up left over EndpointSlices on the hub cluster.
controllers/member/endpointsliceimport
Package endpointsliceimport features the EndpointSliceImport controller for importing EndpointSlices from hub cluster into a member cluster.
Package endpointsliceimport features the EndpointSliceImport controller for importing EndpointSlices from hub cluster into a member cluster.
controllers/member/internalmembercluster/v1alpha1
Package internalmembercluster features internalmembercluster controller to report its heartbeat to the hub by updating internalMemberCluster and cleanup the resources before leave.
Package internalmembercluster features internalmembercluster controller to report its heartbeat to the hub by updating internalMemberCluster and cleanup the resources before leave.
controllers/member/internalserviceexport
package internalserviceexport features the InternalServiceExport controller for reporting back conflict resolution status from the fleet to a member cluster.
package internalserviceexport features the InternalServiceExport controller for reporting back conflict resolution status from the fleet to a member cluster.
controllers/member/internalserviceimport
Package internalserviceimport features the InternalServiceImport controller for reporting back the status from the fleet to a member cluster.
Package internalserviceimport features the InternalServiceImport controller for reporting back the status from the fleet to a member cluster.
controllers/member/serviceexport
Package serviceexport features the ServiceExport controller for exporting a Service from a member cluster to its fleet.
Package serviceexport features the ServiceExport controller for exporting a Service from a member cluster to its fleet.
controllers/member/serviceimport
Package serviceimport features the serviceimport controller deployed in member cluster to managed internalserviceimport according to its corresponding serviceimport.
Package serviceimport features the serviceimport controller deployed in member cluster to managed internalserviceimport according to its corresponding serviceimport.
controllers/multiclusterservice
Package multiclusterservice features the mcs controller to reconcile multiclusterservice CRD.
Package multiclusterservice features the mcs controller to reconcile multiclusterservice CRD.
test
e2e/framework
Package framework provides common functionalities for e2e tests.
Package framework provides common functionalities for e2e tests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL