Skip to content

Commit

Permalink
Add sharding to API docs
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
  • Loading branch information
stefanprodan committed Sep 16, 2024
1 parent 394faa7 commit 781ff6e
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ removes the operational burden of managing Flux across fleets of clusters by ful
installation, configuration, and upgrade of the Flux controllers based on a declarative API.

**Advanced Configuration** - The operator simplifies the configuration of Flux multi-tenancy lockdown,
vertical scaling, persistent storage, and allows fine-tuning the Flux controllers with Kustomize patches.
The operator streamlines the transition from Git as the delivery mechanism for the cluster
desired state to OCI artifacts and S3-compatible storage.
sharding, horizontal and vertical scaling, persistent storage, and allows fine-tuning the Flux
controllers with Kustomize patches. The operator streamlines the transition from Git as the delivery
mechanism for the cluster desired state to OCI artifacts and S3-compatible storage.

**Deep Insights** - The operator provides deep insights into the delivery pipelines managed by Flux,
including detailed reports and Prometheus metrics about the Flux controllers
Expand Down
2 changes: 1 addition & 1 deletion api/v1/fluxinstance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ type FluxInstanceSpec struct {
// and Flux Kustomization are created to sync the cluster state
// with the source repository.
// +optional
Sync *Sync `json:"sync"`
Sync *Sync `json:"sync,omitempty"`
}

// Distribution specifies the version and container registry to pull images from.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ metadata:
spec:
displayName: Flux Operator
description: >-
[Flux](https://fluxcd.io) is a leading GitOps Continuous Delivery
tool
[Flux](https://fluxcd.io) is a leading GitOps Continuous Delivery tool
used to streamline and automate application deployments on Kubernetes.
Flux enables teams to achieve a reliable and auditable delivery process
while promoting collaboration and traceability across different environments.
Expand All @@ -125,17 +124,15 @@ spec:
For more information about the CNCF-graduated Flux project, please see
the [Flux architecture overview](https://fluxcd.control-plane.io/guides/flux-architecture/).
### Operator Capabilities
The [Flux Operator](https://github.com/controlplaneio-fluxcd/flux-operator) provides a
declarative API for the installation, configuration and upgrade of CNCF Flux
and the ControlPlane [enterprise distribution](https://fluxcd.control-plane.io/).
The operator allows the configuration of Flux multi-tenancy lockdown, network policies,
persistent storage, vertical scaling, custom patches, and the synchronization of the
cluster state from Git repositories, OCI artifacts and S3-compatible storage.
persistent storage, sharding, vertical scaling, custom patches, and the synchronization
of the cluster state from Git repositories, OCI artifacts and S3-compatible storage.
The Flux Operator supervises the Flux controllers and provides a unified view
of all the Flux resources that define the GitOps workflows for the target cluster.
Expand All @@ -144,7 +141,6 @@ spec:
### OpenShift Support
The Flux Operator should be installed in a dedicated namespace, e.g. `flux-system`.
To deploy Flux on OpenShift clusters, create a `FluxInstance` custom resource
Expand Down
46 changes: 46 additions & 0 deletions docs/api/v1/fluxinstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,52 @@ spec:

The `.spec.storage.size` field is required and specifies the size of the persistent volume claim.

### Sharding configuration

The `.spec.sharding` field is optional and specifies the sharding configuration for the Flux controllers.

Example:

```yaml
spec:
sharding:
key: "sharding.fluxcd.io/key"
shards:
- "shard1"
- "shard2"
```

For each shard, the operator will create a separate set of controllers, e.g.:

```console
$ kubectl -n flux-system get deployments -l app.kubernetes.io/part-of=flux
NAME
source-controller
source-controller-shard1
source-controller-shard2
kustomize-controller
kustomize-controller-shard1
kustomize-controller-shard2
helm-controller
helm-controller-shard1
helm-controller-shard2
```

Note that only the `source-controller`, `kustomize-controller` and `helm-controller` controllers
support sharding.

To assign a resource to a specific shard, add the `sharding.fluxcd.io/key` label with the shard value,
e.g.: `sharding.fluxcd.io/key: shard1`.

#### Sharding key

The `.spec.sharding.key` field is optional and specifies the sharding key label to use for the Flux controllers.
By default, the key is set to `sharding.fluxcd.io/key`.

#### Shards

The `.spec.sharding.shards` field is required and specifies the list of sharding values to use for the Flux controllers.

### Kustomize patches

The `.spec.kustomize.patches` field is optional and specifies the Kustomize patches to apply to the Flux controllers.
Expand Down

0 comments on commit 781ff6e

Please sign in to comment.