Skip to content

Commit

Permalink
Update metric prop names env vars (#5894)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
onobc authored Aug 12, 2024
1 parent 8c2b07f commit 967c15e
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 48 deletions.
6 changes: 3 additions & 3 deletions src/carvel/config/dataflow.star
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -105,4 +105,4 @@ end

def dataflow_has_password():
return non_empty_string(data.values.scdf.server.database.password)
end
end
6 changes: 3 additions & 3 deletions src/carvel/config/skipper.star
Original file line number Diff line number Diff line change
Expand Up @@ -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}])
Expand All @@ -88,4 +88,4 @@ end

def skipper_has_password():
return non_empty_string(data.values.scdf.skipper.database.password)
end
end
8 changes: 4 additions & 4 deletions src/carvel/test/servers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
})
])
Expand Down Expand Up @@ -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' })
])
);
});
Expand Down
4 changes: 2 additions & 2 deletions src/deploy/k8s/yaml/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions src/deploy/k8s/yaml/skipper-deployment-pro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/deploy/k8s/yaml/skipper-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 8 additions & 8 deletions src/docker-compose/docker-compose-prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 8 additions & 8 deletions src/docker-compose/docker-compose-wavefront.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
16 changes: 8 additions & 8 deletions src/templates/docker-compose/docker-compose-prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 8 additions & 8 deletions src/templates/docker-compose/docker-compose-wavefront.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit 967c15e

Please sign in to comment.