-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to set custom ccp_monitoring pass
With this change users can update the <cluster>-monitoring secret with a password, in either the `stringData` or `data` secret fields, and remove the verifier to update the ccp_monitoring password in postgres. After this users will need to restart the exporter process by deleting the instance pods (a solution that doesn't require full pod restarts is coming). This change is to support monitoring for standby clusters. Before this a standby cluster would be created without having access to the ccp_monitoring user password that was replicated from the primary cluster. Test to ensure that the postgres_exporter can scrape postgres using a custom ccp_monitoring password. The tests will: 1. create a cluster with exporter enabled and ensure metrics can be collected 2. Update the password and restart the pod 3. ensure that metrics can still be collected with the new password Tests now require jq to run - Refactor existing exporter tests - Split out the tls and no-tls tests into separate directories. - Update the tests to check the containers ready conditions - Add collectors for test failures - Include a test where we deploy a postgres-cluster with monitoring enabled on a replica. It will then check that the exporter on the replica can hit the query the database - Update exporter to use pass file - The exporter container now provides the ccp_monitoring password to postgres_exporter using a password file instead of an environment variable. With this, the password can be updated without requiring a container restart. The path to the password file has also been added to the exporter watcher logic meaning that the postgres_exporter process will be restarted when either the queries directory or password file change. - The password change test is updated to check that the postgres_exporter pid has been updated before trying to re-connect. - Update pgmonitor 4.9 - Update to pull pgMonitor 4.9 queries. The new version has a specific file for the global_dbsize metric that needs to be included when generating the default queries - Standby metrics testing - Now that the password for the monitoring user is configurable, users can configure a standby cluster to allow the exporter to query postgres using the ccp_monitoring user. This change implements testing to validate this use case. This test is included in e2e-other because it requires more work. We need to ensure a backup is complete before attempting to curl metrics. See note below* Note: Move standby and replica tests to e2e-other These two test can fail because of a scrape_error if a backup has not completed. They need to be updated to check that a backup is complete before attempting to collect metrics. There is a related story in our backlog. Due to the race condition, backup not being complete, they could pass or fail. After a backup chack is in place they should be able to move back into the e2e directory.
- Loading branch information
Showing
73 changed files
with
1,059 additions
and
494 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
testing/kuttl/e2e-other/exporter-append-custom-queries-enabled/00--cluster.yaml
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
testing/kuttl/e2e-other/exporter-append-custom-queries-enabled/00-assert.yaml
This file was deleted.
Oops, something went wrong.
52 changes: 0 additions & 52 deletions
52
testing/kuttl/e2e-other/exporter-append-custom-queries-enabled/01--check-exporter.yaml
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
...tl/e2e-other/exporter-append-custom-queries-enabled/02--custom-config-append-enabled.yaml
This file was deleted.
Oops, something went wrong.
48 changes: 0 additions & 48 deletions
48
testing/kuttl/e2e-other/exporter-append-custom-queries-enabled/03--check-queries.yaml
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
testing/kuttl/e2e-other/exporter-append-custom-queries-enabled/README.md
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
testing/kuttl/e2e-other/exporter-append-custom-queries/00--create-cluster.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
apply: | ||
- files/exporter-append-queries-configmap.yaml | ||
- files/exporter-append-queries-cluster.yaml | ||
assert: | ||
- files/exporter-append-queries-cluster-checks.yaml |
Oops, something went wrong.