Step 1: Create a configmap using the certificate file that needs to be imported to the Java Keystore
kubectl create configmap all-ca --from-file=ca.crt
Step 2: Use the below configmap configurations in the values.yaml file used for installing and upgrading Artifactory using helm
Example:
artifactory: customVolumeMounts: | - name: all-ca mountPath: "/usr/local/share/ca-certificates/ca.crt" subPath: ca.crt customVolumes: | - name: all-ca configMap: name: all-ca preStartCommand: "/java/jdk-11.0.7+10/bin/keytool -importcert -keystore /java/jdk-11.0.7+10/lib/security/cacerts -storepass changeit -file /usr/local/share/ca-certificates/ca.crt -alias YourAlias -noprompt"
Note: You may have to use the exact path of the keytool location and cacerts file location in the preStartCommand mentioned above
Step 3: Perform a Helm upgrade using the updated values.yaml file