Jira Upgrade failed with error "nil pointer evaluating interface {}.annotations" while using 'Products upgrade' method when Jira is hosted on a Kubernetes environment
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
Jira Upgrade failed with the error "nil pointer evaluating interface {}.annotations" while using the Product upgrade method when Jira is hosted on a Kubernetes environment.
Environment
Jira Data Center
Diagnosis
There are instances when customers wish to upgrade their Jira, which is running on a Kubernetes cluster, to a version for which a Helm chart is unavailable. The document provided below outlines the product upgrade method to accomplish this.
Jira upgrade using product upgrade method
Please find the below URL that mentions all the available helm charts for upgrade.
Unfortunately, customers can get errors like the one below when running the helm upgrade command.
1
2
3
4
5
6
7
8
% helm upgrade jira atlassian-data-center/jira \
--reuse-values \
--set replicaCount=1 \
--set image.tag=9.1.1-jdk11 \
--wait \
--namespace jira
Error: UPGRADE FAILED: template: jira/templates/tests/test-shared-home-permissions.yaml:8:22: executing "jira/templates/tests/test-shared-home-permissions.yaml" at <.Values.testPods.annotations>: nil pointer evaluating interface {}.annotations
This document provides additional commands and details that will help customers upgrade Jira using the product upgrade method.
Solution
Execute the command below to extract the "values.xml" file and save it to a local directory with the appropriate permissions.
1
helm get values <release-name> -n <namespace> -o yaml > values.yaml
Please make sure that the "values.xml" file contains the "testPods" module in it. If it is missing, please add this module with the pod details in values.yaml file. Please find the sample "testPods" given below.
1
2
3
4
5
6
7
8
9
10
11
12
------sample testPods module given below for your reference.
testPods:
resources: {}
labels: {}
annotations: {}
nodeSelector: {}
tolerations: []
affinity: {}
schedulerName:
image:
permissionsTestContainer: debian:stable-slim
statusTestContainer: alpine:latest
Please refer to the sample values.yaml file from the page Sample values.xml file.
Please run the helm upgrade command now. Please find the upgrade command given below for your reference. Please change the values.xml location, Jira version tag number and namespace location.
1
2
3
4
5
6
helm upgrade <release-name> atlassian-data-center/jira \
-f <local-path-to-updated-values.yaml-file> \
--set replicaCount=1 \
--set image.tag=9.1.1-jdk11 \
--wait \
--namespace jira
Was this helpful?