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.yaml
in thevalues.yaml
file. 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.
Custom Init Container
External system.yaml
Default system.yaml in values.yaml
Note
For the Pipelines chart, from chart version 2.2.0 and above, the.Values.existingSecret
has been changed to.Values.systemYaml.existingSecret
and.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
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"
Create a Kubernetes secret.
kubectl create secret generic sy --from-file ./xray-cus-sy.yaml
Now, use that secret in the relevant section.
systemYamlOverride: existingSecret: sy dataKey: xray-cus-sy.yaml