keydb

by serge.logvinov

Helm chartv0.36.0App 6.3.3Verified publisher

KeyDB with TLS, backup/restore support

About this chart

keydb

KeyDB with TLS, backup/restore support

KeyDB is a high-performance, distributed NoSQL database that is designed to be compatible with the Redis protocol. In many ways, KeyDB can be considered a drop-in replacement for Redis, as it supports the same data structures and commands.

  • TLS connections
  • HaProxy load balances
  • Master-master replication
  • Support backup/restore to the extrernal storage, using wal-g

Homepage: https://github.com/sergelogvinov/helm-charts

Maintainers

NameEmailUrl
sergelogvinovhttps://github.com/sergelogvinov

Source Code

# helm values

replicaCount: 2

updateStrategy:
  type: OnDelete

tlsCerts:
  create: true

loadbalancer:
  enabled: true

extraVolumes:
  - name: certs
    secret:
      defaultMode: 256
      secretName: backup-s3
extraVolumeMounts:
  - name: certs
    mountPath: /home/redis/.aws
    readOnly: true

backup:
  enabled: true
  recovery: true

  walg:
    WALG_TAR_DISABLE_FSYNC: true
    WALG_COMPRESSION_METHOD: brotli
    WALG_S3_PREFIX: s3://backup/redis-backup

metrics:
  enabled: true

Values

KeyTypeDefaultDescription
replicaCountint1
image.repositorystring"ghcr.io/sergelogvinov/keydb"
image.pullPolicystring"IfNotPresent"
image.tagstring""
kubeVersionstring""
imagePullSecretslist[]
nameOverridestring""
fullnameOverridestring""
clusterDomainstring"cluster.local"
keydb.passwordstringnil
keydb.threadsint2
keydb.activeReplicastring"yes"
keydb.multiMasterstring"yes"
keydb.maxmemorystringnil
keydb.maxmemoryPolicystring"noeviction"
keydb.replBacklogSizestringnil
keydb.save[0]string"900 1"
keydb.save[1]string"120 100000"
tlsCerts.createboolfalse
loadbalancer.enabledboolfalse
loadbalancer.service.labelsobject{}Extra labels for load balancer service. ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
loadbalancer.service.annotationsobject{}Extra annotations for load balancer service. ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
loadbalancer.service.externalTrafficPolicystring"Cluster"Traffic policies. ref: https://kubernetes.io/docs/reference/networking/virtual-ips/#traffic-policies
loadbalancer.service.internalTrafficPolicystring"Cluster"
loadbalancer.service.externalIPslist[]Services external IPs. ref: https://kubernetes.io/docs/concepts/services-networking/service/#external-ips
loadbalancer.typestring"static"Type of loadbalancer. Can be dynamic or static
loadbalancer.replicaCountint1
loadbalancer.image.repositorystring"haproxy"
loadbalancer.image.pullPolicystring"IfNotPresent"
loadbalancer.image.tagstring"2.7.10-alpine3.18"
loadbalancer.podSecurityContext.runAsNonRootbooltrue
loadbalancer.podSecurityContext.runAsUserint99
loadbalancer.podSecurityContext.runAsGroupint99
loadbalancer.podSecurityContext.fsGroupint99
loadbalancer.resources.limits.cpustring"500m"
loadbalancer.resources.limits.memorystring"64Mi"
loadbalancer.resources.requests.cpustring"100m"
loadbalancer.resources.requests.memorystring"32Mi"
loadbalancer.autoscalingobject{"controlledResources":["cpu","memory"],"controlledValues":"RequestsOnly","enabled":false,"maxAllowed":{},"minAllowed":{},"updatePolicy":{"updateMode":"InPlaceOrRecreate"}}Vertical pod autoscaler ref: https://kubernetes.io/docs/concepts/workloads/autoscaling/vertical-pod-autoscale/
loadbalancer.autoscaling.controlledResourceslist["cpu","memory"]Resource to control Possible values are "cpu" and "memory"
loadbalancer.autoscaling.controlledValuesstring"RequestsOnly"Controls which resource value should be autoscaled Possible values are "RequestsAndLimits" and "RequestsOnly"
loadbalancer.autoscaling.maxAllowedobject{}Max allowed resources for the pod default is resources.limits
loadbalancer.autoscaling.minAllowedobject{}Min allowed resources for the pod default is resources.requests
loadbalancer.autoscaling.updatePolicyobject{"updateMode":"InPlaceOrRecreate"}Update policy Possible values are "Off", "Initial", "Recreate", "InPlaceOrRecreate" and "Auto"
loadbalancer.livenessProbe.initialDelaySecondsint10
loadbalancer.livenessProbe.timeoutSecondsint1
loadbalancer.livenessProbe.successThresholdint1
loadbalancer.livenessProbe.periodSecondsint60
loadbalancer.readinessProbeobject{}
loadbalancer.podAntiAffinityPresetstring"soft"
backup.enabledboolfalse
backup.recoveryboolfalse
backup.walgobject{}
backup.schedulestring"15 4 * * *"
backup.cleanPolicystring"retain FULL 7"
backup.resources.requests.cpustring"100m"
backup.resources.requests.memorystring"128Mi"
backupCheck.enabledboolfalse
backupCheck.schedulestring"15 8 * * *"
backupCheck.resources.requests.cpustring"100m"
backupCheck.resources.requests.memorystring"128Mi"
backupCheck.persistence.accessModes[0]string"ReadWriteOnce"
backupCheck.persistence.sizestring"8Gi"
backupCheck.persistence.annotationsobject{}
backupCheck.nodeSelectorobject{}
backupCheck.tolerationslist[]
backupCheck.affinityobject{}
metrics.enabledboolfalse
metrics.image.repositorystring"oliver006/redis_exporter"
metrics.image.pullPolicystring"IfNotPresent"
metrics.image.tagstring"v1.99.0"
metrics.resources.limits.cpustring"100m"
metrics.resources.limits.memorystring"32Mi"
metrics.resources.requests.cpustring"10m"
metrics.resources.requests.memorystring"16Mi"
serviceAccountobject{"annotations":{},"create":true,"name":""}Pods Service Account. ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
podLabelsobject{}Extra labels for pod. ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
podAnnotationsobject{}Annotations for pod. ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
podSecurityContextobject{"fsGroup":999,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":999,"runAsNonRoot":true,"runAsUser":999}Pod Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
securityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"seccompProfile":{"type":"RuntimeDefault"}}Container Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
priorityClassNamestringnilPriority Class Name ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass
terminationGracePeriodSecondsint30
livenessProbeobject{}
readinessProbe.initialDelaySecondsint30
readinessProbe.timeoutSecondsint1
readinessProbe.failureThresholdint2
readinessProbe.successThresholdint3
readinessProbe.periodSecondsint30
startupProbe.initialDelaySecondsint30
startupProbe.timeoutSecondsint1
startupProbe.failureThresholdint60
startupProbe.successThresholdint1
startupProbe.periodSecondsint10
serviceobject{"annotations":{},"ipFamilies":["IPv4"],"trafficDistribution":"","type":"ClusterIP"}Service parameters ref: https://kubernetes.io/docs/user-guide/services/
service.typestring"ClusterIP"Service type ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
service.annotationsobject{}Annotations for service
service.ipFamilieslist["IPv4"]IP families for service possible values: IPv4, IPv6 ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
service.trafficDistributionstring""The traffic distribution for the service. possible values: PreferClose, PreferSameZone, PreferSameNode ref: https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution
autoscalingobject{"controlledResources":["cpu","memory"],"controlledValues":"RequestsOnly","enabled":false,"maxAllowed":{},"minAllowed":{},"updatePolicy":{"updateMode":"InPlaceOrRecreate"}}Vertical pod autoscaler
autoscaling.controlledResourceslist["cpu","memory"]Resource to control Possible values are "cpu" and "memory"
autoscaling.controlledValuesstring"RequestsOnly"Controls which resource value should be autoscaled Possible values are "RequestsAndLimits" and "RequestsOnly"
autoscaling.maxAllowedobject{}Max allowed resources for the pod default is resources.limits
autoscaling.minAllowedobject{}Min allowed resources for the pod default is resources.requests
autoscaling.updatePolicyobject{"updateMode":"InPlaceOrRecreate"}Update policy Possible values are "Off", "Initial", "Recreate", "InPlaceOrRecreate" and "Auto"
resourcesobject{"requests":{"cpu":"10m","memory":"64Mi"}}Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/
persistenceobject{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":false,"size":"10Gi"}Persistence parameters ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
updateStrategyobject{"type":"RollingUpdate"}pod deployment update strategy type. ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment
nodeSelectorobject{}Node labels for pod assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/
tolerationslist[]Tolerations for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
podAntiAffinityPresetstring"soft"Pod Anti Affinity soft/hard
podAntiAffinityPresetKeystring"kubernetes.io/hostname"
affinityobject{}Affinity for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity

Deploy keydb with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has keydb on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkeydb is pinned at v0.36.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply