XRAY: How to edit Xray system.yaml file using “kubectl cp”

XRAY: How to edit Xray system.yaml file using “kubectl cp”

AuthorFullName__c
DaYoun Kang
articleNumber
000005639
FirstPublishedDate
2023-03-21T10:54:51Z
lastModifiedDate
2025-05-21
VersionNumber
1

We can edit the system.yaml file of Xray using “kubectl cp” command. In the below example, I am changing the log level of Xray server service in the system.yaml file.


1. Copy the system.yaml file from the pod to the outside
kubectl cp <xray pod>:/opt/jfrog/xray/var/etc/system.yaml xray.system.yaml -n <your namespace>

2. Edit your system.yaml file to include debug logging, please refer to our wiki page here for the correct spacing
server: 
  ## Xray server logging configuration
  logging:
    ## Server log settings
    application:
      ## The log level: error, warning, info, debug, trace
      level: debug
3. Create a secret
kubectl create secret generic xray-system-secret.yaml --from-file=xray.system.yaml

4. In your values.yaml file, pass your secret by adding the below lines for example:
systemYamlOverride:
## You can use a pre-existing secret by specifying existingSecret
  existingSecret: xray-system-secret.yaml
## The dataKey should be the name of the secret data key created.
  dataKey: xray.system.yaml
5. Update the configuration by running helm upgrade
helm upgrade xray  -f values.yaml --namespace <namespace-name> <chart>