|
1 개월 전 | |
---|---|---|
build | 3 달 전 | |
cmd/manager | 3 달 전 | |
deploy | 1 개월 전 | |
pkg | 1 개월 전 | |
vendor | 3 달 전 | |
version | 1 개월 전 | |
.gitignore | 3 달 전 | |
Dockerfile | 3 달 전 | |
Makefile | 3 달 전 | |
README.md | 1 개월 전 | |
VERSION | 1 개월 전 | |
go.mod | 1 개월 전 | |
go.sum | 3 달 전 | |
tools.go | 3 달 전 |
Redis operator runs Sentinel and Redis, makes Redis high available with HAProxy.
Makefile
and change images registry to yoursmake
commandYou can find images here https://hub.docker.com/r/iam21h/redis-operator
kubectl -n operators -f deploy/service_account.yaml
kubectl -n operators -f deploy/role.yaml
kubectl -n operators -f deploy/role_binding.yaml
kubectl -n operators -f deploy/operator.yaml
Edit operator.yaml
to set WATCH_NAMESPACE
, may be you want set it to namespace of pod:
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
kubectl -f deploy/clusterrole.yaml
kubectl -f deploy/clusterrole_binding.yaml
kubectl -n operators -f deploy/service_account.yaml
kubectl -n operators -f deploy/operator.yaml
Edit clusterrole_binding.yaml
, set namespace for service account.
This resource can help you run your first Redis instance
apiVersion: blindage.org/v1alpha1
kind: Redis
metadata:
name: my-redis
spec:
useHAProxy: true
haproxyReplicas: 1
sentinelReplicas: 3
redisReplicas: 3
quorum: 2
haproxyTimeoutServer: 30
haproxyTimeoutClient: 30
haproxyBackendCheckInterval: 1
# set size if you want make persistent volume
persistentVolumeSize: 1Gi
persistentVolumeClass: "gluster"
persistentVolumePurge: true
Open file pkg/apis/blindage/v1alpha1/redis_types.go
to know more about options.
Copyright by Vladimir Smagin (21h) 2019
http://blindage.org email: 21h@blindage.org
Project page: https://git.blindage.org/21h/redis-operator