wyrihaximusnet/redis-db-assignment-operator

Chart version: 1.0.2
Api version: v2
App version: v1.0.1
Redis Database Assignment Operator
application
Chart Type
Active
Status
Unknown
License
223
Downloads
https://helm.wyrihaximus.net
Set me up:
helm repo add center https://repo.chartcenter.io
Install Chart:
helm install redis-db-assignment-operator center/wyrihaximusnet/redis-db-assignment-operator
Versions (0)

Redis Database Assignment Operator

Opinionated helm chart for wyrihaximusnet/docker-kubernetes-redis-db-assignment-operator.

Configuration

No configuration required!

Example use

The following definition will create a redis-database resource on your cluster. The operator picks it up and finds a redis database that isn’t in use according to the operators internal state.

apiVersion: wyrihaximus.net/v1
kind: RedisDatabase
metadata:
  name: example
spec:
  secret:
    name: example-redis-database
  service:
    read: redis://redis-follower.redis.svc.cluster.local:6379/
    write: redis://redis-leader.redis.svc.cluster.local:6379/

The resulting secret looks like this:

apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: example-redis-database
  namespace: default
data:
  DATABASE: BASE64_ENCODED
  READ: BASE64_ENCODED
  WRITE: BASE64_ENCODED

Opinionated decisions

  • State is stored in a hardcoded configmap named redis-database-assignment-operator-in-use-dbs-list in the namespace the operator resides in.