Skip to content

Commit

Permalink
Update docs with changes KubeDB v2024.6.4 (#645)
Browse files Browse the repository at this point in the history
Signed-off-by: obaydullahmhs <[email protected]>
Signed-off-by: Tapajit Chandra Paul <[email protected]>
Signed-off-by: MobarakHsn <[email protected]>
Signed-off-by: Neaj Morshad <[email protected]>
Co-authored-by: Tapajit Chandra Paul <[email protected]>
Co-authored-by: MobarakHsn <[email protected]>
Co-authored-by: Neaj Morshad <[email protected]>
  • Loading branch information
4 people authored Jun 26, 2024
1 parent 08a72f0 commit b703e70
Show file tree
Hide file tree
Showing 65 changed files with 334 additions and 313 deletions.
5 changes: 3 additions & 2 deletions docs/examples/druid/quickstart/druid-quickstart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spec:
replicas: 1
historicals:
replicas: 1
storageType: Durable
storage:
accessModes:
- ReadWriteOnce
Expand All @@ -32,6 +33,7 @@ spec:
storageClassName: standard
middleManagers:
replicas: 1
storageType: Durable
storage:
accessModes:
- ReadWriteOnce
Expand All @@ -41,8 +43,7 @@ spec:
storageClassName: standard
routers:
replicas: 1
storageType: Durable
terminationPolicy: Delete
deletionPolicy: Delete
serviceTemplates:
- alias: primary
spec:
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/druid/quickstart/mysql-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
storage: 1Gi
init:
script:
configMap:
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/druid/quickstart/zk-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ spec:
storage:
resources:
requests:
storage: "100Mi"
storage: 1Gi
storageClassName: "standard"
accessModes:
- ReadWriteOnce
terminationPolicy: "WipeOut"
deletionPolicy: "WipeOut"
2 changes: 1 addition & 1 deletion docs/examples/ferretdb/quickstart/ferretdb-external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ spec:
name: ha-postgres
namespace: demo
pgPort: 5432
terminationPolicy: WipeOut
deletionPolicy: WipeOut
2 changes: 1 addition & 1 deletion docs/examples/ferretdb/quickstart/ferretdb-internal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ spec:
storage: 500Mi
backend:
externallyManaged: false
terminationPolicy: WipeOut
deletionPolicy: WipeOut
2 changes: 1 addition & 1 deletion docs/examples/kafka/clustering/kf-multinode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ spec:
storage: 1Gi
storageClassName: standard
storageType: Durable
terminationPolicy: DoNotTerminate
deletionPolicy: DoNotTerminate
2 changes: 1 addition & 1 deletion docs/examples/kafka/clustering/kf-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ spec:
storage: 1Gi
storageClassName: standard
storageType: Durable
terminationPolicy: DoNotTerminate
deletionPolicy: DoNotTerminate
2 changes: 1 addition & 1 deletion docs/examples/kafka/clustering/kf-topology.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ spec:
storage: 1Gi
storageClassName: standard
storageType: Durable
terminationPolicy: DoNotTerminate
deletionPolicy: DoNotTerminate
2 changes: 1 addition & 1 deletion docs/examples/kafka/connectcluster/kcc-distributed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ spec:
kafkaRef:
name: kafka-prod
namespace: demo
terminationPolicy: WipeOut
deletionPolicy: WipeOut
2 changes: 1 addition & 1 deletion docs/examples/kafka/monitoring/kf-with-monitoring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ spec:
release: prometheus
interval: 10s
storageType: Durable
terminationPolicy: WipeOut
deletionPolicy: WipeOut
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ spec:
version: "2022-cu12"
replicas: 1
storageType: Durable
tls:
issuerRef:
name: mssqlserver-issuer
kind: Issuer
apiGroup: "cert-manager.io"
clientTLS: false
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
terminationPolicy: Delete
deletionPolicy: WipeOut
12 changes: 6 additions & 6 deletions docs/examples/pgbouncer/custom-version/pgbouncer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ metadata:
spec:
version: "1.17.0"
replicas: 1
databases:
- alias: "postgres"
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
database:
syncUsers: true
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
connectionPool:
port: 2580
reservePoolSize: 5
12 changes: 6 additions & 6 deletions docs/examples/pgbouncer/monitoring/builtin-prom-pgbouncer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ metadata:
spec:
version: "1.17.0"
replicas: 1
databases:
- alias: "postgres"
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
database:
syncUsers: true
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
connectionPool:
maxClientConnections: 20
reservePoolSize: 5
Expand Down
12 changes: 6 additions & 6 deletions docs/examples/pgbouncer/monitoring/coreos-prom-pgbouncer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ metadata:
spec:
version: "1.17.0"
replicas: 1
databases:
- alias: "postgres"
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
database:
syncUsers: true
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
connectionPool:
maxClientConnections: 20
reservePoolSize: 5
Expand Down
17 changes: 6 additions & 11 deletions docs/examples/pgbouncer/pb-overview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,12 @@ metadata:
spec:
version: "1.17.0"
replicas: 1
databases:
- alias: "postgres"
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
- alias: "mydb"
databaseName: "tmpdb"
databaseRef:
name: "quick-postgres"
namespace: demo
database:
syncUsers: true
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
connectionPool:
maxClientConnections: 20
reservePoolSize: 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ metadata:
namespace: demo
spec:
version: "1.17.0"
databases:
- alias: "postgres"
database:
syncUsers: true
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
Expand Down
17 changes: 6 additions & 11 deletions docs/examples/pgbouncer/quickstart/pgbouncer-server-mod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,12 @@ metadata:
spec:
version: "1.17.0"
replicas: 1
databases:
- alias: "postgres"
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
- alias: "tmpdb"
databaseName: "mydb"
databaseRef:
name: "quick-postgres"
namespace: demo
database:
syncUsers: true
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
connectionPool:
maxClientConnections: 20
reservePoolSize: 5
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/pgbouncer/quickstart/pgbouncer-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ metadata:
spec:
version: "1.18.0"
replicas: 1
databases:
- alias: "postgres"
database:
syncUsers: true
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/pgpool/quickstart/quick-pgpool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ spec:
sslMode: disable
clientAuthMode: md5
syncUsers: true
terminationPolicy: WipeOut
deletionPolicy: WipeOut
2 changes: 1 addition & 1 deletion docs/examples/rabbitmq/quickstart/quickstart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
storage: 1Gi
storageClassName: standard
storageType: Durable
terminationPolicy: WipeOut # DoNotTerminate(blocks deletion), Halt( retains pvc,secret), Delete (retains secret)
deletionPolicy: WipeOut # DoNotTerminate(blocks deletion), Halt( retains pvc,secret), Delete (retains secret)
podTemplate:
spec:
containers:
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/singlestore/quickstart/quickstart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ spec:
licenseSecret:
name: license-secret
storageType: Durable
terminationPolicy: WipeOut
deletionPolicy: WipeOut
2 changes: 1 addition & 1 deletion docs/examples/zookeeper/quickstart/zoo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ spec:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
terminationPolicy: "WipeOut"
deletionPolicy: "WipeOut"
20 changes: 13 additions & 7 deletions docs/guides/druid/quickstart/overview/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,18 @@ Another external dependency of Druid is deep storage where the segments are stor
In this tutorial, we will run a `minio-server` as deep storage in our local `kind` cluster using `minio-operator` and create a bucket named `druid` in it, which the deployed druid database will use.

```bash

$ helm repo add minio https://operator.min.io/
$ helm repo update minio
$ helm upgrade --install --namespace "minio-operator" --create-namespace "minio-operator" minio/operator --set operator.replicaCount=1

$ helm upgrade --install --namespace "demo" --create-namespace druid-minio minio/tenant \
--set tenant.pools[0].servers=1 \
--set tenant.pools[0].volumesPerServer=1 \
--set tenant.pools[0].size=1Gi \
--set tenant.certificate.requestAutoCert=false \
--set tenant.buckets[0].name="druid"
--set tenant.buckets[0].name="druid" \
--set tenant.pools[0].name="default"

```

Expand All @@ -133,6 +137,7 @@ stringData:
druid.s3.accessKey: "minio"
druid.s3.secretKey: "minio123"
druid.s3.protocol: "http"
druid.s3.enablePathStyleAccess: "true"
druid.s3.endpoint.signingRegion: "us-east-1"
druid.s3.endpoint.url: "http://myminio-hl.demo.svc.cluster.local:9000/"
```
Expand Down Expand Up @@ -178,6 +183,7 @@ spec:
replicas: 1
historicals:
replicas: 1
storageType: Durable
storage:
accessModes:
- ReadWriteOnce
Expand All @@ -187,6 +193,7 @@ spec:
storageClassName: standard
middleManagers:
replicas: 1
storageType: Durable
storage:
accessModes:
- ReadWriteOnce
Expand All @@ -196,8 +203,7 @@ spec:
storageClassName: standard
routers:
replicas: 1
storageType: Durable
terminationPolicy: Delete
deletionPolicy: Delete
serviceTemplates:
- alias: primary
spec:
Expand All @@ -212,7 +218,7 @@ Here,
- `spec.version` - is the name of the DruidVersion CR. Here, a Druid of version `28.0.1` will be created.
- `spec.storageType` - specifies the type of storage that will be used for Kafka. It can be `Durable` or `Ephemeral`. The default value of this field is `Durable`. If `Ephemeral` is used then KubeDB will create the Druid using `EmptyDir` volume. In this case, you don't have to specify `spec.storage` field. This is useful for testing purposes.
- `spec.storage` specifies the StorageClass of PVC dynamically allocated to store data for this Druid instance. This storage spec will be passed to the PetSet created by the KubeDB operator to run Druid pods. You can specify any StorageClass available in your cluster with appropriate resource requests. If you don't specify `spec.storageType: Ephemeral`, then this field is required.
- `spec.terminationPolicy` specifies what KubeDB should do when a user try to delete Druid CR. Termination policy `Delete` will delete the database pods and PVC when the Druid CR is deleted.
- `spec.deletionPolicy` specifies what KubeDB should do when a user try to delete Druid CR. Deletion policy `Delete` will delete the database pods and PVC when the Druid CR is deleted.

> Note: `spec.storage` section is used to create PVC for database pod. It will create PVC with storage size specified in the `storage.resources.requests` field. Don't specify `limits` here. PVC does not get resized automatically.

Expand Down Expand Up @@ -367,7 +373,7 @@ Spec:
Metadata:
Spec:
Storage Type: Ephemeral
Termination Policy: Delete
Deletion Policy: Delete
Topology:
Brokers:
Pod Placement Policy:
Expand Down Expand Up @@ -744,7 +750,7 @@ You can use this web console for loading data, managing datasources and tasks, a
To clean up the Kubernetes resources created by this tutorial, run:

```bash
$ kubectl patch -n demo druid druid-quickstart -p '{"spec":{"terminationPolicy":"WipeOut"}}' --type="merge"
$ kubectl patch -n demo druid druid-quickstart -p '{"spec":{"deletionPolicy":"WipeOut"}}' --type="merge"
kafka.kubedb.com/druid-quickstart patched
$ kubectl delete dr druid-quickstart -n demo
Expand All @@ -759,7 +765,7 @@ namespace "demo" deleted
If you are just testing some basic functionalities, you might want to avoid additional hassles due to some safety features that are great for the production environment. You can follow these tips to avoid them.

1. **Use `storageType: Ephemeral`**. Databases are precious. You might not want to lose your data in your production environment if the database pod fails. So, we recommend to use `spec.storageType: Durable` and provide storage spec in `spec.storage` section. For testing purposes, you can just use `spec.storageType: Ephemeral`. KubeDB will use [emptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) for storage. You will not require to provide `spec.storage` section.
2. **Use `terminationPolicy: WipeOut`**. It is nice to be able to resume the database from the previous one. So, we preserve all your `PVCs` and auth `Secrets`. If you don't want to resume the database, you can just use `spec.terminationPolicy: WipeOut`. It will clean up every resource that was created with the Druid CR. For more details, please visit [here](/docs/guides/kafka/concepts/kafka.md#specterminationpolicy).
2. **Use `deletionPolicy: WipeOut`**. It is nice to be able to resume the database from the previous one. So, we preserve all your `PVCs` and auth `Secrets`. If you don't want to resume the database, you can just use `spec.deletionPolicy: WipeOut`. It will clean up every resource that was created with the Druid CR. For more details, please visit [here](/docs/guides/kafka/concepts/kafka.md#specdeletionPolicy).

## Next Steps

Expand Down
Loading

0 comments on commit b703e70

Please sign in to comment.