From f67823235aa54698b5c177f665755ad9b4753642 Mon Sep 17 00:00:00 2001 From: "kaitlyn.michael" Date: Tue, 2 Nov 2021 15:21:58 -0500 Subject: [PATCH 1/4] added redisUpgradePolicy --- content/kubernetes/reference/db-options.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/content/kubernetes/reference/db-options.md b/content/kubernetes/reference/db-options.md index 7ea16eda527..6c64d5cc2d5 100644 --- a/content/kubernetes/reference/db-options.md +++ b/content/kubernetes/reference/db-options.md @@ -88,6 +88,19 @@ redisEnterpriseCluster: name: rec ``` +### `redisUpgradePolicy` + +[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]({{}}) +- [Upgrade policy values]({{}}) + ### `replication` A boolean that indicates whether in-memory [database replication]({{< relref "/rs/concepts/high-availability/replication.md">}}) is enabled (default: `false`). From c7556a0d5ca8a306def95e5be20d27a2555f50f3 Mon Sep 17 00:00:00 2001 From: "kaitlyn.michael" Date: Tue, 2 Nov 2021 16:02:03 -0500 Subject: [PATCH 2/4] moved from REDB to REC options sections --- .../kubernetes/reference/cluster-options.md | 135 ++++++++++-------- content/kubernetes/reference/db-options.md | 15 +- 2 files changed, 74 insertions(+), 76 deletions(-) diff --git a/content/kubernetes/reference/cluster-options.md b/content/kubernetes/reference/cluster-options.md index 7cc89b3b01f..b779ac5e460 100644 --- a/content/kubernetes/reference/cluster-options.md +++ b/content/kubernetes/reference/cluster-options.md @@ -11,63 +11,31 @@ 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 database 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. - -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". @@ -80,43 +48,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 >}} - - - [`limits`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec): +{{< /note >}} - The max resources for a Redis node (similar to pod limits). +- [`limits`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md#redisenterpriseclusterspec): - For example: + The max resources for a Redis node (similar to pod limits). - ```yaml - limits: - cpu: "4000m" - memory: 4Gi - ``` + For example: + ```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. @@ -129,3 +96,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]({{}}) 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]({{}}) +- [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. \ No newline at end of file diff --git a/content/kubernetes/reference/db-options.md b/content/kubernetes/reference/db-options.md index 6c64d5cc2d5..96e6e13fe77 100644 --- a/content/kubernetes/reference/db-options.md +++ b/content/kubernetes/reference/db-options.md @@ -13,7 +13,7 @@ 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. ### `databaseSecretName` @@ -88,19 +88,6 @@ redisEnterpriseCluster: name: rec ``` -### `redisUpgradePolicy` - -[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]({{}}) -- [Upgrade policy values]({{}}) - ### `replication` A boolean that indicates whether in-memory [database replication]({{< relref "/rs/concepts/high-availability/replication.md">}}) is enabled (default: `false`). From 423dfd2f55643400b3656c91dd0a494bc6602980 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael <76962844+kaitlynmichael@users.noreply.github.com> Date: Tue, 2 Nov 2021 16:05:56 -0500 Subject: [PATCH 3/4] Update content/kubernetes/reference/cluster-options.md --- content/kubernetes/reference/cluster-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/kubernetes/reference/cluster-options.md b/content/kubernetes/reference/cluster-options.md index b779ac5e460..c40fa1523bb 100644 --- a/content/kubernetes/reference/cluster-options.md +++ b/content/kubernetes/reference/cluster-options.md @@ -11,7 +11,7 @@ aliases: [ /kubernetes/reference/cluster-options/ ] --- -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 database via the admin console or `rladmin` commands. +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. ### `name`: `rec` From 46a9c5c4b42e6cef3d40b180fbba9a64d3f43b1d Mon Sep 17 00:00:00 2001 From: "kaitlyn.michael" Date: Tue, 2 Nov 2021 16:05:21 -0500 Subject: [PATCH 4/4] added links to API spec --- content/kubernetes/reference/cluster-options.md | 2 ++ content/kubernetes/reference/db-options.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/content/kubernetes/reference/cluster-options.md b/content/kubernetes/reference/cluster-options.md index c40fa1523bb..979f448cd21 100644 --- a/content/kubernetes/reference/cluster-options.md +++ b/content/kubernetes/reference/cluster-options.md @@ -13,6 +13,8 @@ aliases: [ --- 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. +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). + ### `name`: `rec` This is the cluster name that the operator uses to name various diff --git a/content/kubernetes/reference/db-options.md b/content/kubernetes/reference/db-options.md index 96e6e13fe77..293f70daf96 100644 --- a/content/kubernetes/reference/db-options.md +++ b/content/kubernetes/reference/db-options.md @@ -15,6 +15,8 @@ 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. 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` A string containing the name of a secret that contains the desired database password.