Open Source declarative disk configuration system for Kubernetes
The end-2-end build includes:
Please note: We take security and users' trust seriously. If you believe you have found a security issue in Discoblocks, please responsibly disclose by following the security policy.
This is the home of Discoblocks, an open-source declarative disk configuration system for Kubernetes helping to automate CRUD (Create, Read, Update, Delete) operations for cloud disk device resources attached to Kubernetes cluster nodes.
Some call storage snorage because they believe it is boring... but we could have fun and dance with the block devices!
Discoblocks can be leveraged by cloud native data management platform (like Ondat.io) to management the backend disks in the cloud.
When using such data management platform to overcome the block disk device limitation from hyperscalers, a new set of manual operational tasks needs to be considered like:
At the current stage, Discoblocks is leveraging the available hyperscaler CSI (Container Storage Interface) within the Kubernetes cluster to:
Note: that an application could be using Discoblocks to get persistent storage but this option would not be safe for production as there will not be any data platform management to address high availability, replication, fencing, encryption, ...
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.0/cert-manager.yaml
cat <<EOF | kubectl apply -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ebs-sc
provisioner: ebs.csi.aws.com
parameters:
type: gp3
allowVolumeExpansion: true
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
EOF
kubectl apply -f https://github.com/ondat/discoblocks/releases/download/v[VERSION]/discoblocks-bundle.yaml
cat <<EOF | kubectl apply -f -
apiVersion: discoblocks.ondat.io/v1
kind: DiskConfig
metadata:
name: nginx
spec:
storageClassName: ebs-sc
capacity: 1Gi
mountPointPattern: /usr/share/nginx/html/data
nodeSelector:
matchLabels:
kubernetes.io/os: linux
podSelector:
app: nginx
policy:
upscaleTriggerPercentage: 80
maximumCapacityOfDisk: 2Gi
maximumNumberOfDisks: 3
coolDown: 10m
EOF
kubectl apply create deployment --image=nginx nginx
kubectl logs -n kube-system deploy/discoblocks-controller-manager
kubectl get diskconfig [DISK_CONFIG_NAME] -o yaml | grep " message: "
kubectl get pvc -l discoblocks=[DISK_CONFIG_NAME]
kubectl get pvc -l 'discoblocks=[DISK_CONFIG_NAME],!discoblocks-parent'
kubectl get pvc -l 'discoblocks=[DISK_CONFIG_NAME],discoblocks-parent=[PVC_NAME]'
kubectl get event --field-selector involvedObject.name=[POD_NAME] -o wide | grep discoblocks.ondat.io
Terminating
state?
DiskConfig
object deletion removes all finalizers.kubectl patch pvc [PVC_NAME] --type=json -p='[{"op": "remove", "path": "/metadata/finalizers/0"}]'
kubectl debug [POD_NAME] -q -c debug --image=nixery.dev/shell/curl -- sleep infinity && kubectl exec [POD_NAME] -c debug -- curl -s telnet://localhost:9100
kubectl apply -f https://raw.githubusercontent.com/ondat/discoblocks/v[VERSION]/config/prometheus/monitor.yaml
Prometheus integration is isabled by default, to enable it please apply the ServiceMonitor manifest on your cluster.
Metrics provided by Discoblocks:
discoblocks_pvc_operation_counter
discoblocks_error_counter
We love your input! We want to make contributing to this project as easy and transparent as possible. You can find the full guidelines here.
Please reach out for any questions or issues via our Github Discussions.
Alternatively you can:
Discoblocks is under the Apache 2.0 license. See LICENSE file for details.