Skip to content
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: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ![RedKey Operator icon](docs/images/badge.png) RedKey Operator for Kubernetes
![RedKey Operator icon](docs/images/redkey-logo-50.png)
# RedKey Operator for Kubernetes

A **RedKey Cluster** is a key/value cluster using either [Redis Official Image](https://hub.docker.com/_/redis) or [Valkey Official Image](https://hub.docker.com/r/valkey/valkey/) images to create its nodes (note that all cluster nodes must use the same image).

Expand All @@ -12,13 +13,13 @@ RedKey operator is built using [kubebuilder](https://github.com/kubernetes-sigs/

- RedKey Cluster creation
- Cluster scaling up and down
- CLuster upgrading
- Cluster upgrading
- Update node pods image
- Update Redis configuration
- Update node pods resources
- Ensure cluster health
- Slots allocation
- Persistence
- Ephemeral cluster (pure cache-like behavior) or using persistence
- RedisGraph support

## Documentation
Expand All @@ -27,7 +28,11 @@ Refer to [operator guide](./docs/operator-guide/toc.md) to have an overview of t

If you are a developer, you'll find interesting information in the [developer guide](./docs/developer-guide.md).

Learn about [RedKey cluster status](./docs/redkey-cluster-status.md).
Learn about [RedKey Cluster Status and Substatus](./docs/redkey-cluster-status.md).

Discover [RedKey Robin](./docs/redkey-robin.md).

The importance of the [purgeKeysOnRebalance](./docs/purge-keys-on-rebalance.md) parameter.

## Versions

Expand Down
10 changes: 7 additions & 3 deletions docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ Before redeploying the webhook code using `make debug-webhook` you can delete th
Delete the operator and all associated resources with:

```shell
make delete-rdcl
make delete-rkcl
make undeploy
make uninstall
kubectl delete ns redkey-operator
Expand All @@ -360,10 +360,14 @@ kubectl delete ns redkey-operator
You can deploy a sample RedKey Cluster from `config/samples` folder running:

```shell
make apply-rdcl
make apply-rkcl
```

This will apply the manifest file to create an single node ephemeral RedKeyCluster object with `purgeKeysOnRebalance` set to **true**.
This will apply the manifest file to create a three nodes ephemeral RedKeyCluster object with `purgeKeysOnRebalance` set to **true**.

As [Redkey Robin](https://github.com/InditexTech/redkeyrobin) image is required to being able to deploy the RedKey cluster, you should ensure the image is available in your K8s cluster. You'll find how to build the image from the GitHub repository.

In order to set the image name to be used when creating your local RedKey cluster you can sen the environment variable `IMG_ROBIN`. The value set to this variable will be used to kustomize the manifests that will be applied to create the sample RedKeyCluster.

## Tests

Expand Down
Binary file removed docs/images/redis-status-creation-meet-rebalance.png
Binary file not shown.
Binary file removed docs/images/redis-status-error.png
Binary file not shown.
Binary file removed docs/images/redis-status-scale.png
Binary file not shown.
Binary file removed docs/images/redis-status-upgrade.png
Binary file not shown.
Binary file added docs/images/redkey-cluster-initialization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/redkey-logo-50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/redkey-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/redkey-operator-robin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions docs/purge-keys-on-rebalance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Key purge (purgeKeysOnRebalance)

When using RedKey Cluster as a cache (`ephemeral` parameter set to **true**), we have the option to tell the Operator whether we want to keep the keys when performing scaling or upgrade operations, or whether we want to discard them.

When using RedKey Cluster as a cache (ephemeral parameter set to true), we have the option to tell the Operator whether we want to keep the keys when performing scaling or upgrade operations, or whether we want to discard them.

Scaling or upgrade operations have a **high computational and time cost**, as they involve resharding or moving slots (and their keys) between nodes of the cluster itself.

In order to speed up these operations, a fast and slow mode has been implemented.

More details about the Status and Sustatus for these operations can be found [here](.redkey-cluster-status.md).

## Fast operations

The fast mode of scaling and upgrade operations implies a **total loss of the keys** stored in the RedKey Cluster.

In this mode, the Operator is actually recreating the RedKey Cluster, recreating the pods that make it up and relying on Robin to meet the new nodes, distribute the slots, and ensure that it remains in a healthy state.

The cluster will be properly scaled or have the updated configuration.

This is the fastest way to perform scaling and upgrade operations.

Quick operations will only be applied if the RedKey Cluster is set to `purgeKeysOnRebalance` set to **true**.

## Slow Operations

If we want to preserve keys during RedKey Cluster upgrades and scales, then we need to use slow operations. To do this, we must configure the cluster with `purgeKeysOnRebalance` set to **false**.

In this case, the Operator makes sure to move the slots (and their keys) from one node to another node or nodes within the cluster itself, before recreating that node or discarding it.

The necessary reharding operations involve a high cost, which is impacted if the cluster receives a lot of activity from clients.
Loading