Skip to content

Commit

Permalink
Revert "Update concpets for redissentinel"
Browse files Browse the repository at this point in the history
This reverts commit af50a0f.
  • Loading branch information
Neaj-Morshad-101 committed Aug 20, 2024
1 parent af50a0f commit 8370849
Showing 1 changed file with 13 additions and 36 deletions.
49 changes: 13 additions & 36 deletions docs/guides/redis/concepts/redissentinel.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:
imagePullSecrets:
- name: regcred
containers:
- name: redissentinel
- name: redis
args:
- "--loglevel verbose"
env:
Expand Down Expand Up @@ -248,9 +248,9 @@ KubeDB accept following fields to set in `spec.podTemplate:`
- controller:
- annotations (petset's annotation)
- spec:
- containers
- volumes
- podPlacementPolicy
- args
- env
- resources
- initContainers
- imagePullSecrets
- nodeSelector
Expand All @@ -265,37 +265,14 @@ KubeDB accept following fields to set in `spec.podTemplate:`
- readinessProbe
- lifecycle

You can check out the full list [here](https://github.com/kmodules/offshoot-api/blob/master/api/v2/types.go#L26C1-L279C1).
Uses of some field of `spec.podTemplate` is described below,

#### spec.podTemplate.spec.tolerations
#### spec.podTemplate.spec.args
`spec.podTemplate.spec.args` is an optional field. This can be used to provide additional arguments to database installation.

The `spec.podTemplate.spec.tolerations` is an optional field. This can be used to specify the pod's tolerations.
### spec.podTemplate.spec.env

#### spec.podTemplate.spec.volumes

The `spec.podTemplate.spec.volumes` is an optional field. This can be used to provide the list of volumes that can be mounted by containers belonging to the pod.

#### spec.podTemplate.spec.podPlacementPolicy

`spec.podTemplate.spec.podPlacementPolicy` is an optional field. This can be used to provide the reference of the podPlacementPolicy. This will be used by our Petset controller to place the db pods throughout the region, zone & nodes according to the policy. It utilizes kubernetes affinity & podTopologySpreadContraints feature to do so.




#### spec.podTemplate.spec.containers

The `spec.podTemplate.spec.containers` can be used to provide the list containers and their configurations for to the database pod. some of the fields are described below,

##### spec.podTemplate.spec.containers[].name
The `spec.podTemplate.spec.containers[].name` field used to specify the name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.

##### spec.podTemplate.spec.containers[].args
`spec.podTemplate.spec.containers[].args` is an optional field. This can be used to provide additional arguments to database installation.

##### spec.podTemplate.spec.containers[].env

`spec.podTemplate.spec.containers[].env` is an optional field that specifies the environment variables to pass to the Redis containers.
`spec.podTemplate.spec.env` is an optional field that specifies the environment variables to pass to the Redis docker image.

Note that, KubeDB does not allow to update the environment variables. If you try to update environment variables, KubeDB operator will reject the request with following error,

Expand All @@ -311,13 +288,9 @@ name
namespace
spec.storage
spec.podTemplate.spec.nodeSelector
spec.podTemplate.spec.containers[].env
spec.podTemplate.spec.env
```

##### spec.podTemplate.spec.containers[].resources

`spec.podTemplate.spec.containers[].resources` is an optional field. This can be used to request compute resources required by containers of the database pods. To learn more, visit [here](http://kubernetes.io/docs/user-guide/compute-resources/).

#### spec.podTemplate.spec.imagePullSecret

`KubeDB` provides the flexibility of deploying Redis server from a private Docker registry. To learn how to deploy Redis from a private registry, please visit [here](/docs/guides/redis/private-registry/using-private-registry.md).
Expand All @@ -336,6 +309,10 @@ spec.podTemplate.spec.containers[].env

If a service account name is given, and there's an existing service account by that name, the KubeDB operator will use that existing service account. Since this service account is not managed by KubeDB, users are responsible for providing necessary access permissions manually. Follow the guide [here](/docs/guides/redis/custom-rbac/using-custom-rbac.md) to grant necessary permissions in this scenario.

#### spec.podTemplate.spec.resources

`spec.podTemplate.spec.resources` is an optional field. This can be used to request compute resources required by the database pods. To learn more, visit [here](http://kubernetes.io/docs/user-guide/compute-resources/).

### spec.serviceTemplates

You can also provide a template for the services created by KubeDB operator for Redis server through `spec.serviceTemplates`. This will allow you to set the type and other properties of the services.
Expand Down

0 comments on commit 8370849

Please sign in to comment.