valkey-operator

by alekc

Helm chartv0.4.0App v0.0.61Apache-2.0Verified publisher

Kubernetes operator that manages Valkey (Redis-compatible) clusters as a typed CRD, covering provisioning, scaling, and configuration

About this chart

valkey-operator

Kubernetes operator that manages Valkey (Redis-compatible) clusters as a typed CRD, covering provisioning, scaling, and configuration

The Valkey Operator manages Valkey custom resources: create one, and the operator provisions, scales, and reconfigures the underlying StatefulSet, Services, and Secrets for you.

Quick start

helm repo add alekc https://charts.alekc.dev
helm repo update
helm install valkey-operator alekc/valkey-operator

Or directly from the OCI registry, no helm repo add needed:

helm install valkey-operator oci://charts.alekc.dev/valkey-operator --version 0.3.0

Verifying the signature

curl -sO https://charts.alekc.dev/pubring.gpg
helm pull oci://charts.alekc.dev/valkey-operator --version 0.3.0 --verify --keyring pubring.gpg

Installing the operator alone does nothing until a Valkey custom resource exists. Create one directly with kubectl (this chart doesn't offer a shortcut for it, unlike an app-template chart's cluster.create):

apiVersion: hyperspike.io/v1
kind: Valkey
metadata:
  name: my-valkey
spec:
  nodes: 3
  replicas: 1

Maintainers

NameEmailUrl
alekc[email protected]

Source Code

Values

KeyTypeDefaultDescription
additionalManifestsobject{}List of additional manifests to include
affinityobject{}Affinity rules for pod scheduling
autoscalingobject{"enabled":false,"maxReplicas":10,"minReplicas":1,"targetCPUUtilizationPercentage":80}Autoscaling configuration
autoscaling.enabledboolfalseEnable or disable autoscaling
autoscaling.maxReplicasint10Maximum number of replicas
autoscaling.minReplicasint1Minimum number of replicas
autoscaling.targetCPUUtilizationPercentageint80Target CPU utilization percentage
commonAnnotationsobject{}Annotations merged onto every resource this chart renders, in addition to each resource's own dedicated annotations field.
commonLabelsobject{}Common labels to be added to all resources
configobject{"data":{"exporterImage":"ghcr.io/hyperspike/valkey-sidecar:v0.0.61","nodes":"3","valkeyImage":"ghcr.io/hyperspike/valkey:8.1.4"},"enabled":true}Application-specific configuration
config.dataobject{"exporterImage":"ghcr.io/hyperspike/valkey-sidecar:v0.0.61","nodes":"3","valkeyImage":"ghcr.io/hyperspike/valkey:8.1.4"}Key-value pairs for the configuration
config.enabledbooltrueEnable or disable the configuration map
deploymentobject{"additionalMounts":[],"additionalVolumes":[],"annotations":{},"revisionHistoryLimit":2,"strategy":{"type":"RollingUpdate"}}Deployment configuration
deployment.additionalMountslist[]Additional volume mounts
deployment.additionalVolumeslist[]Additional volumes to mount
deployment.annotationsobject{}Annotations to add to the deployment
deployment.revisionHistoryLimitint2Number of old ReplicaSets to retain for rollback
deployment.strategyobject{"type":"RollingUpdate"}Deployment strategy (e.g., RollingUpdate, Recreate)
envobject{"full":[{"name":"APP_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.labels['app.kubernetes.io/name']"}}},{"name":"INSTANCE_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.labels['app.kubernetes.io/instance']"}}}],"simple":{}}Environment variables for the container
env.fulllist[{"name":"APP_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.labels['app.kubernetes.io/name']"}}},{"name":"INSTANCE_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.labels['app.kubernetes.io/instance']"}}}]Full environment variable definitions
env.simpleobject{}Simple key-value environment variables
fullnameOverridestring""Override the full name of the chart
imageobject{"pullPolicy":"IfNotPresent","repository":"ghcr.io/hyperspike/valkey-operator","tag":""}Container image configuration
image.pullPolicystring"IfNotPresent"Image pull policy (e.g., Always, IfNotPresent)
image.repositorystring"ghcr.io/hyperspike/valkey-operator"Image repository (e.g., nginx, redis)
image.tagstring""Image tag (overrides the chart appVersion if specified)
imagePullSecretslist[]Secrets for pulling images from private registries
livenessProbeobject{"config":{"httpGet":{"path":"/healthz","port":8081}},"enabled":true}Liveness probe configuration
livenessProbe.configobject{"httpGet":{"path":"/healthz","port":8081}}Liveness probe settings
livenessProbe.enabledbooltrueEnable or disable the liveness probe
nameOverridestring""Override the name of the chart
networkPolicy.annotationsobject{}Annotations to add to the NetworkPolicy
networkPolicy.enabledboolfalseRender a NetworkPolicy restricting ingress to the operator's own health-probe port and egress to DNS plus a broad allowance. The operator needs to reach the Kubernetes API server, whose ClusterIP falls inside the cluster's service CIDR, which varies per cluster and isn't something this chart can pin narrowly on its own.
networkPolicy.extraEgresslist[]Additional raw egress rules, appended as-is under spec.egress.
networkPolicy.extraIngresslist[]Additional raw ingress rules, appended as-is under spec.ingress.
nodeSelectorobject{}Node selector for pod scheduling
podAnnotationsobject{}Annotations to add to pods
podDisruptionBudgetobject{"enabled":false,"minAvailable":1}Pod disruption budget configuration
podDisruptionBudget.enabledboolfalseEnable or disable the pod disruption budget
podDisruptionBudget.minAvailableint1Minimum number of available pods
podSecurityContextobject{}Pod security context
priorityClassNamestring""Priority class name for pods
readinessProbeobject{"config":{"httpGet":{"path":"/readyz","port":8081}},"enabled":false}Readiness probe configuration
readinessProbe.configobject{"httpGet":{"path":"/readyz","port":8081}}Readiness probe settings
readinessProbe.enabledboolfalseEnable or disable the readiness probe
replicaCountint1Number of replicas to deploy
resourcesobject{"limits":{"memory":"128Mi"},"requests":{"cpu":"10m","memory":"64Mi"}}Resource requests and limits for the container
resources.limitsobject{"memory":"128Mi"}Resource limits
resources.requestsobject{"cpu":"10m","memory":"64Mi"}Resource requests
securityContextobject{"capabilities":{"drop":["ALL"]},"runAsNonRoot":true}Container security context
serviceAccountobject{"annotations":{},"create":true,"name":""}Service account configuration
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.namestring""If not set and create is true, a name is generated using the fullname template
terminationGracePeriodSecondsint30Termination grace period for pods (in seconds)
tolerationslist[]Tolerations for pod scheduling

Gotchas

  • config.data sets the operator's own default images (valkeyImage, exporterImage) and default node count, not anything on a specific Valkey resource. A Valkey CR can still override its own image per-instance; this ConfigMap only changes what the operator falls back to when a CR doesn't set one.
  • clusterrole-editor/clusterrole-viewer aren't wired into the cluster's built-in edit/view aggregated roles. They're kubebuilder-generated starting points (no rbac.authorization.k8s.io/aggregate-to-* label), a cluster admin has to bind or aggregate them explicitly if that's wanted.
  • networkPolicy.enabled allows broad egress to 0.0.0.0/0 by default. The operator needs to reach the Kubernetes API server, whose ClusterIP falls inside the cluster's service CIDR, which varies per cluster and isn't something this chart can pin narrowly on its own.

Upgrade notes

No breaking changes yet. This section will list migration steps for any future release with a kind: removed or kind: changed entry in artifacthub.io/changes that requires one.

Deploy valkey-operator with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has valkey-operator 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 chartvalkey-operator is pinned at v0.4.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