-
Notifications
You must be signed in to change notification settings - Fork 991
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
Implement the kubectl plugin for the Postgres CustomResourceDefinition #519
Comments
@VineethReddy02 we expect you to contribute your own ideas, it is your proposal after all. read the user/administrator documentation to see what it is possible and think about how to automate this a few starting points to consider (not mandatory or even necessary) # correct deletion of a PG cluster, with warnings/confirmation requests
kubectl postgresql delete your-cluster-name
# compare manifest with the actual state of the cluster stored in the operator
kubectl postgresql diff your-cluster-name
# convenience alias for normal manifest editing
kubectl postgresql update your-cluster-name
# trickier: aliases for common Patroni commands
kubectl postgresql reinit replica-name
# short name for the command
kubectl pg ...
kubectl postgresql
# ideally autocompletion @erthalion @FxKu @Jan-M pls have a look |
# trickier: aliases for common Patroni commands
kubectl postgresql reinit replica-name I doubt it makes sense to implement something like this, since it has to be interactive and full of confirmation that you really want to do this (that's the point of patronictl). But at the same time this should be implemented outside of patronictl, which means code duplication and dependency. |
I'm also not so sure about wrapping patronictl commands. Some more ideas:
|
We are pleased to announce that this project was accepted to the GSoC 2019. Congratulations, @VineethReddy02 ! Vineeth, we are now in the community bonding period, and we would like to use this an opportunity to introduce you to our community and vice versa. Our suggestion for this period is straightforward:
Report template: Calendar week #0
# correct deletion of a PG cluster, with warnings/confirmation requests
kubectl postgresql delete your-cluster-name Please inform us if you have an instable Internet connection and any planned absences. @VineethReddy02 before we embark on these tasks, we would like to hear you feedback on the suggestions. @FxKu will be a 2nd mentor, so his comments will be well appreciated :) |
Thank you, Sergey! for the introduction.
Looking forward to working with you all! |
Great, then please post a first brief progress summary using the template around the end of this week, and we will review it on Monday.
Sounds good. We will then post links from it in this repo.
At this point it should not be much of a problem. Much more important is that you do not stay too far away from the mainline operator development and community. We can always move a plugin to a separate project later. |
As the Community bonding period started on May 7 I will update both the week's progress summary by end of this week. So that you review the last two weeks progress summary. I totally understood your intention for having kubectl plugin work within operator repo. I am happy that I can work closely with the community. 💯 Thanks! |
I will be updating the work on kubectl plugin development here. This acts as a tracker which comprises of proposal, design docs and any further discussions on implementation with weekly reports. |
@VineethReddy02 please provide the weekly report for the last week. The coding officially starts today :) |
Hey, @sdudoladov I forgot to commit the summary committed it yesterday after our call. Thanks for your time. I have started coding. |
your work does not fail; you just need to check that the operator deployment exits and has one replica
# correct deletion of a PG cluster, with warnings/confirmation requests
kubectl postgresql delete your-cluster-name using my own example from above. this is a very quick-and-dirty way of prototyping that can save you a lot of time later because through that you can avoid implementing unnecessary things |
@sdudoladov
Example commands for this week work
|
if you delete the operator CRD and restart the operator pod, does the pod fail ?
start with that one, it is actually important. The command has to ask for confirmation (as in "are you sure you want to delete the cluster-name ? [y/N]" with "No" being the default) and show a success message saying the cluster manifest has been deleted and related objects will be garbaged collected by the k8s/operator. It also has to include a help message saying that only manifest deletion is necessary to delete a DB ( a common mistake is to delete other objects manually only to see them re-created by the operator later) I'd also split the command in 2 forms: kubectl pg delete postgresql_name
kubectl pg delete --file cluster-manifest.yaml to match conventions from the original kubectl delete
these should be simple wrapper commands, do not spend much time on them |
On deletion of CRD i.e I will start working on the delete, create and update commands as discussed. Thanks! |
As per the discussion with @sdudoladov @FxKu Adding USER Adding DB and associated OWNER Extending the existing volume size Please feel free to share your views on this. |
weekly summaries from Vineeth for the record @VineethReddy02
see #551 |
Related: #635 |
Closing as PR got merged. |
@sdudoladov As this proposal doesn't have issue tracker, I have created one. And everyone can share their views, design related suggestions and functionalities such delete, auto-completion of resource names etc...
The text was updated successfully, but these errors were encountered: