Skip to content

Commit c86c9b6

Browse files
committed
Merge branch '1743-review-the-quickstart-demo-documentation' into 'main-1.15'
doc: using helm in quickstart guide See merge request ongresinc/stackgres!1630
2 parents e254d9a + be850eb commit c86c9b6

5 files changed

Lines changed: 22 additions & 42 deletions

File tree

doc/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ find "$(dirname "$0")/../stackgres-k8s/src/common/src/main/resources/crds" -name
1010
cp "$FILE" "$(dirname "$0")/data/crds"
1111
done
1212
cp "$(dirname "$0")/../stackgres-k8s/install/helm/stackgres-operator/Chart.yaml" "$(dirname "$0")/data/stackgres_operator_Chart.yaml"
13+
sed -n 's#^ *RUN wget "https://get.helm.sh/helm-v\([^-]\+\)-.*$#version: \1#p' "$(dirname "$0")/../stackgres-k8s/ci/build/Dockerfile-ci" > "$(dirname "$0")/data/helm_version.yaml"
1314

1415
STACKGRES_VERSION="${STACKGRES_VERSION:-$(sh stackgres-k8s/ci/build/version.sh)}"
1516
echo "current_version: \"$STACKGRES_VERSION\"" > "$(dirname "$0")/data/versions.yml"

doc/content/en/03-demo-quickstart/_index.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,22 @@ aliases: [ /demo/quickstart ]
1313
On this page, you will learn how to get started with StackGres.
1414
We will install StackGres on a Kubernetes cluster and create a Postgres instance.
1515

16-
> **NOTE:** To run this demo you need a [K8s environment]({{% relref "04-administration-guide/01-stackgres-installation/01-pre-requisites/01-k8s-environments" %}}) that is already configured in `kubectl`.
16+
> **NOTE:** To run this demo you need a [K8s environment]({{% relref "04-administration-guide/01-stackgres-installation/01-pre-requisites" %}}) with `kubectl` command already configured to use it. You will also need [`helm`](https://helm.sh/) command version >= `{{% helm-min-version %}}`.
17+
18+
## Set Up the Helm Repository
19+
20+
Add the StackGres Helm repository:
21+
22+
```
23+
helm repo add stackgres-charts https://stackgres.io/downloads/stackgres-k8s/stackgres/helm/
24+
```
1725

1826
## Installing the Operator
1927

20-
We ship some Kubernetes resources files in order to allow installation of the StackGres operator
21-
for demonstration purpose. Assuming you have already installed the
22-
[kubectl CLI](https://kubernetes.io/docs/tasks/tools/install-kubectl/), you can install the
23-
operator with the following command:
28+
Install the operator using the following command:
2429

2530
```
26-
kubectl create -f {{< download-url >}}/stackgres-operator-demo.yml
31+
helm install --create-namespace --namespace stackgres stackgres-operator stackgres-charts/stackgres-operator --version {{< version >}}
2732
```
2833

2934
This will install all required resources, and add the StackGres operator to a new namespace `stackgres`.
@@ -151,10 +156,9 @@ Then you can open the browser at the following address [`localhost:8443/admin/`]
151156
## Cleaning up
152157

153158
To uninstall all resources generated by this demo, you can run:
159+
154160
```
155-
kubectl delete --ignore-not-found -f {{< download-url >}}/stackgres-operator-demo.yml
161+
helm uninstall --namespace stackgres stackgres-operator
156162
```
157163

158-
Check the [uninstall]({{% relref "/04-administration-guide/999999-uninstall" %}}) section for more details.
159-
160-
Also, see the [installation via helm]({{% relref "/04-administration-guide/01-stackgres-installation/02-installation-via-helm" %}}) section in order to change those.
164+
Check the [uninstall]({{% relref "/04-administration-guide/999999-uninstall" %}}#using-helm) section for more details.

doc/content/en/04-administration-guide/01-stackgres-installation/02-installation-via-helm/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Details about how to install the StackGres operator using Helm.
77
showToc: true
88
---
99

10-
The StackGres operator can be installed using [Helm](https://helm.sh/) version >= `3.1.1`.
10+
The StackGres operator can be installed using [Helm](https://helm.sh/) version >= `{{% helm-min-version %}}`.
1111
As you may expect, a production environment will require you to install and set up additional components alongside your StackGres operator and cluster resources.
1212

1313
On this page, we are going through all the necessary steps to set up a production-grade StackGres environment using Helm.
@@ -28,7 +28,7 @@ Install the operator:
2828
helm install --create-namespace --namespace stackgres stackgres-operator stackgres-charts/stackgres-operator
2929
```
3030

31-
> You can specify the version adding `--version <version, e.g. 1.0.0>` to the Helm command.
31+
> You can specify the version adding `--version <version>` to the Helm command.
3232
3333
For more installation options have a look at the [Operator Parameters]({{% relref "04-administration-guide/01-stackgres-installation/02-installation-via-helm/01-operator-parameters" %}}) section for more information.
3434

doc/content/en/04-administration-guide/999999-uninstall/_index.md

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -186,34 +186,6 @@ sgpoolingconfig.stackgres.io "generated-from-default-1609864616550" deleted
186186
187187
```
188188

189-
#### Prometheus service monitors and pod monitors
190-
191-
The missing part are the ServiceMonitors and PodMonitors that the operator created to integrate with
192-
the Prometheus Operator.
193-
194-
List all StackGres ServiceMonitors and PodMonitors:
195-
196-
```
197-
kubectl get servicemonitors,podmonitors -A -l app=StackGresCluster
198-
```
199-
200-
```
201-
NAMESPACE NAME AGE
202-
stackgres servicemonitor.monitoring.coreos.com/ui-ui-stackgres-envoy 120m
203-
stackgres servicemonitor.monitoring.coreos.com/ui-ui-stackgres-postgres-exporter 120m
204-
```
205-
206-
To delete all:
207-
208-
```
209-
kubectl get configmap -l app=StackGresCluster -o name -A | xargs kubectl delete
210-
```
211-
212-
```
213-
configmap "my-db-cluster-prometheus-postgres-exporter-config" deleted
214-
```
215-
216-
217189
## Uninstall the Operator
218190

219191
### Using Helm
@@ -223,7 +195,7 @@ Execute the steps below to remove the helm chart release:
223195
```
224196
## locate the namespace that the operator was installed
225197
## our doc always points to `stackgres`
226-
helm list --all-namespaces | grep '^\(stackgres-operator\|NAME\)\s'
198+
helm list --all-namespaces
227199
```
228200

229201
Will show the installed StackGres helm chart releases like in the following output:
@@ -253,6 +225,8 @@ kubectl get all -n stackgres
253225
No resources found in stackgres namespace.
254226
```
255227

228+
See also the section about [uninstalling unamespaced resources](#cleanup-unamespaced-resources)
229+
256230
## Manually
257231

258232
This tutorial expects that the operator was installed on the `stackgres` namespace. Change it if you have this installed in a different namespace.
@@ -288,7 +262,7 @@ deployment.apps "stackgres-restapi" deleted
288262

289263
## Cleanup unamespaced resources
290264

291-
To completely remove all the
265+
Follow this section in order to remove unamesapced resources.
292266

293267
### Webhooks
294268

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{ $.Site.Data.helm_version.version | strings.ReplaceRE "^([^.]+\\.[^.]+).*$" "$1" }}

0 commit comments

Comments
 (0)