DKP Insights BYOS (Bring Your Own Storage) to Insights
Ceph can be used as the CSI Provisioner in some environments. For environments where Ceph was installed before installing DKP, you can reuse your existing Ceph installation to satisfy the storage requirements of DKP Applications.
This guide assumes you have a Ceph cluster that is not managed by DKP.
Refer to Rook Ceph Configuration for information on how to configure the Ceph instance installed by DKP for use by DKP platform applications.
This guide also assumes that you have already disabled DKP Managed Ceph. For more information, refer to BYOS (Bring Your Own Storage) to DKP Clusters | DisableDKPManagedCeph.
Requirements
You only need to disable the Object Bucket claim if you are using an S3 Provider that does not use an object bucket claim.
If you disable the Object Bucket Claim, then a S3 bucket needs to be created.
If you create the bucket, it must support the following:
At least 1GB of storage
TTL is set to a value of “n days” per S3 spec example: 7 Days. Insights will set TTL to this value on initialization and it fails if it can not be set.
It is our assumption that the storage is hosted in the same cluster with fast networking access.
The bandwidth usage is ~100Mb over the course of a day
Latency and speed should be <10 ms and >1Gbs
Create a Secret to support BYOS for Insights
You need to create a secret with the AWS S3 credentials for the S3 bucket created for Insights. Create this in the same namespace where you installed DKP Insights
# Set to the workspace namespace insights is installed in
export WORKSPACE_NAMESPACE=kommander
# Replace your AWS S3 credentials
kubectl create secret dkp-insights -n ${WORKSPACE_NAMESPACE} \
--from-literal='AWS_ACCESS_KEY_ID=<Insert AWS Key Here>' \
--from-literal='AWS_SECRET_ACCESS_KEY=<Insert AWS Secret Access Key Here>' \
Helm Values for Insights Storage
Below are the Helm Values for Insights storage along with a description of each component.
backend:
s3:
port: 80
region: "us-east-1"
endpoint: "rook-ceph-rgw-dkp-object-store"
bucketSize: "1G"
storageClassName: dkp-object-store
enableObjectBucketClaim: true
cleanup:
insightsTTL: "168h"
Name | Default Value | Description |
---|---|---|
|
| Port of S3 storage provider. |
|
| AWS Region for S3 storage provider. May not be needed for all providers. (Set to dummy value.) |
|
| Endpoint URL for S3 storage provider. Exclude HTTP:// |
|
| Bucket size of bucket created in with Object Bucket Claim. |
|
| Storage class to use for the Object Bucket Claim. |
|
| To bring your own storage other than Ceph, set to false. This will require you to create your own bucket manually outside of the insights install. |
|
| The time in hours to keep insights data in database and S3. For S3 this is rounded up to the nearest day. |
Object bucket claims (OBC) are a custom resource that declares object storage.
Ceph is one provider that uses custom resource definitions (CRD).
If you are using Ceph or another provider that supports object bucket claims, then you want to leave it on. This creates an OBC as part of installation. If you want to use S3 directly or create the storage container manually, then you should turn it off.
UI Install
For, Insights installed with special storage, add the following in the UI:
CLI Install
Follow the steps below to configure storage for Insights via the CLI:
Air-gapped Environment Install
Follow the steps below to configure storage for Insights in air-gapped environments:
Manually Create Object Bucket Claim (Optional)
If you need to manually create an OBC, such as when you do not want the Helm Chart to automatically generate one, follow these steps:
Creating an ObjectBucketClaim
If needed, an
ObjectBucketClaim
can be created manually in the same namespace asdkp-insights
.
This results in the creation ofObjectBucket
, which creates aSecret
that is consumed bydkp-insights
.For
dkp-insights
:CODEcat <<EOF | kubectl apply -f - apiVersion: objectbucket.io/v1alpha1 kind: ObjectBucketClaim metadata: name: dkp-insights namespace: ${NAMESPACE} spec: additionalConfig: maxSize: 1G bucketName: dkp-insights storageClassName: dkp-object-store EOF
Bucket name cannot be changed.
The storage class and the maxSize can be configured, as needed.