Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[artifactory] Adding structured system yaml to allow for individual key/value overrides #1848

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading