-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add helm install based on kubeblocks #1788
Conversation
tools/helm/README.md
Outdated
## connect to pika | ||
``` | ||
redis-cli -p 9221 | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the provided code patch, here are some observations and suggestions:
- Ensure that all dependencies are clearly stated and properly installed.
- Add comments or documentation to explain the purpose and usage of each section.
- Include error handling and validation checks where appropriate.
- Consider using variables or configuration files for values that may change in different environments.
- Perform testing and consider adding unit tests to verify the functionality of the code.
- Double-check that the indentation and formatting are consistent.
Without additional context or the actual code being referred to, it's challenging to provide specific bug risk assessments or improvement suggestions. However, based on the given information, these general recommendations should help you with your code review.
tools/helm/pika-cluster/.helmignore
Outdated
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code patch you provided appears to be a file containing patterns for ignoring certain files and directories when building packages. It is commonly used in version control systems to exclude unnecessary files from being included in the package.
Overall, the code looks fine as it defines patterns to ignore various types of files and directories such as VCS directories, backup files, and IDE-specific files. However, here are a few suggestions for improvement:
- You might consider adding comments for each pattern to clarify why it is being ignored. This would make it easier for other developers to understand the purpose behind each pattern.
- Adding a descriptive header comment at the beginning of the file explaining its purpose would also be helpful.
- It's generally a good practice to sort the patterns alphabetically to improve readability and organization.
- You may want to review the list of IDE-specific files and directories to ensure that all relevant ones are included. Different IDEs have different file structures and naming conventions, so it's important to account for the ones you encounter in your project.
Apart from these suggestions, there don't seem to be any specific bugs or risks in the code patch. However, please note that without the context of how this code is used or the larger codebase it belongs to, it is challenging to provide a comprehensive review.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前已验证部署 codis 集群过程。我测试了下目前支持的功能和未来需要支持的基础功能。可以考虑在之后的 PR 支持 Codis 的 group 自动部署和 slot 自动 rebalance。
支持的功能:
- 目前版本的 pika operator 借助 kubeblocks 可以方便地将 codis 和 pika 实例部署在 K8s 上,但是仅仅支持部署,实际添加实例到 codis 集群需要手动操作。
- 创建的只是单独的一个个 pika 实例,并不是主从 group,需要手动将 pika 实例添加到 codis 中并进行 slaveof 才能构成 group。
- 支持通过 kbcli 扩容,但扩容后的节点依旧需要手动添加和启动 rebalance。
- 支持通过 kbcli 缩容,但需要手动将 slot 先迁移走,然后再进行缩容,否则 pika 实例会直接被关闭,导致 slot 当前不可用。
未来迭代需要支持的基础功能:
- 集群:
a. createGroup():支持部署 codis 集群能够自动部署 pika 实例后构成主从 group,从现有的部署 pika 实例修改到能够以 group 粒度的部署。
b. addServerToGroup()、addSlotToGroup():支持新增 group 后根据配置判断是否将 slot rebalance 到新的 group。
c. migrateSlotFromGroup()、deleteServerFromGroup():支持减少 group 后将 slot rebalance 到现有的其他 group,并将节点删除。需要做一些资源评估的校验,若去除 group 后的集群规格不足以容纳 slot,则需要返回相应的错误信息。 - 监控:
a. 支持部署 exporter、prometheus、grafana 的 pods,能够对 codis 集群进行监控。 - 自愈:
a. 支持哨兵模式,能够通过 codis-dashboard 对 group 进行自动切主。 - 存储
a. 创建 PVC 和 PV 并绑定 PV,使用持久存储卷。
* helm: add part of pika cluster definition
* helm: add part of pika cluster definition
This RP defines a helm for a pika cluster, built on top of kubeblocks.
Use the following command to quickly install a highly available pika codis cluster.
cd ./tools/kubeblock-helm/ helm install pika ./pika helm install pika-cluster ./pika-cluster
kubectl port-forward svc/pika-cluster-codis-proxy 19000 # start new terminal redis-cli -p 19000 info