Override the Default System YAML File in Helm Installation

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
ft:sourceType
Paligo

There are some advanced use cases where users wish to provide their own system.yaml file to configure the JFrog service. Using this option will override the existingsystem.yamlin thevalues.yamlfile. There are two ways to override thesystem.yaml: by using a Custom Init Container and by using an external system.yaml with an existingSecret.

The order of preference would then be as follows.

  1. Custom Init Container

  2. External system.yaml

  3. Default system.yaml in values.yaml

Note

For the Pipelines chart, from chart version 2.2.0 and above, the.Values.existingSecrethas been changed to.Values.systemYaml.existingSecretand.Values.systemYaml.dataKey.

Use a Custom Init Container

The Custom Init Container uses external sources such as vaults, external repositories, etc. to override the system.yaml file.

The following example is for the Xray chart.

Custom Init Container Example

customInitContainers: |
   - name: "custom-systemyaml-setup"
     image: "{{ .Values.initContainerImage }}"
     imagePullPolicy: "{{ .Values.imagePullPolicy }}"
     command:
       - 'sh'
       - '-c'
       - 'wget -O {{ .Values.xray.persistence.mountPath }}/etc/system.yaml https://<repo-url>/systemyaml'
     volumeMounts:
       - mountPath: "{{ .Values.xray.persistence.mountPath }}"
         name: data-volume

Use and External System YAML File

  1. Create an external system.yaml file for one of the services, for example, Xray and give it the filename - xray-cus-sy.yaml.

    configVersion: 1
    shared:
        logging:
            consoleLog:
                enabled: true
        jfrogUrl: "http://artifactory-artifactory.rt:8082"
        database:
            type: "postgresql"
            driver: "org.postgresql.Driver"
            username: "xray"
            url: "postgres://xray-postgresql:5432/xraydb?sslmode=disable"
    server:
        mailServer: ""
        indexAllBuilds: "true"
  2. Create a Kubernetes secret.

    kubectl create secret generic sy --from-file ./xray-cus-sy.yaml
  3. Now, use that secret in the relevant section.

    systemYamlOverride:
      existingSecret: sy
      dataKey: xray-cus-sy.yaml