Skip to content

Commit

Permalink
Added structured system yaml for artifactory
Browse files Browse the repository at this point in the history
  • Loading branch information
nxf5025 committed Dec 8, 2023
1 parent 3e3e047 commit 7e44ab0
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 3 deletions.
3 changes: 3 additions & 0 deletions stable/artifactory/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# JFrog Artifactory Chart Changelog
All changes to this chart will be documented in this file.

## [107.72.0] - Dec 8, 2023
* Added the ability to provide a .Values.artifactory.structuredSystemYaml configuration which will merge with the existing .Values.artifactory.systemYaml

## [107.71.5] - Oct 31, 2023
* Fixed - StatefulSet pod annotations changed from range to toYaml [GH-1828](https://github.com/jfrog/charts/issues/1828)
* Fixed - Invalid format for awsS3V3 `multiPartLimit,multipartElementSize` in binarystore.xml.
Expand Down
2 changes: 1 addition & 1 deletion stable/artifactory/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ name: artifactory
sources:
- https://github.com/jfrog/charts
type: application
version: 107.71.5
version: 107.72.0
14 changes: 14 additions & 0 deletions stable/artifactory/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -487,3 +487,17 @@ Resolve fsGroup and runAsGroup on cluster based
{{- printf "%s" "false" -}}
{{- end -}}
{{- end -}}

{{/*
Calculate the systemYaml from structured and unstructured text input
*/}}
{{- define "artifactory.calculatedSystemYaml" -}}
{{ tpl (mergeOverwrite (include "artifactory.systemYaml" . | fromYaml) .Values.artifactory.structuredSystemYaml | toYaml) . }}
{{- end -}}

{{/*
Calculate the systemYaml from the unstructured text input
*/}}
{{- define "artifactory.systemYaml" -}}
{{ include (print $.Template.BasePath "/_system-yaml-render.tpl") . }}
{{- end -}}
1 change: 1 addition & 0 deletions stable/artifactory/templates/_system-yaml-render.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- tpl .Values.artifactory.systemYaml . -}}
2 changes: 1 addition & 1 deletion stable/artifactory/templates/artifactory-system-yaml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ metadata:
type: Opaque
stringData:
system.yaml: |
{{ tpl .Values.artifactory.systemYaml . | indent 4 }}
{{ include "artifactory.calculatedSystemYaml" . | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ stringData:

{{- if not .Values.systemYamlOverride.existingSecret }}
system.yaml: |
{{ tpl .Values.artifactory.systemYaml . | indent 4 }}
{{ include "artifactory.calculatedSystemYaml" . | nindent 4 }}
{{- end }}

{{- if and .Values.artifactory.customSecrets }}
Expand Down
4 changes: 4 additions & 0 deletions stable/artifactory/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,10 @@ artifactory:
event:
webhooks: {{ toYaml .Values.event.webhooks | nindent 6 }}
{{- end }}
# -- Additional structured values on top of the text based 'artifactory.systemYaml'. Applied after the text based config is evaluated for templates. Enables adding and modifying YAML elements in the evaulated 'artifactory.systemYaml'.
structuredSystemYaml: {}

annotations: {}
service:
name: artifactory
Expand Down

0 comments on commit 7e44ab0

Please sign in to comment.