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

[jfrog-platform] Added podSecurityContext and containerSecurityContext for pre-upgrade-check migration hook container #1929

Merged
merged 1 commit into from
Oct 23, 2024
Merged
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/jfrog-platform/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# JFrog Platform Chart Changelog (GA releases only)
All changes to this chart will be documented in this file.

## [10.19.7] - Oct 14, 2024
* Fixed - Added podSecurityContext and containerSecurityContext for pre-upgrade-check migration hook container

## [10.19.6] - Oct 8, 2024
* Fixed typo to get fourth parameter for setupPostgres.sh [GH-1992](https://github.com/jfrog/charts/pull/1992)
* Added `preUpgradeHook.tolerations`
Expand Down
2 changes: 1 addition & 1 deletion stable/jfrog-platform/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ name: jfrog-platform
sources:
- https://github.com/jfrog/charts
type: application
version: 10.19.6
version: 10.19.7
6 changes: 6 additions & 0 deletions stable/jfrog-platform/templates/upgrade-hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,19 @@ spec:
release: {{ .Release.Name }}
spec:
serviceAccountName: {{ template "jfrog-platform.fullname" . }}
{{- if .Values.preUpgradeHook.podSecurityContext.enabled }}
securityContext: {{- omit .Values.preUpgradeHook.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.global.imagePullSecrets }}
{{- include "jfrog-platform.imagePullSecrets" . | indent 6 }}
{{- end }}
containers:
- name: pre-upgrade-check
image: "{{ tpl .Values.preUpgradeHook.image.registry . }}/{{ .Values.preUpgradeHook.image.repository }}:{{ .Values.preUpgradeHook.image.tag }}"
imagePullPolicy: {{ .Values.preUpgradeHook.image.pullPolicy }}
{{- if .Values.preUpgradeHook.containerSecurityContext.enabled }}
securityContext: {{- tpl (omit .Values.preUpgradeHook.containerSecurityContext "enabled" | toYaml) . | nindent 12 }}
{{- end }}
resources:
{{ toYaml .Values.preUpgradeHook.resources | indent 12 }}
command:
Expand Down
13 changes: 13 additions & 0 deletions stable/jfrog-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ rabbitmq:
image:
repository: bitnami/rabbitmq
tag: 3.12.10-debian-11-r1
podSecurityContext:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like these changes are specific to you; we are ignoring them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add this because otherwise 'helm lint' gives errors about unknown variables.

enabled: false
containerSecurityContext:
enabled: false
auth:
## Enable encryption to rabbitmq
## ref: https://www.rabbitmq.com/ssl.html
Expand Down Expand Up @@ -242,6 +246,11 @@ artifactory:
url: '{{ include "database.url" . }}'
user: artifactory
password: artifactory
ingress:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like these changes are specific to you; we are ignoring them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add this because otherwise 'helm lint' gives errors about unknown variables.

enabled: false
nginx:
service:
type: ""
# Note: For artifactory Pro license, mission-control is not supported, Hence, set mc.enabled: false
# Note: mission-control is disabled by default, this is only available for E+ customers, and can be enabled by setting mc.enabled: true
mc:
Expand Down Expand Up @@ -359,6 +368,10 @@ preUpgradeHook:
repository: bitnami/kubectl
tag: 1.24.12
pullPolicy: IfNotPresent
podSecurityContext:
enabled: false
containerSecurityContext:
enabled: false
resources:
requests:
cpu: 5m
Expand Down
Loading