Document StackGres snippets
We want to generate documentation content for StackGres that will go with each release. This issue is for all the documentation snippets that are not generic but important and "must go to the doc".
# Documentation Snippets
## StackGres anti affinity pod deploy
StackGres postgresql's pod are deployed with an anti affinity rule that prevent other StackGres postgresql's pods to be deployed in the same node. Thus forcing a Kubernetes node to only contains a single StackGres cluster node.
## tiller-less helm
Helm is able to generate the yaml that are imported so there is no need to install helm in a kubernetes cluster to use helm charts of StackGres.
To install:
```
helm template --name stackgres-operator operator/install/kubernetes/chart/stackgres-operator | kubectl create -f -
```
To delete:
```
helm template --name stackgres-operator operator/install/kubernetes/chart/stackgres-operator | kubectl delete --ignore-not-found -f -
```
# setup stackgres on GCP
```
# Create GKE cluster
gcloud beta container --project stackgres-demo clusters create stackgres-demo-gke-cluster --zone us-west1-a --node-locations us-west1-a,us-west1-b,us-west1-c --cluster-version 1.14.3-gke.11 --machine-type n1-standard-2 --disk-size "20" --num-nodes 1
# Get credentials to use kubectl
gcloud beta container clusters get-credentials stackgres-demo-gke-cluster --zone us-west1-a --project stackgres-demo
# Verify cluster information and empty-ness
kubectl cluster-info
kubectl get pods
# Install helm-tiller plugin
helm tiller start
# Install StackGres
helm install --name stackgres-operator operator/install/kubernetes/chart/stackgres-operator --set-string image.tag=66-ui-web-services-jvm --set-string image.pullPolicy=Always
kubectl get deployment -n stackgres
# Deploy test PostgreSQL cluster with Patroni and PgBouncer
helm install --namespace default --name stackgres-cluster operator/install/kubernetes/chart/stackgres-cluster
# Verify
kubectl exec -it stackgres-0 -c postgres-util -- psql
kubectl exec -it stackgres-0 -c patroni -- patronictl list
# Forward port, access web UI
kubectl port-forward -n stackgres "$(kubectl get pod -n stackgres | tail -n 1 | cut -d ' ' -f 1)" 8888:8080
# Stop helm tiller
helm tiller stop
```
issue