Customizing Jira Data Center configuration files within a Kubernetes environment via values.yaml

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

When modifying server.xml or other configuration files within a Kubernetes pod and leveraging the Atlassian Helm Charts, the changes are overwritten on reboot.  This can occur due to the template file that is used to initialize each pod is a standardized template.  So any customizations can be overwritten.  

Solution

Environment

Jira Data Center environments deployed using Kubernetes using the Atlassian Helm Charts. 

Solution 1

If a customization to the template configuration files are desired but continue to use the Atlassian Helm Charts, a modification will need to be made to the value.yaml to include additionalConfigMapsSecrets.  This was introduced via Introducing an easier way to mount secrets and configmaps

This can be done by editing Values.yaml and using the additionalFiles: option as shown below:

1 2 3 4 5 6 7 8 9 10 11 12 13 additionalConfigMapsSecrets: - name: custom-config type: configMap key: log4j.properties mountPath: /var/atlassian - name: custom-config type: configMap key: web.xml mountPath: /var/atlassian - name: keystore type: secret key: keystore.jks mountPath: /var/ssl

This results in the following mount points: 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 volumeMounts: - name: local-home mountPath: "/var/atlassian/application-data/jira" - name: local-home mountPath: "/opt/atlassian/jira/logs" subPath: "logs" - name: shared-home mountPath: "/var/atlassian/application-data/shared-home" - name: custom-config-0 mountPath: /var/atlassian/log4j.properties subPath: log4j.properties - name: custom-config-1 mountPath: /var/atlassian/web.xml subPath: web.xml - name: keystore-2 mountPath: /var/ssl/keystore.jks subPath: keystore.jks

Solution 2

All the most important parameters in the most frequently used configuration files can be configured by adding the environment variables to the 'additionalEnvironmentVariables' part of the 'values.yaml' file. The list of available environment variables can be found here.

Updated on March 14, 2025

Still need help?

The Atlassian Community is here for you.