From f7cbf1a6dc5795863ca89ada12909db33401c907 Mon Sep 17 00:00:00 2001 From: Yevhen Ivantsov Date: Wed, 27 Nov 2024 07:16:29 +1100 Subject: [PATCH] Make StuckThreadDetectionValve threshold configurable --- docs/docs/containers/JIRA.md | 1 + src/main/charts/jira/templates/configmap-server-config.yaml | 2 +- src/main/charts/jira/values.yaml | 1 + src/test/java/test/ServerConfigTest.java | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/docs/containers/JIRA.md b/docs/docs/containers/JIRA.md index 19403ace9..fd154261e 100644 --- a/docs/docs/containers/JIRA.md +++ b/docs/docs/containers/JIRA.md @@ -167,6 +167,7 @@ see https://tomcat.apache.org/tomcat-7.0-doc/config/index.html. * `ATL_TOMCAT_PROTOCOL` (default: HTTP/1.1) * `ATL_TOMCAT_ACCEPTCOUNT` (default: 10) * `ATL_TOMCAT_MAXHTTPHEADERSIZE` (default: 8192) +* `ATL_TOMCAT_STUCKTHREADDETECTIONVALVE_THRESHOLD` (default: 120) ### Access Log Settings diff --git a/src/main/charts/jira/templates/configmap-server-config.yaml b/src/main/charts/jira/templates/configmap-server-config.yaml index 08909dc3f..e5007debb 100644 --- a/src/main/charts/jira/templates/configmap-server-config.yaml +++ b/src/main/charts/jira/templates/configmap-server-config.yaml @@ -64,7 +64,7 @@ data: + threshold="{{ .Values.jira.tomcatConfig.stuckThreadDetectionValveThreshold | default "120" }}" /> diff --git a/src/main/charts/jira/values.yaml b/src/main/charts/jira/values.yaml index cf15d7077..c5ac207d1 100644 --- a/src/main/charts/jira/values.yaml +++ b/src/main/charts/jira/values.yaml @@ -814,6 +814,7 @@ jira: # proxyPort is set depending on ingress.https value (80 if http, 443 if https) proxyPort: maxHttpHeaderSize: "8192" + stuckThreadDetectionValveThreshold: "120" # -- Custom server.xml to be mounted into /opt/atlassian/jira/conf # diff --git a/src/test/java/test/ServerConfigTest.java b/src/test/java/test/ServerConfigTest.java index b1ef2791d..4763fc569 100644 --- a/src/test/java/test/ServerConfigTest.java +++ b/src/test/java/test/ServerConfigTest.java @@ -117,6 +117,8 @@ void server_config_config_map(Product product, String generatedByHelm, String re assertThat(serverConfigMap.getConfigMapData().path("server.xml")).hasTextContaining("maxHttpHeaderSize=\"9876\""); assertThat(serverConfigMap.getConfigMapData().path("server.xml")).hasTextContaining("proxyPort=\"443\""); assertThat(serverConfigMap.getConfigMapData().path("server.xml")).hasTextContaining("proxyName=\"" + String.format("%s.com", product.name())); + assertThat(serverConfigMap.getConfigMapData().path("server.xml")).hasTextContaining("threshold=\"120\""); + } void use_custom_server_xml(Product product, String generatedByHelm, String restrictedSCC) throws Exception { final var resources = helm.captureKubeResourcesFromHelmChart(product, Map.of(