fleet

module
v0.9.8-rc2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT

README

Fleet

GitHub release (latest by date) Go Report Card Build Status GitHub go.mod Go version codecov

Fleet provides the following capabilities

  • Join/Leave is a feature that allows a member cluster to join and leave a fleet by registering a custom resource on the fleet's control plane (the hub cluster).
  • Workload Orchestration is a feature that allows users to create resources on the hub cluster and then selectively propagate these resources to desired member clusters in the fleet.

Concepts

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

Hub cluster: A 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.

Quick Start

This section provides a tutorial which explains how to setup and make use of the capabilities provided by fleet

Prerequisites

Steps to run agents on Kind clusters

export this variable which specifies the number of member clusters that will be created.

export MEMBER_CLUSTER_COUNT=1

from the root directory of the repo run the following command, by default a hub cluster gets created which is the control plane for fleet (The makefile uses kindest/node:v1.28.0)

make setup-clusters

then switch context to the hub cluster,

kubectl config use-context kind-hub  

create a member cluster CR on the hub cluster which allows the member cluster created on the setup step to join the fleet,

apiVersion: cluster.kubernetes-fleet.io/v1beta1
kind: MemberCluster
metadata:
  name: kind-cluster-1
spec:
  identity:
    name: fleet-member-agent-cluster-1
    kind: ServiceAccount
    namespace: fleet-system
    apiGroup: ""

get the membercluster to see if it has joined the fleet,

kubectl get memberclusters -A      

output is supposed to look like,

NAME             JOINED   AGE
kind-cluster-1   True     25m

Now we can go ahead and use the workload orchestration capabilities offered by fleet, please start with the concept to understand the details of various features offered by fleet.

Code of Conduct

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

Contributing

Support

Azure fleet is an open source project that is [not covered by the Microsoft Azure support policy][10]. [Please search open issues here][11], and if your issue isn't already represented please [open a new one][12]. The project maintainers will respond to the best of their abilities.

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
Package apis contains API interfaces for the fleet API group.
Package apis contains API interfaces for the fleet API group.
cluster/v1
+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=cluster.kubernetes-fleet.io
+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=cluster.kubernetes-fleet.io
cluster/v1beta1
+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=cluster.kubernetes-fleet.io
+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=cluster.kubernetes-fleet.io
placement/v1
+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=placement.kubernetes-fleet.io
+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=placement.kubernetes-fleet.io
placement/v1alpha1
+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=placement.kubernetes-fleet.io
+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=placement.kubernetes-fleet.io
placement/v1beta1
+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=placement.kubernetes-fleet.io
+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=placement.kubernetes-fleet.io
v1alpha1
+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=fleet.azure.com
+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=fleet.azure.com
cmd
hack
pkg
controllers/clusterresourcebindingwatcher
Package clusterresourcebindingwatcher features a controller to watch the clusterResourceBinding changes.
Package clusterresourcebindingwatcher features a controller to watch the clusterResourceBinding changes.
controllers/clusterresourceplacement
Package clusterresourceplacement features a controller to reconcile the clusterResourcePlacement changes.
Package clusterresourceplacement features a controller to reconcile the clusterResourcePlacement changes.
controllers/clusterresourceplacementwatcher
Package clusterresourceplacementwatcher features a controller to watch the clusterResourcePlacement changes.
Package clusterresourceplacementwatcher features a controller to watch the clusterResourcePlacement changes.
controllers/clusterschedulingpolicysnapshot
Package clusterschedulingpolicysnapshot features a controller to reconcile the clusterSchedulingPolicySnapshot object.
Package clusterschedulingpolicysnapshot features a controller to reconcile the clusterSchedulingPolicySnapshot object.
controllers/overrider
Package overrider features controllers to reconcile the override objects.
Package overrider features controllers to reconcile the override objects.
controllers/rollout
Package rollout features a controller to do rollout.
Package rollout features a controller to do rollout.
controllers/workgenerator
Package workgenerator features a controller to generate work objects based on resource binding objects.
Package workgenerator features a controller to generate work objects based on resource binding objects.
propertyprovider
Package propertyprovider features interfaces and other components that can be used to build a Fleet property provider.
Package propertyprovider features interfaces and other components that can be used to build a Fleet property provider.
propertyprovider/aks
Package aks features the AKS property provider for Fleet.
Package aks features the AKS property provider for Fleet.
propertyprovider/aks/controllers
Package controllers feature a number of controllers that are in use by the AKS property provider.
Package controllers feature a number of controllers that are in use by the AKS property provider.
propertyprovider/aks/trackers
Package trackers feature implementations that help track specific stats about Kubernetes resources, e.g., nodes and pods in the AKS property provider.
Package trackers feature implementations that help track specific stats about Kubernetes resources, e.g., nodes and pods in the AKS property provider.
scheduler
Package scheduler features the scheduler for Fleet workloads.
Package scheduler features the scheduler for Fleet workloads.
scheduler/clustereligibilitychecker
Package clustereligibilitychecker features a utility for verifying if a member cluster is eligible for resource placement.
Package clustereligibilitychecker features a utility for verifying if a member cluster is eligible for resource placement.
scheduler/framework
Package framework features the scheduler framework, which the scheduler runs to schedule a placement to most appropriate clusters.
Package framework features the scheduler framework, which the scheduler runs to schedule a placement to most appropriate clusters.
scheduler/framework/parallelizer
Package parallelizer features some utilities to help run tasks in parallel.
Package parallelizer features some utilities to help run tasks in parallel.
scheduler/framework/plugins/clusteraffinity
Package clusteraffinity features a scheduler plugin that enforces cluster affinity (if any) defined on a CRP.
Package clusteraffinity features a scheduler plugin that enforces cluster affinity (if any) defined on a CRP.
scheduler/framework/plugins/clustereligibility
Package clustereligibility features a scheduler plugin that filters out clusters that are not eligible for resource placement.
Package clustereligibility features a scheduler plugin that filters out clusters that are not eligible for resource placement.
scheduler/framework/plugins/sameplacementaffinity
Package sameplacementaffinity features a scheduler plugin that filters out any cluster that has been already scheduled/bounded to the resource placement and prefers the same cluster which has an obsolete binding.
Package sameplacementaffinity features a scheduler plugin that filters out any cluster that has been already scheduled/bounded to the resource placement and prefers the same cluster which has an obsolete binding.
scheduler/framework/plugins/topologyspreadconstraints
Package topologyspreadconstraints features a scheduler plugin that enforces the topology spread constraints (if any) defined on a CRP.
Package topologyspreadconstraints features a scheduler plugin that enforces the topology spread constraints (if any) defined on a CRP.
scheduler/framework/uniquename
package uniquename features some utilities that are used to generate unique names in use by the scheduler.
package uniquename features some utilities that are used to generate unique names in use by the scheduler.
scheduler/profile
Package profile holds the definition of a scheduling Profile.
Package profile holds the definition of a scheduling Profile.
scheduler/queue
Package queue features a scheduling queue, which keeps track of all placements for the scheduler to schedule.
Package queue features a scheduling queue, which keeps track of all placements for the scheduler to schedule.
scheduler/watchers/clusterresourceplacement
Package clusterresourceplacement features a controller that enqueues CRPs for the scheduler to process where the CRP is marked for deletion.
Package clusterresourceplacement features a controller that enqueues CRPs for the scheduler to process where the CRP is marked for deletion.
scheduler/watchers/clusterschedulingpolicysnapshot
Package clusterschedulingpolicysnapshot features a controller that enqueues CRPs for the scheduler to process where there is a change in their scheduling policy snapshots.
Package clusterschedulingpolicysnapshot features a controller that enqueues CRPs for the scheduler to process where there is a change in their scheduling policy snapshots.
scheduler/watchers/membercluster
Package membercluster features a controller that enqueues CRPs on member cluster changes.
Package membercluster features a controller that enqueues CRPs on member cluster changes.
utils/annotations
Package annotations provides the utils related to object annotations.
Package annotations provides the utils related to object annotations.
utils/condition
Package condition provides condition related utils.
Package condition provides condition related utils.
utils/defaulter
Package defaulter is an interface for setting default values for a resource.
Package defaulter is an interface for setting default values for a resource.
utils/labels
Package labels provides utils related to object labels.
Package labels provides utils related to object labels.
utils/overrider
Package overrider defines common utils for working with override.
Package overrider defines common utils for working with override.
utils/resource
Package resource defines common utils for working with kubernetes resources.
Package resource defines common utils for working with kubernetes resources.
utils/validator
Package validator provides utils to validate ClusterResourceOverride resources.
Package validator provides utils to validate ClusterResourceOverride resources.
webhook/clusterresourceoverride
Package clusterresourceoverride provides a validating webhook for the ClusterResourceOverride custom resource in the fleet API group.
Package clusterresourceoverride provides a validating webhook for the ClusterResourceOverride custom resource in the fleet API group.
webhook/resourceoverride
Package resourceoverride provides a validating webhook for the resourceoverride custom resource in the fleet API group.
Package resourceoverride provides a validating webhook for the resourceoverride custom resource in the fleet API group.
test
utils/controller
Package controller provides a fake controller for testing.
Package controller provides a fake controller for testing.
utils/informer
Package informer provides a fake informer manager for testing.
Package informer provides a fake informer manager for testing.
utils/keycollector
Package keycollector features a utility that is used for testing scheduler-related logic.
Package keycollector features a utility that is used for testing scheduler-related logic.
utils/resource
Package resource provides test data for testing.
Package resource provides test data for testing.

Jump to

Keyboard shortcuts

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