redis-db-assignment-operator
by WyriHaximus
Helm chartv1.0.6App v1.0.1Verified publisher
Redis Database Assignment Operator
About this chart
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-listin the namespace the operator resides in.
Deploy redis-db-assignment-operator with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has redis-db-assignment-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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartredis-db-assignment-operator is pinned at v1.0.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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