Skip to content
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

Merged
merged 3 commits into from
Jul 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: add pika-operator to guide
  • Loading branch information
machinly committed Jul 27, 2023
commit 51c0619a56cd72495fdd720e6fdd7823a207e286
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,33 @@ Here is an example usage of the script:
```bash
./build_docker.sh -p linux/amd64 -t private_registry/pika:latest
```
### Use pika-operator to deploy

You can use the `pika-operator` to easily deploy `pika` in a Kubernetes environment.

Please note that this operator is **NOT** recommended for use in a production environment.

Local Deploy:

1. install [MiniKube](https://minikube.sigs.k8s.io/docs/start/)
2. deploy pika-operator
```bash
cd tools/pika_operator
make minikube-up # run this if you don't have a minikube cluster
make local-deploy
```
3. create pika instance
```
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
```

## Performance

Copy link

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:

  1. 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.

  2. Error handling: Ensure that appropriate error handling mechanisms are in place to handle any potential errors or exceptions that may occur during execution.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

Expand Down
Loading