-
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
doc: add pika-operator guide on readme #1831
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,6 +159,33 @@ redis-cli -p 9221 "info" | |
./build_docker.sh -p linux/amd64 -t private_registry/pika:latest | ||
``` | ||
|
||
### 使用 pika-operator 部署 | ||
|
||
使用 `pika-operator` 可以简单的在 Kubernetes 环境中部署单实例 `pika` 。 | ||
请勿在生产环境中使用此功能。 | ||
|
||
本地安装: | ||
|
||
1. 安装 [MiniKube](https://minikube.sigs.k8s.io/docs/start/) | ||
2. 部署 pika-operator | ||
```bash | ||
cd tools/pika_operator | ||
make minikube-up # run this if you don't have a minikube cluster | ||
make local-deploy | ||
``` | ||
3. 创建 pika 实例 | ||
``` | ||
cd tools/pika_operator | ||
kubectl apply -f examples/pika-sample/ | ||
|
||
# check pika status | ||
kubectl get pika pika-sample | ||
|
||
# get pika instance info | ||
kubectl run pika-sample-test --image redis -it --rm --restart=Never \ | ||
-- /usr/local/bin/redis-cli -h pika-sample -p 9221 info | ||
``` | ||
|
||
## 性能 (感谢[deep011](https://github.com/deep011)提供性能测试结果) | ||
### 注!!! | ||
本测试结果是在特定环境特定场景下得出的,不能够代表所有环境及场景下的表现,__仅供参考__。 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without the complete context of the code, it's difficult to provide a comprehensive code review. However, based on the provided code snippet, here are some observations:
Overall, it seems like a good starting point, but further review and testing would be necessary to fully assess any bug risks and suggest improvements. |
||
|
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 for improvement:
Consider adding comments: It's beneficial to include comments in the code to provide clarity and make it easier for other developers to understand the code's functionality.
Error handling: Ensure that appropriate error handling mechanisms are in place to handle any potential errors or exceptions that may occur during execution.
Input validation: Validate the command-line arguments passed to the script or function to ensure they meet the expected format and values. This helps prevent unexpected behavior or security vulnerabilities.
Security considerations: When using private registries, make sure to handle authentication and authorization properly to maintain security. Avoid storing sensitive information directly in the code (such as usernames and passwords) and consider using environment variables or secure secrets management solutions.
Documentation: Provide clear and comprehensive documentation for the steps required to deploy and use the
pika-operator
in a Kubernetes environment. Include any necessary prerequisites and helpful tips to aid users in the deployment process.Maintainability: Create thorough unit tests to ensure the reliability and maintainability of the codebase. Additionally, consider adhering to coding best practices and conventions for consistent style and readability.
It's important to review the specific implementation details of the script or function to identify any bugs or issues accurately.