I am new to deploying Jira. I am using Kustomize to deploy Jira Software to Openshift Cluster. I am following deployment example https://github.com/zimmertr/TKS-Deploy_Kubernetes_Apps/tree/master/Jira/overlays/example.
- Database is separately deployed PostgreSQL in same namespace and created a jiradb database and user.
- Downloaded the image jira-software:8.13.11-ubuntu-jdk11
- Part of this deployment
- Created Service
- PVC is deployed.
- The issue is that we cannot change permissions nor run as user our security context is locked down.
- Below is the deployment and error message
containers:
- name: jira
resources:
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "8Gi"
cpu: "4"
securityContext:
#runAsUser: 2001
fsroup: 2001
image: corporate-registry/crunchydata/jira-software:8.13.11-ubuntu-jdk11
envFrom:
- configMapRef:
name: jira-env-vars
- secretRef:
name: jira-postgres-password
ports:
- name: "http-web"
containerPort: 8080
protocol: TCP
volumeMounts:
- name: jiradata
mountPath: /var/atlassian/application-data/jira
env:
- name: SET_PERMISSIONS
value: "false"
# resources:
# limits:
# cpu: 500m
# memory: 1Gi
volumes:
- name: jiradata
persistentVolumeClaim:
claimName: jiradata
serviceAccount: XXXXX
serviceAccountName: XXXX
terminationGracePeriodSeconds: 30
- Pod is failing with below error message in the log
INFO:root:Generating /etc/container_id from template container_id.j2
WARNING:root:Container not started as root. Bootstrapping skipped for '/etc/container_id'
INFO:root:Generating /opt/atlassian/jira/conf/server.xml from template server.xml.j2
WARNING:root:Container not started as root. Bootstrapping skipped for '/opt/atlassian/jira/conf/server.xml'
INFO:root:Generating /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/seraph-config.xml from template seraph-config.xml.j2
WARNING:root:Container not started as root. Bootstrapping skipped for '/opt/atlassian/jira/atlassian-jira/WEB-INF/classes/seraph-config.xml'
INFO:root:/var/atlassian/application-data/jira/dbconfig.xml exists; skipping.
WARNING:root:Unsetting environment var JIRA_PASSWORD
WARNING:root:Unsetting environment var ATL_JDBC_PASSWORD
INFO:root:Running Jira with command '/opt/atlassian/jira/bin/start-jira.sh', arguments ['/opt/atlassian/jira/bin/start-jira.sh', '-fg']
executing as current user
`sMMMMMMMMMMMMMM+
MMMMMMMMMMMMMM
:sdMMMMMMMMMMM
MMMMMM
`sMMMMMMMMMMMMMM+ MMMMMM
MMMMMMMMMMMMMM +MMMMM
:sMMMMMMMMMMM MMMMM
MMMMMM `UOJ
`sMMMMMMMMMMMMM+ MMMMMM
MMMMMMMMMMMMMM +MMMMM
:sdMMMMMMMMMM MMMMM
MMMMMM `UOJ
MMMMMM
+MMMMM
MMMMM
`UOJ
Atlassian Jira
Version : 8.13.11
If you encounter issues starting or stopping Jira, please see the Troubleshooting guide at https://docs.atlassian.com/jira/jadm-docs-0813/Troubleshooting+installation
Using JIRA_HOME: /var/atlassian/application-data/jira
Server startup logs are located in /opt/atlassian/jira/logs/catalina.out
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
[0.001s][error][logging] Error opening log file '/opt/atlassian/jira/logs/atlassian-jira-gc-2022-03-15_19-47-15.log': Permission denied
[0.001s][error][logging] Initialization of output 'file=/opt/atlassian/jira/logs/atlassian-jira-gc-%t.log' using options 'filecount=5,filesize=20M' failed.
Invalid -Xlog option '-Xlog:gc*:file=/opt/atlassian/jira/logs/atlassian-jira-gc-%t.log:tags,time,uptime,level:filecount=5,filesize=20M', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.