From 9a0533c47c883b2bf5d683485dcd02796e61f60d Mon Sep 17 00:00:00 2001 From: Sean Greenawalt Date: Mon, 8 Jan 2024 05:17:55 -0500 Subject: [PATCH] [bitnami/postgresql-ha] Fix Double Metrics (#21812) * Update Service to require it to be enabled Signed-off-by: Sean Greenawalt * Add metrics.service.enabled parameter Signed-off-by: Sean Greenawalt * Add metrics.service.enabled to values.yaml Signed-off-by: Sean Greenawalt * Update chart version Signed-off-by: Sean Greenawalt --------- Signed-off-by: Sean Greenawalt --- bitnami/postgresql-ha/Chart.yaml | 2 +- bitnami/postgresql-ha/README.md | 3 ++- .../postgresql-ha/templates/postgresql/metrics-service.yaml | 2 +- bitnami/postgresql-ha/values.yaml | 3 +++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bitnami/postgresql-ha/Chart.yaml b/bitnami/postgresql-ha/Chart.yaml index 960aacdcee..1341a80147 100644 --- a/bitnami/postgresql-ha/Chart.yaml +++ b/bitnami/postgresql-ha/Chart.yaml @@ -40,4 +40,4 @@ maintainers: name: postgresql-ha sources: - https://github.com/bitnami/charts/tree/main/bitnami/postgresql-ha -version: 12.3.7 +version: 12.4.0 diff --git a/bitnami/postgresql-ha/README.md b/bitnami/postgresql-ha/README.md index 318de874f6..618b612a0d 100644 --- a/bitnami/postgresql-ha/README.md +++ b/bitnami/postgresql-ha/README.md @@ -508,6 +508,7 @@ Additionally, if `persistence.resourcePolicy` is set to `keep`, you should manua | `metrics.customLivenessProbe` | Override default liveness probe | `{}` | | `metrics.customReadinessProbe` | Override default readiness probe | `{}` | | `metrics.customStartupProbe` | Override default startup probe | `{}` | +| `metrics.service.enabled` | PostgreSQL Prometheus exporter metrics service enabled | `true` | | `metrics.service.type` | PostgreSQL Prometheus exporter metrics service type | `ClusterIP` | | `metrics.service.ports.metrics` | PostgreSQL Prometheus exporter metrics service port | `9187` | | `metrics.service.nodePorts.metrics` | PostgreSQL Prometheus exporter Node Port | `""` | @@ -1030,4 +1031,4 @@ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file +limitations under the License. diff --git a/bitnami/postgresql-ha/templates/postgresql/metrics-service.yaml b/bitnami/postgresql-ha/templates/postgresql/metrics-service.yaml index 7285232caf..53768a545f 100644 --- a/bitnami/postgresql-ha/templates/postgresql/metrics-service.yaml +++ b/bitnami/postgresql-ha/templates/postgresql/metrics-service.yaml @@ -3,7 +3,7 @@ Copyright VMware, Inc. SPDX-License-Identifier: APACHE-2.0 */}} -{{- if .Values.metrics.enabled }} +{{- if and .Values.metrics.enabled .Values.metrics.service.enabled }} apiVersion: v1 kind: Service metadata: diff --git a/bitnami/postgresql-ha/values.yaml b/bitnami/postgresql-ha/values.yaml index cebf82ae58..83d7ef9d4e 100644 --- a/bitnami/postgresql-ha/values.yaml +++ b/bitnami/postgresql-ha/values.yaml @@ -1678,6 +1678,9 @@ metrics: ## Metrics service parameters ## service: + ## @param metrics.service.enabled PostgreSQL Prometheus exporter metrics service enabled + ## + enabled: true ## @param metrics.service.type PostgreSQL Prometheus exporter metrics service type ## type: ClusterIP