From 967c15e326e0c5dd0685035beb719cdc211c5103 Mon Sep 17 00:00:00 2001 From: Chris Bono Date: Mon, 12 Aug 2024 15:57:02 -0500 Subject: [PATCH] Update metric prop names env vars (#5894) The previous commits for updating metric names to the Boot 3.x format missed some env vars. This commit updates the env vars as well. --- src/carvel/config/dataflow.star | 6 +++--- src/carvel/config/skipper.star | 6 +++--- src/carvel/test/servers.test.ts | 8 ++++---- src/deploy/k8s/yaml/server-deployment.yaml | 4 ++-- src/deploy/k8s/yaml/skipper-deployment-pro.yaml | 4 ++-- src/deploy/k8s/yaml/skipper-deployment.yaml | 4 ++-- src/docker-compose/docker-compose-prometheus.yml | 16 ++++++++-------- src/docker-compose/docker-compose-wavefront.yml | 16 ++++++++-------- .../docker-compose/docker-compose-prometheus.yml | 16 ++++++++-------- .../docker-compose/docker-compose-wavefront.yml | 16 ++++++++-------- 10 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/carvel/config/dataflow.star b/src/carvel/config/dataflow.star index b59b410b01..87e3386148 100644 --- a/src/carvel/config/dataflow.star +++ b/src/carvel/config/dataflow.star @@ -41,10 +41,10 @@ def dataflow_container_env(): envs.extend([{"name": "SPRING_JPA_DATABASE_PLATFORM", "value": dataflow_db_dialect()}]) end if grafana_enabled(): - envs.extend([{"name": "MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED", "value": "true"}]) + envs.extend([{"name": "MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED", "value": "true"}]) end if prometheus_rsocket_proxy_enabled(): - envs.extend([{"name": "MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED", "value": "true"}]) + envs.extend([{"name": "MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_ENABLED", "value": "true"}]) end if non_empty_string(data.values.scdf.server.database.secretName): if non_empty_string(data.values.scdf.server.database.secretUsernameKey): @@ -105,4 +105,4 @@ end def dataflow_has_password(): return non_empty_string(data.values.scdf.server.database.password) -end \ No newline at end of file +end diff --git a/src/carvel/config/skipper.star b/src/carvel/config/skipper.star index 05ce677ec7..bf12aacacd 100644 --- a/src/carvel/config/skipper.star +++ b/src/carvel/config/skipper.star @@ -59,10 +59,10 @@ def skipper_container_env(): end end if grafana_enabled(): - envs.extend([{"name": "MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED", "value": "true"}]) + envs.extend([{"name": "MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED", "value": "true"}]) end if prometheus_rsocket_proxy_enabled(): - envs.extend([{"name": "MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED", "value": "true"}]) + envs.extend([{"name": "MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_ENABLED", "value": "true"}]) end for e in data.values.scdf.skipper.env: envs.extend([{"name": e.name, "value": e.value}]) @@ -88,4 +88,4 @@ end def skipper_has_password(): return non_empty_string(data.values.scdf.skipper.database.password) -end \ No newline at end of file +end diff --git a/src/carvel/test/servers.test.ts b/src/carvel/test/servers.test.ts index 839d682da4..7653454f61 100644 --- a/src/carvel/test/servers.test.ts +++ b/src/carvel/test/servers.test.ts @@ -300,11 +300,11 @@ describe('servers', () => { expect(envs).toEqual( expect.arrayContaining([ expect.objectContaining({ - name: 'MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED', + name: 'MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED', value: 'true' }), expect.objectContaining({ - name: 'MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED', + name: 'MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_ENABLED', value: 'true' }) ]) @@ -454,8 +454,8 @@ describe('servers', () => { expect(envs).toBeTruthy(); expect(envs).toEqual( expect.arrayContaining([ - expect.objectContaining({ name: 'MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED', value: 'true' }), - expect.objectContaining({ name: 'MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED', value: 'true' }) + expect.objectContaining({ name: 'MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED', value: 'true' }), + expect.objectContaining({ name: 'MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_ENABLED', value: 'true' }) ]) ); }); diff --git a/src/deploy/k8s/yaml/server-deployment.yaml b/src/deploy/k8s/yaml/server-deployment.yaml index c9b93ab788..1dbf88efc7 100644 --- a/src/deploy/k8s/yaml/server-deployment.yaml +++ b/src/deploy/k8s/yaml/server-deployment.yaml @@ -128,9 +128,9 @@ spec: configMapKeyRef: key: SPRING_JPA_DATABASE_PLATFORM name: scdf-datasource - - name: 'MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED' + - name: 'MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED' value: 'true' - - name: 'MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED' + - name: 'MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_ENABLED' value: 'true' - name: 'SPRING_CLOUD_DATAFLOW_METRICS_DASHBOARD_URL' value: 'http://localhost:3000' diff --git a/src/deploy/k8s/yaml/skipper-deployment-pro.yaml b/src/deploy/k8s/yaml/skipper-deployment-pro.yaml index 4e1f3d588d..ec8dfc3f93 100644 --- a/src/deploy/k8s/yaml/skipper-deployment-pro.yaml +++ b/src/deploy/k8s/yaml/skipper-deployment-pro.yaml @@ -115,9 +115,9 @@ spec: configMapKeyRef: key: SPRING_JPA_DATABASE_PLATFORM name: scdf-datasource - - name: MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED + - name: MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED value: 'true' - - name: MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED + - name: MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_ENABLED value: 'true' serviceAccountName: scdf-sa volumes: diff --git a/src/deploy/k8s/yaml/skipper-deployment.yaml b/src/deploy/k8s/yaml/skipper-deployment.yaml index 270c13b78d..9616fed3df 100644 --- a/src/deploy/k8s/yaml/skipper-deployment.yaml +++ b/src/deploy/k8s/yaml/skipper-deployment.yaml @@ -115,9 +115,9 @@ spec: configMapKeyRef: key: SPRING_JPA_DATABASE_PLATFORM name: scdf-datasource - - name: MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED + - name: MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED value: 'true' - - name: MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED + - name: MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_ENABLED value: 'true' serviceAccountName: scdf-sa volumes: diff --git a/src/docker-compose/docker-compose-prometheus.yml b/src/docker-compose/docker-compose-prometheus.yml index 59592daf4a..d06f5b0a23 100644 --- a/src/docker-compose/docker-compose-prometheus.yml +++ b/src/docker-compose/docker-compose-prometheus.yml @@ -6,19 +6,19 @@ services: dataflow-server: environment: - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED=true - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_HOST=prometheus-rsocket-proxy - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_PORT=7001 + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED=true + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_ENABLED=true + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_HOST=prometheus-rsocket-proxy + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_PORT=7001 #- SPRING_APPLICATION_JSON={"spring.jpa.properties.hibernate.generate_statistics":true} - SPRING_CLOUD_DATAFLOW_METRICS_DASHBOARD_URL=http://localhost:3000 skipper-server: environment: - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED=true - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_HOST=prometheus-rsocket-proxy - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_PORT=7001 + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED=true + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_ENABLED=true + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_HOST=prometheus-rsocket-proxy + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_PORT=7001 #- SPRING_APPLICATION_JSON={"spring.jpa.properties.hibernate.generate_statistics":true} prometheus-rsocket-proxy: diff --git a/src/docker-compose/docker-compose-wavefront.yml b/src/docker-compose/docker-compose-wavefront.yml index 689dc4da79..b176a7c7b9 100644 --- a/src/docker-compose/docker-compose-wavefront.yml +++ b/src/docker-compose/docker-compose-wavefront.yml @@ -10,16 +10,16 @@ version: '3' services: dataflow-server: environment: - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_ENABLED=true - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_APITOKEN=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!} - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_URI=${WAVEFRONT_URI:-https://vmware.wavefront.com} - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_SOURCE=${WAVEFRONT_SOURCE:-scdf-docker-compose} + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_ENABLED=true + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_APITOKEN=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!} + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_URI=${WAVEFRONT_URI:-https://vmware.wavefront.com} + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_SOURCE=${WAVEFRONT_SOURCE:-scdf-docker-compose} - SPRING_APPLICATION_JSON={"spring.jpa.properties.hibernate.generate_statistics":true} skipper-server: environment: - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_ENABLED=true - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_APITOKEN=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!} - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_URI=${WAVEFRONT_URI:-https://vmware.wavefront.com} - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_SOURCE=${WAVEFRONT_SOURCE:-scdf-docker-compose} + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_ENABLED=true + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_APITOKEN=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!} + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_URI=${WAVEFRONT_URI:-https://vmware.wavefront.com} + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_SOURCE=${WAVEFRONT_SOURCE:-scdf-docker-compose} - SPRING_APPLICATION_JSON={"spring.jpa.properties.hibernate.generate_statistics":true} diff --git a/src/templates/docker-compose/docker-compose-prometheus.yml b/src/templates/docker-compose/docker-compose-prometheus.yml index 4ad09ff3d4..3a16933508 100644 --- a/src/templates/docker-compose/docker-compose-prometheus.yml +++ b/src/templates/docker-compose/docker-compose-prometheus.yml @@ -6,19 +6,19 @@ services: dataflow-server: environment: - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED=true - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_HOST=prometheus-rsocket-proxy - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_PORT=7001 + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED=true + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_ENABLED=true + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_HOST=prometheus-rsocket-proxy + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_PORT=7001 #- SPRING_APPLICATION_JSON={"spring.jpa.properties.hibernate.generate_statistics":true} - SPRING_CLOUD_DATAFLOW_METRICS_DASHBOARD_URL=http://localhost:3000 skipper-server: environment: - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED=true - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_HOST=prometheus-rsocket-proxy - - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_PORT=7001 + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED=true + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_ENABLED=true + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_HOST=prometheus-rsocket-proxy + - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_RSOCKET_PORT=7001 #- SPRING_APPLICATION_JSON={"spring.jpa.properties.hibernate.generate_statistics":true} prometheus-rsocket-proxy: diff --git a/src/templates/docker-compose/docker-compose-wavefront.yml b/src/templates/docker-compose/docker-compose-wavefront.yml index 689dc4da79..b176a7c7b9 100644 --- a/src/templates/docker-compose/docker-compose-wavefront.yml +++ b/src/templates/docker-compose/docker-compose-wavefront.yml @@ -10,16 +10,16 @@ version: '3' services: dataflow-server: environment: - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_ENABLED=true - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_APITOKEN=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!} - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_URI=${WAVEFRONT_URI:-https://vmware.wavefront.com} - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_SOURCE=${WAVEFRONT_SOURCE:-scdf-docker-compose} + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_ENABLED=true + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_APITOKEN=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!} + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_URI=${WAVEFRONT_URI:-https://vmware.wavefront.com} + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_SOURCE=${WAVEFRONT_SOURCE:-scdf-docker-compose} - SPRING_APPLICATION_JSON={"spring.jpa.properties.hibernate.generate_statistics":true} skipper-server: environment: - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_ENABLED=true - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_APITOKEN=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!} - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_URI=${WAVEFRONT_URI:-https://vmware.wavefront.com} - - MANAGEMENT_METRICS_EXPORT_WAVEFRONT_SOURCE=${WAVEFRONT_SOURCE:-scdf-docker-compose} + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_ENABLED=true + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_APITOKEN=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!} + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_URI=${WAVEFRONT_URI:-https://vmware.wavefront.com} + - MANAGEMENT_WAVEFRONT_METRICS_EXPORT_SOURCE=${WAVEFRONT_SOURCE:-scdf-docker-compose} - SPRING_APPLICATION_JSON={"spring.jpa.properties.hibernate.generate_statistics":true}