-
Notifications
You must be signed in to change notification settings - Fork 16.8k
add helm v2 chart for patroni with petset #57
Conversation
6e0806e
to
f5aa095
Compare
Awesome stuff @linki!!! You can vendor in your dependent chart (etcd) by putting it in the "charts" directory of your chart. This way the patroni chart will be useful out of the gate without extra setup steps. The vendoring process will improve so that it is less heavy handed in the future. For example when we get helm/helm#874 |
@viglesiasce thanks for pointing out the vendoring feature. I vendored etcd and have patroni use it by default now. |
Thanks @linki!! I'm on holiday today but will give it a look tomorrow. |
|
||
```bash | ||
$ helm delete <release-name> | ||
$ kubectl delete petset,po,pvc,svc,secret -l release=<release-name> |
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.
This won't work btw. Lets check this bashfu into here:
$ grace=$(kubectl get po web-0 --template '{{.spec.terminationGracePeriodSeconds}}')
$ kubectl delete petset,po -l app=nginx
$ sleep $grace
$ kubectl delete pvc -l app=nginx
Update nginx with your petset name. Also, the code block should be "console" not "bash".
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 original bash worked fine for me. How did it fail for you @chrislovecnm?
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.
fixed to take terminationGracePeriodSeconds
into account
1 nit on the values file but the rest looks good from a code perspective. That having been said I can't figure out how to connect using psql. Can you provide an example of how to get started so I can verify the functionality? In a follow up PR I'd like to ask that you add a NOTES.txt file so that after installation users know how to connect to patroni. Here is what I did for the Jenkins chart: |
@k8s-bot test this |
@viglesiasce Thanks for your suggestions. I added documentation on how to connect to Postgres in the readme. I would love to get your feedback. The NOTES.txt approach didn't work for me (helm sends it to Kubernetes as a manifest on I also reacted to the remaining open issues we discussed. |
@viglesiasce were are we at with this one? |
Hey @linki Thanks for the updates. NOTES.txt will only work with alpha.4+. I will retest now and if all things go as planned will merge in. Can you add NOTES.txt as a follow on PR? It will be required to move from incubator->stable. |
@linki let me rephrase what @viglesiasce asked. Can you please put in an issue to update NOTES.txt. Much appreciated! |
I was not able to get failover to work. I did the following:
After that point no endpoints were added back to the service although the pod was rebuilt. The following is in the logs:
Is the GCS integration required? Is there a way to turn it off by default? |
@viglesiasce my question about GCE is bigger than that. How is Patroni integrating with GCE and what is it getting from that integration. Do we need to integrate with EC2? How does this run on bare metal and vSphere. |
@chrislovecnm Patroni uses object storage for backup/restore. If it were to be integrated into AWS it would leverage S3 for the same use case. |
@viglesiasce and vSphere and Bare Metal? Does it have support there? |
Minio and RiakCS can be used on premise to provide S3 compatible object storage. |
@viglesiasce @chrislovecnm thanks for the hint. create the issue: #83 |
@viglesiasce @chrislovecnm thanks for trying it out and the healthy discussion. yes, the chart currently requires
Not sure if it supports a mounted volume, but i'll find out. How about we turn the Google cloud storage integration off by default and then add the possibility to opt-in to GCS and S3 storage in separate PRs? |
@linki that plan sounds great. Let's err on the side of functional but not performant to start. With the follow up PRs you can also leverage just the S3 implementation and use GCS' interop mode. Thanks again! |
@viglesiasce I changed the chart to not use GCS/S3 by default. You should be able to test it now. two gotchas:
known bug:
|
Any idea what is going on there? |
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.
Worked as expected this time around @linki!!! Thanks so much for the effort, looks great.
Don't forget to submit another PR with your NOTES.txt
@viglesiasce Hi! @mikkeloscar created #83. Let us know what else you need from us! |
* feat(patroni): add helm v2 chart for patroni with petset * chore(patroni): vendor etcd chart * feat(patroni): have patroni use vendored etcd by default * fix(patroni): use console instead of bash * fix(patroni): make termination commands more reliable * docs(patroni): add documentation to the configurable values * docs(patroni): describe how to access postgres * docs(patroni): add some details about how patroni on k8s works * fix(patroni): do not require GCS by default
This directory contains a Kubernetes chart to deploy a five node
patroni
cluster using a petset.It depends on a running
etcd
cluster for distributed shared state which can be installed using theetcd
chart: https://github.com/kubernetes/charts/tree/master/incubator/etcdPlease find out more about
patroni
at https://github.com/zalando/patroniCaveat: Currently this chart can only be deployed in Kubernetes'
default
namespace to function.