Redis operator for Kubernetes with HAProxy support
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

il y a 1 an
il y a 1 an
il y a 7 mois
il y a 1 an
il y a 3 mois
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 7 mois
il y a 1 an
il y a 7 mois
il y a 1 an
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Redis operator for Kubernetes
  2. Redis operator runs Sentinel and Redis, makes Redis high available with HAProxy.
  3. ## Build sources
  4. - You definitly need a Golang installed
  5. - Clone repository https://git.blindage.org/21h/redis-operator to your computer
  6. - Code
  7. - Create pull-request
  8. ## Prebuilt images
  9. You can find images here https://hub.docker.com/r/iam21h/redis-operator
  10. ## Deploy operator
  11. ### Helm
  12. ```
  13. helm repo add 21h https://charts.blindage.org
  14. helm repo update
  15. helm install redis-operator 21h/redis-operator -n operators
  16. ```
  17. ### Namespace-scoped installation
  18. ```
  19. kubectl -n operators -f deploy/service_account.yaml
  20. kubectl -n operators -f deploy/role.yaml
  21. kubectl -n operators -f deploy/role_binding.yaml
  22. kubectl -n operators -f deploy/operator.yaml
  23. ```
  24. Edit `operator.yaml` to set `WATCH_NAMESPACE`, may be you want set it to namespace of pod:
  25. ```
  26. env:
  27. - name: WATCH_NAMESPACE
  28. valueFrom:
  29. fieldRef:
  30. fieldPath: metadata.namespace
  31. ```
  32. ### Cluster-scoped installation
  33. ```
  34. kubectl -f deploy/clusterrole.yaml
  35. kubectl -f deploy/clusterrole_binding.yaml
  36. kubectl -n operators -f deploy/service_account.yaml
  37. kubectl -n operators -f deploy/operator.yaml
  38. ```
  39. Edit `clusterrole_binding.yaml`, set namespace for service account.
  40. ## Your first Redis deployment
  41. This resource can help you run your first Redis instance
  42. ```
  43. apiVersion: blindage.org/v1alpha1
  44. kind: Redis
  45. metadata:
  46. name: my-redis
  47. spec:
  48. useHAProxy: true
  49. haproxyReplicas: 1
  50. sentinelReplicas: 3
  51. redisReplicas: 3
  52. quorum: 2
  53. haproxyTimeoutServer: 30
  54. haproxyTimeoutClient: 30
  55. haproxyBackendCheckInterval: 1
  56. # set size if you want make persistent volume
  57. persistentVolumeSize: 1Gi
  58. persistentVolumeClass: "gluster"
  59. persistentVolumePurge: true
  60. pdbRedis:
  61. maxUnavailable: 1
  62. pdbSentinel:
  63. minAvailable: 2
  64. ```
  65. Remember rule: `pdbSentinel.minAvailable > (sentinelReplicas / 2) > pdbSentinel.maxUnavailable`. This made to save quorum.
  66. Open file `pkg/apis/blindage/v1alpha1/redis_types.go` to know more about options.
  67. ---
  68. Copyright by Vladimir Smagin (21h) 2019
  69. http://blindage.org email: 21h@blindage.org
  70. Project page: https://git.blindage.org/21h/redis-operator