There are instances where the system YAML of Xray or Artifactory deployed in a Kubernetes cluster may need custom configurations.
This guide provides an example on how to create and use an external System YAML File in Xray to override the default system YAML File in Helm Installation and add configurations to increase max open connections.
1. Locate the Xray pod using the following command:
kubectl get pods -n xray
2. Exec into the xray-server container of the Xray pod:
kubectl exec -it <xray-podname> -c xray-server -n xray -- /bin/sh
3. Output the system.yaml and copy the content:
cat /opt/jfrog/xray/var/etc/system.yaml
4. Create a new file on local machine for the system.yaml with the copied content and add the following parameters to update the open connections to the DB.
server:
database:
#Default: 60
maxOpenConnections: 90
analysis:
database:
#Default: 30
maxOpenConnections: 60
indexer:
database:
#Default: 30
maxOpenConnections: 60
persist:
database:
#Default: 30
maxOpenConnections: 60
5. Create a kubernetes secret using the system.yaml file created on Xray namespace.
kubectl create secret generic sy --from-file ./xray-cus-sy.yaml -n xray
6. Update the custom values.yaml file for the system YAML override with the secret:
systemYamlOverride:
existingSecret: sy
dataKey: xray-cus-sy.yaml
7. Run a helm upgrade using the updated custom values.yaml from step 6.
8. Once the kubernetes cluster has successfully deployed, to verify that the configurations have been updated as expected you may follow steps 1-3.