{"id":13562225,"url":"https://github.com/tangcong/codis-operator","last_synced_at":"2025-07-06T12:34:16.430Z","repository":{"id":144203795,"uuid":"158410949","full_name":"tangcong/codis-operator","owner":"tangcong","description":"Codis Operator creates and manages codis clusters(proxy based Redis cluster solution) running in kubernetes.(WIP)","archived":false,"fork":false,"pushed_at":"2020-12-31T06:46:20.000Z","size":35411,"stargazers_count":22,"open_issues_count":6,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-04T14:44:29.084Z","etag":null,"topics":["codis","codis-operator","crd","k8s","kubernetes","operator","redis","redis-cluster"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tangcong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-11-20T15:27:03.000Z","updated_at":"2024-03-24T09:49:24.000Z","dependencies_parsed_at":"2023-06-19T03:53:57.885Z","dependency_job_id":null,"html_url":"https://github.com/tangcong/codis-operator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangcong%2Fcodis-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangcong%2Fcodis-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangcong%2Fcodis-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangcong%2Fcodis-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tangcong","download_url":"https://codeload.github.com/tangcong/codis-operator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247056976,"owners_count":20876488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codis","codis-operator","crd","k8s","kubernetes","operator","redis","redis-cluster"],"created_at":"2024-08-01T13:01:05.958Z","updated_at":"2025-07-06T12:34:16.423Z","avatar_url":"https://github.com/tangcong.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Codis-Operator\n\nCodis Operator creates and manages codis clusters running in kubernetes.(Notice,It is not ready for production/Work In Progress)\n\n## Advantages based on k8s\n\n### NO SPOF RISK\n\nCodis dashboard component which does migration/cluster management work is a spof, if it is deployed by traditional method and when it fails, we have to recover it manually,however,it will be self-healing based on k8s.\n\n### Easily Create/Maintain Cluster\n\nCodis Cluster has a lots of components(proxy/dashboard/redis/fe/sentinel).it will cost a lot of time if it is deployed and managed by traditional method,especially when nodes die,cut off,we have to recover/migrate every component manually.however,we can easily deploy/destory cluster with only one command based on k8s,and when proxy/dashboard/fe fails(node die,outage,node cut,node resource exhaustion),all these failures will be self-healing that saves much time.\n\n## Feature\n\n### Create and Destroy Codis Cluster\n\nDeploy/Destroy cluster with only one comannd\n\t\n### Scaling the Codis Cluster \n\nAutomatically scales the proxy component\n\n### Automatic FailOver\n\nAutomatically performs failover when proxy/dashboard/fe failed.\n\n### Automatically monitoring Codis Cluster\n\nAutomatically deploy Prometheus,Grafana for Codis cluster monitoring.\n\n## Getting Start(Demo)\n\n![Codis Operator demo](https://raw.githubusercontent.com/tangcong/codis-operator/master/doc/images/codis-operator.gif)\n\n## OverView \n\n\n### Deploy Codis Operator\n\t\n```\nkubectl create -f ./deploy/manager/deployment-dev.yml\n```\n\n### Create and destroy a codis cluster\n\n```\nkubectl create -f ./examples/sample-1.yml\n```\n\n```\nkubectl delete -f ./examples/sample-1.yml\n```\n\n### Best Practices\n\n* specifying coordinator name to etcd/zookeeper\n\n* use pv to store Redis data(ssd disk is better) \n\n* use dedicated node to run codis-server(Redis)\n\n* set max memory limit(node memory) for codis-server and assign enough memory \n\n* make sure request resource and limit source are equal(k8s pod qos is guaranteed,evict/oom seldom happens)\n\n* it is better that if your pod ip is sticky. \n\n### EXAMPLES\n\nreference linking: \n\nhttps://github.com/tangcong/codis-operator/blob/master/examples/sample-3.yml\n\n* using network pv(specifying storageClassName)\n\n* enabling hpa\n\n* specifying service type\n\n* specifying coordinator name \n\n* specifying request/limit resource \n\n* specifying scheduler policy(node selector/tolerations)\n\n\n### To do List\n\n* monitor(proxy/redis)\n\n* dedicated scheduler server(k8s do not know \"codis group\" conception, one group may have 2-N replicas, we want to make sure that every codis server pod which is in the same group be scheduled into different node, when one node crash/outage,we can promote other slave to master.)\n\n* make sure that drain node safely and automatically.\n\n* support helm\n\n* support local pv\n\n* add unit test\n\n* add e2e test\n\n* add chaos test\n\n### SNAPSHOTS\n\n![cluster info_1](./doc/images/1.png)\n\n![cluster info_2](./doc/images/2.png)\n\n![cluster info_3](./doc/images/3.png)\n\n![cluster info_4](./doc/images/4.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangcong%2Fcodis-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftangcong%2Fcodis-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangcong%2Fcodis-operator/lists"}