You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/installation/kustomize.md
+39-43Lines changed: 39 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ weight: 10
9
9
10
10
This section provides instructions for installing and configuring PGO using Kustomize.
11
11
12
+
If you are deploying using the installer from the [Crunchy Data Customer Portal](https://access.crunchydata.com/), please refer to the guide there for alternative setup information.
13
+
12
14
## Prerequisites
13
15
14
16
First, go to GitHub and [fork the Postgres Operator examples](https://github.com/CrunchyData/postgres-operator-examples/fork)
@@ -27,13 +29,14 @@ cd postgres-operator-examples
27
29
28
30
The PGO installation project is located in the `kustomize/install` directory.
29
31
32
+
30
33
## Configuration
31
34
32
35
While the default Kustomize install should work in most Kubernetes environments, it may be
33
36
necessary to further customize the Kustomize project(s) according to your specific needs.
34
37
35
38
For instance, to customize the image tags utilized for the PGO Deployment, the `images` setting
36
-
in the `kustomize/install/bases/kustomization.yaml` file can be modified:
39
+
in the `kustomize/install/default/kustomization.yaml` file can be modified:
37
40
38
41
```yaml
39
42
images:
@@ -46,7 +49,7 @@ If you are deploying using the images from the [Crunchy Data Customer Portal](ht
46
49
47
50
Please note that the Kustomize install project will also create a namespace for PGO
48
51
by default (though it is possible to install without creating the namespace, as shown below). To
49
-
modify the name of namespace created by the installer, the `kustomize/install/namespace.yaml`
52
+
modify the name of namespace created by the installer, the `kustomize/install/namespace/namespace.yaml`
50
53
should be modified:
51
54
52
55
```yaml
@@ -56,14 +59,14 @@ metadata:
56
59
name: custom-namespace
57
60
```
58
61
59
-
The `namespace` setting in `kustomize/install/bases/kustomization.yaml` should be
62
+
The `namespace` setting in `kustomize/install/default/kustomization.yaml` should be
60
63
modified accordingly.
61
64
62
65
```yaml
63
66
namespace: custom-namespace
64
67
```
65
68
66
-
By default, PGO deploys with debug logging turned on. If you wish to disable this, you need to set the `CRUNCHY_DEBUG` environmental variable to `"false"` that is found in the `kustomize/install/bases/manager/manager.yaml` file. You can add the following to your kustomization to disable debug logging:
69
+
By default, PGO deploys with debug logging turned on. If you wish to disable this, you need to set the `CRUNCHY_DEBUG` environmental variable to `"false"` that is found in the `kustomize/install/manager/manager.yaml` file. Alternatively, you can add the following to your `kustomize/install/manager/kustomization.yaml` to disable debug logging:
67
70
68
71
```yaml
69
72
patchesStrategicMerge:
@@ -93,52 +96,41 @@ the permissions it requires to properly manage PostgreSQL clusters across all na
93
96
when PGO is configured to manage PostgreSQL clusters within a single namespace only, a Role and
94
97
RoleBinding is created instead.
95
98
96
-
By default, the Kustomize installer will configure PGO to manage PostgreSQL clusters in all
97
-
namespaces, which means a ClusterRole and ClusterRoleBinding will also be created by default.
98
-
To instead configure PGO to manage PostgreSQL clusters in only a single namespace, simply modify
99
-
the `bases` section of the `kustomize/install/bases/kustomization.yaml` file as follows:
100
-
101
-
```yaml
102
-
bases:
103
-
- crd
104
-
- rbac/namespace
105
-
- manager
106
-
```
107
-
108
-
Note that `rbac/cluster` has been changed to `rbac/namespace`.
109
-
110
-
Add the PGO_TARGET_NAMESPACE environment variable to the env section of the `kustomize/install/bases/manager/manager.yaml` file to facilitate the ability to specify the single namespace as follows:
99
+
The installation of the necessary resources for a cluster-wide or a namespace-limited
100
+
operator is done automatically by Kustomize, as described below in the Install section.
101
+
The only potential change you may need to make is to the Namespace resource and the
102
+
`namespace`field if using a namespace other than the default `postgres-operator`.
With these configuration changes, PGO will create a Role and RoleBinding, and will therefore only manage PostgreSQL clusters created within the namespace defined using the `namespace` setting in the
The `kustomization.yaml` files in those folders take care of applying the appropriate permissions.
133
+
142
134
### Automated Upgrade Checks
143
135
144
136
By default, PGO will automatically check for updates to itself and software components by making a request to a URL. If PGO detects there are updates available, it will print them in the logs. As part of the check, PGO will send aggregated, anonymized information about the current deployment to the endpoint. An upcoming release will allow for PGO to opt-in to receive and apply updates to software components automatically.
@@ -148,17 +140,21 @@ PGO will check for updates upon startup and once every 24 hours. Any errors in c
148
140
## Uninstall
149
141
150
142
Once PGO has been installed, it can also be uninstalled using `kubectl` and Kustomize.
151
-
To uninstall PGO and then also delete the namespace it had been deployed into (assuming the
152
-
namespace was previously created using the Kustomize installer as described above), the
153
-
following command can be utilized:
143
+
To uninstall PGO (assuming it was installed in cluster-wide mode), the following command can be
144
+
utilized:
145
+
146
+
```shell
147
+
kubectl delete -k kustomize/install/default
148
+
```
149
+
150
+
To uninstall PGO installed with only namespace permissions, use:
0 commit comments