Skip to content

Commit

Permalink
Make it configurable for all products
Browse files Browse the repository at this point in the history
  • Loading branch information
Yevhen Ivantsov committed Nov 26, 2024
1 parent f7cbf1a commit 0638d55
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ data:
<Manager pathname=""/>
<JarScanner scanManifest="false"/>
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve"
threshold="120" />
threshold="{{ .Values.bamboo.tomcatConfig.stuckThreadDetectionValveThreshold | default "120" }}" />
</Context>

</Host>
Expand Down
1 change: 1 addition & 0 deletions src/main/charts/bamboo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ bamboo:
proxyInternalIps:
trustedProxies:
requestAttributesEnabled:
stuckThreadDetectionValveThreshold: "60"

# -- Custom server.xml to be mounted into /opt/atlassian/bamboo/conf
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ data:
<!-- Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
<Manager pathname=""/>
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve"
threshold="60"/>
threshold="{{ .Values.confluence.tomcatConfig.stuckThreadDetectionValveThreshold | default "120" }}" />
{{ if .Values.confluence.accessLog.enabled }}
<Valve className="org.apache.catalina.valves.AccessLogValve"
requestAttributesEnabled="true"
Expand Down
2 changes: 2 additions & 0 deletions src/main/charts/confluence/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,8 @@ confluence:
maxHttpHeaderSize: "8192"
proxyInternalIps:
trustedProxies:
stuckThreadDetectionValveThreshold: "120"


# -- Custom server.xml to be mounted into /opt/atlassian/confluence/conf
#
Expand Down
1 change: 1 addition & 0 deletions src/main/charts/crowd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ crowd:
maxHttpHeaderSize: "8192"
accessLogsMaxDays:
proxyInternalIps:
stuckThreadDetectionValveThreshold: "120"

# -- Specifies a list of additional Java libraries that should be added to the
# Crowd container. Each item in the list should specify the name of the volume
Expand Down
4 changes: 3 additions & 1 deletion src/test/java/test/ServerConfigTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ 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\"");
if (! product.name().equals("crowd")) {
assertThat(serverConfigMap.getConfigMapData().path("server.xml")).hasTextContaining("threshold=\"120\"");
}

}
void use_custom_server_xml(Product product, String generatedByHelm, String restrictedSCC) throws Exception {
Expand Down

0 comments on commit 0638d55

Please sign in to comment.