Skip to content

Commit

Permalink
Merge pull request #64 from 3scale-ops/fix/exporter-update-issues
Browse files Browse the repository at this point in the history
release: 0.8.2-alpha.3
  • Loading branch information
3scale-robot authored Nov 21, 2024
2 parents 24fafb9 + 9e31a92 commit 22906b6
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 34 deletions.
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 0.8.2-alpha.2
VERSION ?= 0.8.2-alpha.3

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down Expand Up @@ -292,6 +292,12 @@ $(KUTTL):
####################################################
##@ Release Catalog

prepare-release:
if echo $(VERSION) | grep -q 'alpha'; \
then $(MAKE) prepare-alpha-release; \
else $(MAKE) prepare-stable-release; \
fi

prepare-alpha-release: bundle ## Prepare alpha release

prepare-stable-release: bundle ## Prepare stable release
Expand All @@ -301,11 +307,11 @@ catalog-retag-latest:
$(MAKE) container-push \
IMG=$(CATALOG_BASE_IMG) CONTAINER_FILE=$(CATALOG_CONTAINER_FILE) CONTAINER_CTX=$(CATALOG_CONTAINER_CTX)

bundle-publish: bundle-build bundle-push ## Publish new bundle
bundle-publish: prepare-release bundle-push ## Publish new bundle

catalog-publish: catalog-add-bundle catalog-build catalog-push catalog-retag-latest ## Builds and pushes the catalog image
catalog-publish: catalog-add-bundle catalog-push catalog-retag-latest ## Builds and pushes the catalog image

release-publish: container-push bundle-push catalog-publish ## Publish a new stable release (operator, catalog and bundle)
release-publish: container-push bundle-publish catalog-publish ## Publish a new stable release (operator, catalog and bundle)

get-new-release:
@hack/new-release.sh v$(VERSION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ metadata:
operators.operatorframework.io/project_layout: ansible.sdk.operatorframework.io/v1
repository: https://github.com/3scale-ops/prometheus-exporter-operator
support: Red Hat, Inc.
name: prometheus-exporter-operator.v0.8.2-alpha.2
name: prometheus-exporter-operator.v0.8.2-alpha.3
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -125,7 +125,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
image: quay.io/3scale/prometheus-exporter-operator:v0.8.2-alpha.2
image: quay.io/3scale/prometheus-exporter-operator:v0.8.2-alpha.3
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -310,4 +310,4 @@ spec:
provider:
name: Red Hat
url: https://www.redhat.com
version: 0.8.2-alpha.2
version: 0.8.2-alpha.3
2 changes: 2 additions & 0 deletions catalog/prometheus-exporter-operator/alpha-channel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ entries:
replaces: prometheus-exporter-operator.v0.8.1
- name: prometheus-exporter-operator.v0.8.2-alpha.2
replaces: prometheus-exporter-operator.v0.8.2-alpha.1
- name: prometheus-exporter-operator.v0.8.2-alpha.3
replaces: prometheus-exporter-operator.v0.8.2-alpha.2
name: alpha
package: prometheus-exporter-operator
schema: olm.channel

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ kind: Kustomization
images:
- name: controller
newName: quay.io/3scale/prometheus-exporter-operator
newTag: v0.8.2-alpha.2
newTag: v0.8.2-alpha.3
26 changes: 7 additions & 19 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,29 +93,17 @@ $ make mysql-delete

### Permission requirements

- In addition, a database user with specific grants is needed*(this is just an example, go to official doc for latest information)*. To be able to collect metrics from `pg_stat_activity` and `pg_stat_replication` as `non-superuser` you have to create views as a `superuser`, and assign permissions separately to those. In PostgreSQL, views run with the permissions of the user that created them so they can act as security barriers _(this is just an example, go to official doc for latest information)_:
- To be able to collect metrics from `pg_stat*` views as non-superuser in PostgreSQL
server versions >= 10 you can grant the `pg_monitor` or `pg_read_all_stats` [built-in roles](https://www.postgresql.org/docs/current/predefined-roles.html) to the `postgres_exporter` user.

```sql
CREATE USER postgres_exporter PASSWORD 'password';
ALTER USER postgres_exporter SET SEARCH_PATH TO postgres_exporter,pg_catalog;

-- If deploying as non-superuser (for example in AWS RDS), uncomment the GRANT
-- line below and replace <MASTER_USER> with your root user.
-- GRANT postgres_exporter TO <MASTER_USER>
CREATE SCHEMA postgres_exporter AUTHORIZATION postgres_exporter;

CREATE VIEW postgres_exporter.pg_stat_activity
AS
SELECT * from pg_catalog.pg_stat_activity;

GRANT SELECT ON postgres_exporter.pg_stat_activity TO postgres_exporter;
Run following command if you use PostgreSQL versions >= 10

CREATE VIEW postgres_exporter.pg_stat_replication AS
SELECT * from pg_catalog.pg_stat_replication;

GRANT SELECT ON postgres_exporter.pg_stat_replication TO postgres_exporter;
```sql
GRANT pg_monitor to postgres_exporter;
```

If you need to monitor older PostgreSQL servers, [check the official documentation](https://github.com/prometheus-community/postgres_exporter/blob/master/README.md).

> **NOTE** > <br />Remember to use `postgres` database name in the connection string:
>
> ```
Expand Down
4 changes: 2 additions & 2 deletions prometheus-rules/es-prometheusrule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
rules:
# Cluster status alerts
- alert: ElasticsearchDown
expr: elasticsearch_cluster_health_up == 0
expr: elasticsearch_clusterinfo_up == 0
for: 1m
labels:
severity: critical
Expand Down Expand Up @@ -89,4 +89,4 @@ spec:
labels:
severity: critical
annotations:
message: "Elasticsearch node {{ $labels.name }} has high CPU usage"
message: "Elasticsearch node {{ $labels.name }} has high CPU usage"
10 changes: 5 additions & 5 deletions roles/prometheusexporter/exporters/es/grafanadashboard.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@
"tableColumn": "Value",
"targets": [
{
"expr": "elasticsearch_cluster_health_up{namespace=\"$namespace\", prometheus_exporter=\"$prometheus_exporter\"}",
"expr": "elasticsearch_clusterinfo_up{namespace=\"$namespace\", prometheus_exporter=\"$prometheus_exporter\"}",
"format": "time_series",
"instant": false,
"intervalFactor": 1,
"legendFormat": "",
"legendFormat": "Value",
"refId": "A"
}
],
Expand Down Expand Up @@ -194,7 +194,7 @@
"format": "time_series",
"instant": false,
"intervalFactor": 1,
"legendFormat": "",
"legendFormat": "{{ '{{' }} color {{ '}}' }}",
"refId": "A"
}
],
Expand Down Expand Up @@ -2764,14 +2764,14 @@
{
"allValue": null,
"datasource": "$datasource",
"definition": "label_values(elasticsearch_cluster_health_up{namespace=\"$namespace\"}, prometheus_exporter)",
"definition": "label_values(elasticsearch_cluster_health_status{namespace=\"$namespace\"}, prometheus_exporter)",
"hide": 0,
"includeAll": false,
"label": "Prometheus Exporter",
"multi": false,
"name": "prometheus_exporter",
"options": [],
"query": "label_values(elasticsearch_cluster_health_up{namespace=\"$namespace\"}, prometheus_exporter)",
"query": "label_values(elasticsearch_cluster_health_status{namespace=\"$namespace\"}, prometheus_exporter)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
Expand Down

0 comments on commit 22906b6

Please sign in to comment.