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

Doc-935 add redisUpgradePolicy to REC options #1645

Merged
merged 4 commits into from
Nov 3, 2021
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
135 changes: 74 additions & 61 deletions content/kubernetes/reference/cluster-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,63 +11,33 @@ aliases: [
/kubernetes/reference/cluster-options/
]
---
A Redis Enterprise cluster is defined in a Custom Resource Definition (CRD).
The default format is a YAML definition such as:
A Redis Enterprise cluster (REC) is defined in a custom resource definition (CRD). The REC options are specified in the `spec` section of the custom resource. Any field not specified in the custom resource will be set to default values by the operator. Changes made to the custom resource will override changes made to the cluster via the admin console or `rladmin` commands.

```yaml
apiVersion: app.redislabs.com/v1
kind: RedisEnterpriseCluster
metadata:
name: rec
namespace: my-project
spec:
nodes: 3
persistentSpec:
enabled: true
uiServiceType: ClusterIP
username: demo@redislabs.com
redisEnterpriseNodeResources:
limits:
cpu: 4000m
memory: 4Gi
requests:
cpu: 4000m
memory: 4Gi
redisEnterpriseImageSpec:
imagePullPolicy: IfNotPresent
repository: redislabs/redis
versionTag: 6.0.6-39.rhel7-openshift
```

This example may be useful to get started with a test or development deployment.
You can modify it for your required deployment use case.
This file and other references are available in the [RedisLabs/redis-enterprise-k8s-docs](https://github.com/RedisLabs/redis-enterprise-k8s-docs) GitHub repository.
The most common options you might specify are listed below. For a full list of options, see the [Redis Enterprise Cluster API](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md).

Here are the main fields for you to review and edit:

- `name`: `rec`
### `name`: `rec`

This is the cluster name that the operator uses to name various
resources in the Kubernetes cluster and also name the CRD.

{{< note >}}

The name is restricted to the value "rec" in the current release because of the way that service accounts are created.
There is a binding between the SCC and the service account.
You can create this binding manually, but we do not recommend it.

{{< /note >}}

- [`nodes`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec): `nnn`
### [`nodes`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec): `nnn`

This [must be an odd number](https://redislabs.com/redis-enterprise/technology/highly-available-redis/) that is 3 or higher.
- [`uiServiceType`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec): `service_type`

### [`uiServiceType`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec): `service_type`

This controls how the Redis Enterprise UI is exposed on the cluster.
The service_type must be either `ClusterIP` or `LoadBalancer` (default: `ClusterIP`).
This is an optional configuration based on [k8s service types](https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/).

- [`persistentSpec`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec):
### [`persistentSpec`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec):

You can add a `storageClassName` that specifies the [Storage Class](https://kubernetes.io/docs/concepts/storage/storage-classes/) used for your nodes’ persistent disks. For example, AWS uses “gp2” as a default, GKE uses “standard” and Azure uses "default".

Expand All @@ -80,43 +50,42 @@ You can create this binding manually, but we do not recommend it.
storageClassName: "gp2"
```

- [`redisEnterpriseNodeResources`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec):
### [`redisEnterpriseNodeResources`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec):

The [compute resources](https://docs.openshift.com/enterprise/3.2/dev_guide/compute_resources.html#dev-compute-resources) required for each node (see `limits` and `requests`).
The [compute resources](https://docs.openshift.com/enterprise/3.2/dev_guide/compute_resources.html#dev-compute-resources) required for each node (see `limits` and `requests`).

{{< note >}}
{{< note >}}
We recommend that resource limits equal requests ([Learn why](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/topics.md#guaranteed-quality-of-service)).
{{< /note >}}
{{< /note >}}

- [`limits`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec):
- [`limits`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec):

The max resources for a Redis node (similar to pod limits).
The max resources for a Redis node (similar to pod limits).

For example:
For example:
```yaml
limits:
cpu: "4000m"
memory: 4Gi
```

```yaml
limits:
cpu: "4000m"
memory: 4Gi
```
The default is 4 cores (4000m) and 4GB (4Gi).

The default is 4 cores (4000m) and 4GB (4Gi).
- [`requests`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec):

- [`requests`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec):
The minimum resources for a Redis node (similar to pod requests).

The minimum resources for a Redis node (similar to pod requests).
For example:

For example:

```yaml
requests:
cpu: "4000m"
memory: 4Gi
```
```yaml
requests:
cpu: "4000m"
memory: 4Gi
```

The default is 4 cores (4000m) and 4GB (4Gi).
The default is 4 cores (4000m) and 4GB (4Gi).

- [`redisEnterpriseImageSpec`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#imagespec):
### [`redisEnterpriseImageSpec`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#imagespec):

This configuration controls the Redis Enterprise version used, and where it is fetched from. This is an optional field. The Operator automatically uses the matching RHEL image version for the release.

Expand All @@ -129,3 +98,47 @@ We recommend that resource limits equal requests ([Learn why](https://github.com
```

The version tag is as it appears on your repository, such as in [DockerHub](https://hub.docker.com/r/redislabs/redis/).

### `redisUpgradePolicy`

[Redis upgrade policy]({{<relref "/rs/installing-upgrading/upgrading.md#redis-upgrade-policy">}}) that controls the default Redis database version when creating or updating databases.

The supported values are:

- `major` : limits Redis database version to the most recent major release
- `latest`: sets default database version to the latest minor release

More info:
- [Redis upgrade policy]({{<relref "/rs/installing-upgrading/upgrading.md#redis-upgrade-policy">}})
- [Upgrade policy values]({{<relref "/rs/installing-upgrading/upgrading.md#upgrade-policy-values">}})

## Sample REC custom resource

```yaml
apiVersion: app.redislabs.com/v1
kind: RedisEnterpriseCluster
metadata:
name: rec
namespace: my-project
spec:
nodes: 3
persistentSpec:
enabled: true
uiServiceType: ClusterIP
username: demo@redislabs.com
redisEnterpriseNodeResources:
limits:
cpu: 4000m
memory: 4Gi
requests:
cpu: 4000m
memory: 4Gi
redisEnterpriseImageSpec:
imagePullPolicy: IfNotPresent
repository: redislabs/redis
versionTag: 6.0.6-39.rhel7-openshift
```

This example may be useful to get started with a test or development deployment.
You can modify it for your required deployment use case.
This file and other references are available in the [RedisLabs/redis-enterprise-k8s-docs](https://github.com/RedisLabs/redis-enterprise-k8s-docs) GitHub repository.
4 changes: 3 additions & 1 deletion content/kubernetes/reference/db-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ aliases: [
---

The database options are specified in the `spec` section of the database custom resource.
These options include options that you can change and options that are created by the controller for applications or developers. For example, the database connection information is stored in a secret.
These options include options that you can change and options that are created by the controller for applications or developers. Changes made to the REDB custom resource will override changes made to the database via the admin console or `rladmin` commands.

The most common options are listed below. For a complete list of options, see [Redis Enterprise Database API](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_database_api.md).

### `databaseSecretName`

Expand Down