From 826c877f2a3a536cec1ff675ee46337c67e8944d Mon Sep 17 00:00:00 2001 From: sgayangi Date: Wed, 6 Mar 2024 15:29:57 +0530 Subject: [PATCH] Update ports used for Prometheus --- common-controller/internal/config/default_config.go | 2 +- .../data-plane/config-deployer/config-ds-configmap.yaml | 2 +- .../data-plane/config-deployer/config-ds-deployment.yaml | 4 ++-- .../common-controller/common-controller-deployment.yaml | 2 +- .../data-plane/gateway-components/common-log-conf.yaml | 2 +- .../gateway-runtime/gateway-runtime-deployment.yaml | 4 ++-- helm-charts/templates/idp/idp-ds/idp-ds-configmap.yaml | 2 +- helm-charts/templates/idp/idp-ds/idp-ds-deployment.yaml | 4 ++-- idp/idp-domain-service/build.gradle | 2 +- idp/idp-domain-service/docker/build.gradle | 2 +- idp/idp-domain-service/docker/idp/idp.sh | 2 +- .../config-deployer-service/docker/config-deployer/config.sh | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/common-controller/internal/config/default_config.go b/common-controller/internal/config/default_config.go index 396ec2b16..40971fea6 100644 --- a/common-controller/internal/config/default_config.go +++ b/common-controller/internal/config/default_config.go @@ -46,7 +46,7 @@ var defaultConfig = &Config{ Metrics: metrics{ Enabled: false, Type: "prometheus", - Port: 18010, + Port: 18006, }, }, } diff --git a/helm-charts/templates/data-plane/config-deployer/config-ds-configmap.yaml b/helm-charts/templates/data-plane/config-deployer/config-ds-configmap.yaml index 1f6c3f6f3..bf2f22fb3 100644 --- a/helm-charts/templates/data-plane/config-deployer/config-ds-configmap.yaml +++ b/helm-charts/templates/data-plane/config-deployer/config-ds-configmap.yaml @@ -31,7 +31,7 @@ data: metricsEnabled=true metricsReporter="prometheus" [ballerinax.prometheus] - port=18008 + port=18006 {{if .Values.wso2.apk.metrics.configDSBalHost}} host="{{ .Values.wso2.apk.metrics.configDSBalHost}}" {{else}} diff --git a/helm-charts/templates/data-plane/config-deployer/config-ds-deployment.yaml b/helm-charts/templates/data-plane/config-deployer/config-ds-deployment.yaml index e4d520600..27d71680b 100644 --- a/helm-charts/templates/data-plane/config-deployer/config-ds-deployment.yaml +++ b/helm-charts/templates/data-plane/config-deployer/config-ds-deployment.yaml @@ -43,9 +43,9 @@ spec: - containerPort: 9443 protocol: "TCP" {{ if and .Values.wso2.apk.metrics .Values.wso2.apk.metrics.enabled }} - - containerPort: 18008 + - containerPort: 18006 protocol: "TCP" - - containerPort: 18009 + - containerPort: 18007 protocol: "TCP" {{ end }} readinessProbe: diff --git a/helm-charts/templates/data-plane/gateway-components/common-controller/common-controller-deployment.yaml b/helm-charts/templates/data-plane/gateway-components/common-controller/common-controller-deployment.yaml index 133cd8441..eead36fcc 100644 --- a/helm-charts/templates/data-plane/gateway-components/common-controller/common-controller-deployment.yaml +++ b/helm-charts/templates/data-plane/gateway-components/common-controller/common-controller-deployment.yaml @@ -49,7 +49,7 @@ spec: - containerPort: 18003 protocol: TCP {{ if and .Values.wso2.apk.metrics .Values.wso2.apk.metrics.enabled }} - - containerPort: 18010 + - containerPort: 18006 protocol: "TCP" {{ end }} {{ include "apk-helm.deployment.resources" .Values.wso2.apk.dp.commonController.deployment.resources | indent 10 }} diff --git a/helm-charts/templates/data-plane/gateway-components/common-log-conf.yaml b/helm-charts/templates/data-plane/gateway-components/common-log-conf.yaml index 8da6a1fd7..cff5c7f04 100644 --- a/helm-charts/templates/data-plane/gateway-components/common-log-conf.yaml +++ b/helm-charts/templates/data-plane/gateway-components/common-log-conf.yaml @@ -14,7 +14,7 @@ data: [commoncontroller.metrics] enabled = {{.Values.wso2.apk.metrics.enabled}} type = "{{.Values.wso2.apk.metrics.type| default "prometheus" }}" - port = 18010 + port = 18006 {{ end}} [commoncontroller.server] label = "ratelimiter" diff --git a/helm-charts/templates/data-plane/gateway-components/gateway-runtime/gateway-runtime-deployment.yaml b/helm-charts/templates/data-plane/gateway-components/gateway-runtime/gateway-runtime-deployment.yaml index e9e696a1f..bf2883c1e 100644 --- a/helm-charts/templates/data-plane/gateway-components/gateway-runtime/gateway-runtime-deployment.yaml +++ b/helm-charts/templates/data-plane/gateway-components/gateway-runtime/gateway-runtime-deployment.yaml @@ -53,7 +53,7 @@ spec: - containerPort: 18002 protocol: "TCP" {{- if and .Values.wso2.apk.metrics .Values.wso2.apk.metrics.enabled}} - - containerPort: 18007 + - containerPort: 18006 protocol: "TCP" {{- end }} {{ include "apk-helm.deployment.resources" .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.resources | indent 10 }} @@ -92,7 +92,7 @@ spec: value: admin - name: JAVA_OPTS {{- if and .Values.wso2.apk.metrics .Values.wso2.apk.metrics.enabled }} - value: -Dhttpclient.hostnameVerifier=AllowAll -Xms512m -Xmx512m -XX:MaxRAMFraction=2 -Dapk.jmx.metrics.enabled=true -javaagent:/home/wso2/lib/jmx_prometheus_javaagent-0.20.0.jar=18007:/tmp/metrics/prometheus-jmx-config-enforcer.yml + value: -Dhttpclient.hostnameVerifier=AllowAll -Xms512m -Xmx512m -XX:MaxRAMFraction=2 -Dapk.jmx.metrics.enabled=true -javaagent:/home/wso2/lib/jmx_prometheus_javaagent-0.20.0.jar=18006:/tmp/metrics/prometheus-jmx-config-enforcer.yml {{- else }} value: -Dhttpclient.hostnameVerifier=AllowAll -Xms512m -Xmx512m -XX:MaxRAMFraction=2 {{- end }} diff --git a/helm-charts/templates/idp/idp-ds/idp-ds-configmap.yaml b/helm-charts/templates/idp/idp-ds/idp-ds-configmap.yaml index d33cea731..a97122786 100644 --- a/helm-charts/templates/idp/idp-ds/idp-ds-configmap.yaml +++ b/helm-charts/templates/idp/idp-ds/idp-ds-configmap.yaml @@ -31,7 +31,7 @@ data: metricsEnabled=true metricsReporter="prometheus" [ballerinax.prometheus] - port=18011 + port=18006 {{if .Values.wso2.apk.metrics.idpDSBalHost}} host="{{ .Values.wso2.apk.metrics.idpDSBalHost}}" {{else}} diff --git a/helm-charts/templates/idp/idp-ds/idp-ds-deployment.yaml b/helm-charts/templates/idp/idp-ds/idp-ds-deployment.yaml index 079209c48..466b4da4a 100644 --- a/helm-charts/templates/idp/idp-ds/idp-ds-deployment.yaml +++ b/helm-charts/templates/idp/idp-ds/idp-ds-deployment.yaml @@ -52,9 +52,9 @@ spec: - containerPort: 9443 protocol: "TCP" {{ if and .Values.wso2.apk.metrics .Values.wso2.apk.metrics.enabled }} - - containerPort: 18011 + - containerPort: 18006 protocol: "TCP" - - containerPort: 18012 + - containerPort: 18007 protocol: "TCP" {{ end }} readinessProbe: diff --git a/idp/idp-domain-service/build.gradle b/idp/idp-domain-service/build.gradle index 612190f25..cfe38cb8e 100644 --- a/idp/idp-domain-service/build.gradle +++ b/idp/idp-domain-service/build.gradle @@ -36,7 +36,7 @@ release { unSnapshotVersion.finalizedBy ":ballerina:commit_toml_files" afterReleaseBuild.dependsOn ":docker:docker_push" task build{ - dependsOn("docker:build") + dependsOn("docker:buildDockerImage") } build.configure { dependsOn(":docker:build") diff --git a/idp/idp-domain-service/docker/build.gradle b/idp/idp-domain-service/docker/build.gradle index 03c2890c1..25d8b11f0 100644 --- a/idp/idp-domain-service/docker/build.gradle +++ b/idp/idp-domain-service/docker/build.gradle @@ -59,4 +59,4 @@ task buildDockerImage{ buildDockerImage.configure{ mustRunAfter(":ballerina:build") dependsOn(":ballerina:build") - } \ No newline at end of file +} \ No newline at end of file diff --git a/idp/idp-domain-service/docker/idp/idp.sh b/idp/idp-domain-service/docker/idp/idp.sh index 03cb90968..dc8c6e8bc 100755 --- a/idp/idp-domain-service/docker/idp/idp.sh +++ b/idp/idp-domain-service/docker/idp/idp.sh @@ -102,6 +102,6 @@ $JAVACMD \ $JAVA_OPTS \ -classpath "$CLASSPATH" \ -Djava.io.tmpdir="$IDP_HOME/tmp" \ - -javaagent:/home/wso2apk/jmx_prometheus_javaagent-0.20.0.jar=18012:/tmp/metrics/prometheus-jmx-config-idpds.yml \ + -javaagent:/home/wso2apk/lib/jmx_prometheus_javaagent-0.20.0.jar=18007:/tmp/metrics/prometheus-jmx-config-idpds.yml \ -jar idp_domain_service.jar $* status=$? diff --git a/runtime/config-deployer-service/docker/config-deployer/config.sh b/runtime/config-deployer-service/docker/config-deployer/config.sh index ccc254e6a..3d9253f7e 100644 --- a/runtime/config-deployer-service/docker/config-deployer/config.sh +++ b/runtime/config-deployer-service/docker/config-deployer/config.sh @@ -103,6 +103,6 @@ $JAVACMD \ $JAVA_OPTS \ -classpath "$CLASSPATH" \ -Djava.io.tmpdir="$RUNTIME_HOME/tmp" \ - -javaagent:/home/wso2apk/lib/jmx_prometheus_javaagent-0.20.0.jar=18009:/tmp/metrics/prometheus-jmx-config-configds.yml \ + -javaagent:/home/wso2apk/lib/jmx_prometheus_javaagent-0.20.0.jar=18007:/tmp/metrics/prometheus-jmx-config-configds.yml \ -jar config_deployer_service.jar $* status=$?