Skip to content

Commit cd53751

Browse files
authored
Adds metrics support for helm and pgo-deployer
Metrics support was an undocumented feature of the pgo-deployer. This commit adds documentation around how you can use the `kubectl` job manifest and `pgo-deployer` to install and uninstall the metrics infrastructure. The deployment options in the new yaml files are updated so that the boolean values are treated as bool instead of string.
1 parent c5ffd28 commit cd53751

File tree

4 files changed

+87
-41
lines changed

4 files changed

+87
-41
lines changed

docs/content/installation/other/helm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ file will be used to populate the configuation options in the ConfigMap.
6464
### Configuration - `values.yaml`
6565

6666
The `values.yaml` file contains all of the configuration parametes for deploying
67-
the PostgreSQL Operator. The [values.yaml file]() contains the defaults that
67+
the PostgreSQL Operator. The [values.yaml file](https://github.com/CrunchyData/postgres-operator/blob/master/installers/helm/postgres-operator/values.yaml) contains the defaults that
6868
should work in most Kubernetes environments, but it may require some customization.
6969

7070
For a detailed description of each configuration parameter, please read the

docs/content/installation/postgres-operator.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,52 @@ If successful, you should see output similar to this:
272272
pgo client version 4.4.0-beta.1
273273
pgo-apiserver version 4.4.0-beta.1
274274
```
275+
## Installing Metrics Infrastructure
276+
277+
The `pgo-deployer` image can be used to deploy Grafana and Prometheus alongside
278+
the PostgreSQL Operator. The settings outlined in the [Installing-metrics]({{< relref "/installation/other/ansible/installing-metrics" >}})
279+
seciton of the documentation can be defined in your `values.yaml` configmap.
280+
Once you have updated the relevant metrics options you can update the
281+
`DEPLOY_ACTION` of the job manifest. By updating the environment variable to
282+
include `install-metrics` the installer will use the metrics settings when
283+
deploying.
284+
285+
### Installing
286+
287+
The following can be used to install the PostgreSQL Operator and metrics
288+
infrastructure at the same time.
289+
290+
```yaml
291+
env:
292+
- name: DEPLOY_ACTION
293+
value: install,install-metrics
294+
```
295+
296+
### Uninstalling
297+
298+
The following can be used to uninstall the PostgreSQL Operator and metrics
299+
infrastructure at the same time.
300+
```yaml
301+
env:
302+
- name: DEPLOY_ACTION
303+
value: uninstall,uninstall-metrics
304+
```
305+
306+
### Updating Previous Deployment
307+
308+
If you have previously deployed the PostgreSQL Operator, you can install or
309+
uninstall the metrics infrastructure separately using these settings:
310+
311+
```yaml
312+
# Install
313+
env:
314+
- name: DEPLOY_ACTION
315+
value: install-metrics
316+
# Uninstall
317+
env:
318+
- name: DEPLOY_ACTION
319+
value: uninstall-metrics
320+
```
275321
276322
## Post-Installation
277323

installers/kubectl/postgres-operator-ocp311.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ metadata:
2626
data:
2727
values.yaml: |+
2828
---
29-
archive_mode: "true"
29+
archive_mode: true
3030
archive_timeout: "60"
3131
backrest_aws_s3_bucket: ""
3232
backrest_aws_s3_endpoint: ""
3333
backrest_aws_s3_key: ""
3434
backrest_aws_s3_region: ""
3535
backrest_aws_s3_secret: ""
3636
backrest_port: "2022"
37-
badger: "false"
37+
badger: false
3838
ccp_image_prefix: "registry.developers.crunchydata.com/crunchydata"
3939
ccp_image_pull_secret: ""
4040
ccp_image_pull_secret_manifest: ""
4141
ccp_image_tag: "centos7-12.3-4.4.0-beta.1"
42-
create_rbac: "true"
43-
crunchy_debug: "false"
42+
create_rbac: true
43+
crunchy_debug: false
4444
db_name: ""
4545
db_password_age_days: "0"
4646
db_password_length: "24"
@@ -50,38 +50,38 @@ data:
5050
default_instance_memory: "128Mi"
5151
default_pgbackrest_memory: "48Mi"
5252
default_pgbouncer_memory: "24Mi"
53-
delete_metrics_namespace: "false"
54-
delete_operator_namespace: "false"
55-
delete_watched_namespaces: "false"
56-
disable_auto_failover: "false"
57-
disable_fsgroup: "false"
58-
reconcile_rbac: "true"
53+
delete_metrics_namespace: false
54+
delete_operator_namespace: false
55+
delete_watched_namespaces: false
56+
disable_auto_failover: false
57+
disable_fsgroup: false
58+
reconcile_rbac: true
5959
exporterport: "9187"
6060
grafana_admin_password: ""
6161
grafana_admin_username: "admin"
62-
grafana_install: "false"
62+
grafana_install: false
6363
grafana_storage_access_mode: "ReadWriteOnce"
6464
grafana_storage_class_name: "fast"
6565
grafana_supplemental_groups: "65534"
6666
grafana_volume_size: "1G"
67-
metrics: "false"
67+
metrics: false
6868
metrics_namespace: "pgo"
6969
namespace: "pgo"
7070
namespace_mode: "dynamic"
7171
pgbadgerport: "10000"
72-
pgo_add_os_ca_store: "false"
72+
pgo_add_os_ca_store: false
7373
pgo_admin_password: "examplepassword"
7474
pgo_admin_perms: "*"
7575
pgo_admin_role_name: "pgoadmin"
7676
pgo_admin_username: "admin"
7777
pgo_apiserver_port: "8443"
7878
pgo_apiserver_url: "https://postgres-operator"
7979
pgo_client_cert_secret: "pgo.tls"
80-
pgo_client_container_install: "false"
80+
pgo_client_container_install: false
8181
pgo_client_version: "4.4.0-beta.1"
82-
pgo_cluster_admin: "false"
83-
pgo_disable_eventing: "false"
84-
pgo_disable_tls: "false"
82+
pgo_cluster_admin: false
83+
pgo_disable_eventing: false
84+
pgo_disable_tls: false
8585
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
8686
pgo_image_pull_secret: ""
8787
pgo_image_pull_secret_manifest: ""
@@ -90,18 +90,18 @@ data:
9090
pgo_noauth_routes: ""
9191
pgo_operator_namespace: "pgo"
9292
pgo_tls_ca_store: ""
93-
pgo_tls_no_verify: "false"
93+
pgo_tls_no_verify: false
9494
pod_anti_affinity: "preferred"
9595
pod_anti_affinity_pgbackrest: ""
9696
pod_anti_affinity_pgbouncer: ""
97-
prometheus_install: "false"
97+
prometheus_install: false
9898
prometheus_storage_access_mode: "ReadWriteOnce"
9999
prometheus_storage_class_name: "fast"
100100
prometheus_supplemental_groups: "65534"
101101
prometheus_volume_size: "1G"
102102
scheduler_timeout: "3600"
103103
service_type: "ClusterIP"
104-
sync_replication: "false"
104+
sync_replication: false
105105
backrest_storage: "hostpathstorage"
106106
backup_storage: "hostpathstorage"
107107
primary_storage: "hostpathstorage"

installers/kubectl/postgres-operator.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,21 @@ rules:
119119
data:
120120
values.yaml: |+
121121
---
122-
archive_mode: "true"
122+
archive_mode: true
123123
archive_timeout: "60"
124124
backrest_aws_s3_bucket: ""
125125
backrest_aws_s3_endpoint: ""
126126
backrest_aws_s3_key: ""
127127
backrest_aws_s3_region: ""
128128
backrest_aws_s3_secret: ""
129129
backrest_port: "2022"
130-
badger: "false"
130+
badger: false
131131
ccp_image_prefix: "registry.developers.crunchydata.com/crunchydata"
132132
ccp_image_pull_secret: ""
133133
ccp_image_pull_secret_manifest: ""
134134
ccp_image_tag: "centos7-12.3-4.4.0-beta.1"
135-
create_rbac: "true"
136-
crunchy_debug: "false"
135+
create_rbac: true
136+
crunchy_debug: false
137137
db_name: ""
138138
db_password_age_days: "0"
139139
db_password_length: "24"
@@ -143,38 +143,38 @@ rules:
143143
default_instance_memory: "128Mi"
144144
default_pgbackrest_memory: "48Mi"
145145
default_pgbouncer_memory: "24Mi"
146-
delete_metrics_namespace: "false"
147-
delete_operator_namespace: "false"
148-
delete_watched_namespaces: "false"
149-
disable_auto_failover: "false"
150-
disable_fsgroup: "false"
151-
reconcile_rbac: "true"
146+
delete_metrics_namespace: false
147+
delete_operator_namespace: false
148+
delete_watched_namespaces: false
149+
disable_auto_failover: false
150+
disable_fsgroup: false
151+
reconcile_rbac: true
152152
exporterport: "9187"
153153
grafana_admin_password: ""
154154
grafana_admin_username: "admin"
155-
grafana_install: "false"
155+
grafana_install: false
156156
grafana_storage_access_mode: "ReadWriteOnce"
157157
grafana_storage_class_name: "fast"
158158
grafana_supplemental_groups: "65534"
159159
grafana_volume_size: "1G"
160-
metrics: "false"
160+
metrics: false
161161
metrics_namespace: "pgo"
162162
namespace: "pgo"
163163
namespace_mode: "dynamic"
164164
pgbadgerport: "10000"
165-
pgo_add_os_ca_store: "false"
165+
pgo_add_os_ca_store: false
166166
pgo_admin_password: "examplepassword"
167167
pgo_admin_perms: "*"
168168
pgo_admin_role_name: "pgoadmin"
169169
pgo_admin_username: "admin"
170170
pgo_apiserver_port: "8443"
171171
pgo_apiserver_url: "https://postgres-operator"
172172
pgo_client_cert_secret: "pgo.tls"
173-
pgo_client_container_install: "false"
173+
pgo_client_container_install: false
174174
pgo_client_version: "4.4.0-beta.1"
175-
pgo_cluster_admin: "false"
176-
pgo_disable_eventing: "false"
177-
pgo_disable_tls: "false"
175+
pgo_cluster_admin: false
176+
pgo_disable_eventing: false
177+
pgo_disable_tls: false
178178
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
179179
pgo_image_pull_secret: ""
180180
pgo_image_pull_secret_manifest: ""
@@ -183,18 +183,18 @@ rules:
183183
pgo_noauth_routes: ""
184184
pgo_operator_namespace: "pgo"
185185
pgo_tls_ca_store: ""
186-
pgo_tls_no_verify: "false"
186+
pgo_tls_no_verify: false
187187
pod_anti_affinity: "preferred"
188188
pod_anti_affinity_pgbackrest: ""
189189
pod_anti_affinity_pgbouncer: ""
190-
prometheus_install: "false"
190+
prometheus_install: false
191191
prometheus_storage_access_mode: "ReadWriteOnce"
192192
prometheus_storage_class_name: "fast"
193193
prometheus_supplemental_groups: "65534"
194194
prometheus_volume_size: "1G"
195195
scheduler_timeout: "3600"
196196
service_type: "ClusterIP"
197-
sync_replication: "false"
197+
sync_replication: false
198198
backrest_storage: "hostpathstorage"
199199
backup_storage: "hostpathstorage"
200200
primary_storage: "hostpathstorage"

0 commit comments

Comments
 (0)