Skip to content

Commit

Permalink
[distribution] 2.5.1 release , add support for customInitContainersBe…
Browse files Browse the repository at this point in the history
…gin (jfrog#1184)

* Add support for customInitContainersBegin

* Release distribution 2.5.1
  • Loading branch information
rahulsadanandan authored Oct 9, 2020
1 parent b0b7626 commit c5bf1db
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.
4 changes: 4 additions & 0 deletions stable/distribution/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# JFrog Distribution Chart Changelog
All changes to this project chart be documented in this file.

## [7.1.1] - Oct 9, 2020
* Update Distribution to version `2.5.1` - [Release notes](https://www.jfrog.com/confluence/display/JFROG/Distribution+Release+Notes#DistributionReleaseNotes-Distribution2.5.1)
* Add support for customInitContainersBegin

## [7.1.0] - Sep 30, 2020
* Update Distribution to version `2.5.0` - [Release notes](https://www.jfrog.com/confluence/display/JFROG/Distribution+Release+Notes#DistributionReleaseNotes-Distribution2.5)
* Added support for resources in init containers
Expand Down
4 changes: 2 additions & 2 deletions stable/distribution/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v1
name: distribution
home: https://jfrog.com/platform/
description: A Helm chart for JFrog Distribution
version: 7.1.0
appVersion: 2.5.0
version: 7.1.1
appVersion: 2.5.1
sources:
- https://bintray.com/jfrog/product/distribution/view
- https://github.com/jfrog/charts
Expand Down
11 changes: 11 additions & 0 deletions stable/distribution/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,17 @@ imagePullSecrets:
{{- end -}}
{{- end -}}

{{/*
Resolve customInitContainersBegin value
*/}}
{{- define "distribution.customInitContainersBegin" -}}
{{- if .Values.global.customInitContainersBegin -}}
{{- .Values.global.customInitContainersBegin -}}
{{- else if .Values.common.customInitContainersBegin -}}
{{- .Values.common.customInitContainersBegin -}}
{{- end -}}
{{- end -}}

{{/*
Resolve customInitContainers value
*/}}
Expand Down
3 changes: 3 additions & 0 deletions stable/distribution/templates/distribution-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ spec:
runAsUser: {{ .Values.common.uid }}
fsGroup: {{ .Values.common.gid }}
initContainers:
{{- if or .Values.common.customInitContainersBegin .Values.global.customInitContainersBegin }}
{{ tpl (include "distribution.customInitContainersBegin" .) . | indent 6 }}
{{- end }}
- name: 'copy-system-yaml'
image: '{{ .Values.initContainerImage }}'
resources:
Expand Down
17 changes: 16 additions & 1 deletion stable/distribution/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ global: {}

# customInitContainers: |

# customInitContainersBegin: |

# customSidecarContainers: |

initContainerImage: docker.bintray.io/alpine:3.12
Expand Down Expand Up @@ -213,7 +215,20 @@ common:
# posthook-end.sh: |-
# echo "This is a post end script"

## Add custom init containers
## Add custom init containers execution before predefined init containers
customInitContainersBegin: |
# - name: "custom-setup"
# image: "{{ .Values.initContainerImage }}"
# imagePullPolicy: "{{ .Values.distribution.image.pullPolicy }}"
# command:
# - 'sh'
# - '-c'
# - 'touch {{ .Values.distribution.persistence.mountPath }}/example-custom-setup'
# volumeMounts:
# - mountPath: "{{ .Values.distribution.persistence.mountPath }}"
# name: distribution-data

## Add custom init containers execution after predefined init containers
customInitContainers: |
# - name: "custom-setup"
# image: "{{ .Values.initContainerImage }}"
Expand Down

0 comments on commit c5bf1db

Please sign in to comment.