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

fix: Helm modifiable permissionFix paths and command #7932

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions changelog.d/20240522_215910_jacky.lam_helm_init.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- Helm modifiable permissionFix paths and command
(<https://github.com/cvat-ai/cvat/pull/7932>)
10 changes: 9 additions & 1 deletion helm-chart/templates/cvat_backend/server/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,15 @@ spec:
{{- if .Values.cvat.backend.permissionFix.enabled }}
- name: user-data-permission-fix
image: busybox
command: ["/bin/chmod", "-R", "777", "/home/django"]
command: ["/bin/sh", "-c"]
jackylamhk marked this conversation as resolved.
Show resolved Hide resolved
args:
{{ if not .Values.cvat.backend.permissionFix.commandOverride }}
{{- with join " " .Values.cvat.backend.permissionFix.paths }}
- chmod -R 777 {{ . }}
{{- end }}
{{ else }}
{{- toYaml .Values.cvat.backend.permissionFix.commandOverride | nindent 12 }}
{{ end }}
{{- with merge $localValues.resources .Values.cvat.backend.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
10 changes: 9 additions & 1 deletion helm-chart/templates/cvat_backend/utils/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,15 @@ spec:
{{- if .Values.cvat.backend.permissionFix.enabled }}
- name: user-data-permission-fix
image: busybox
command: ["/bin/chmod", "-R", "777", "/home/django"]
command: ["/bin/sh", "-c"]
args:
{{ if not .Values.cvat.backend.permissionFix.commandOverride }}
{{- with join " " .Values.cvat.backend.permissionFix.paths }}
- chmod -R 777 {{ . }}
{{- end }}
{{ else }}
{{- toYaml .Values.cvat.backend.permissionFix.commandOverride | nindent 12 }}
{{ end }}
{{- with merge $localValues.resources .Values.cvat.backend.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ spec:
{{- if .Values.cvat.backend.permissionFix.enabled }}
- name: user-data-permission-fix
image: busybox
command: ["/bin/chmod", "-R", "777", "/home/django"]
command: ["/bin/sh", "-c"]
args:
{{ if not .Values.cvat.backend.permissionFix.commandOverride }}
{{- with join " " .Values.cvat.backend.permissionFix.paths }}
- chmod -R 777 {{ . }}
{{- end }}
{{ else }}
{{- toYaml .Values.cvat.backend.permissionFix.commandOverride | nindent 12 }}
{{ end }}
{{- with merge $localValues.resources .Values.cvat.backend.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ spec:
{{- if .Values.cvat.backend.permissionFix.enabled }}
- name: user-data-permission-fix
image: busybox
command: ["/bin/chmod", "-R", "777", "/home/django"]
command: ["/bin/sh", "-c"]
args:
{{ if not .Values.cvat.backend.permissionFix.commandOverride }}
{{- with join " " .Values.cvat.backend.permissionFix.paths }}
- chmod -R 777 {{ . }}
{{- end }}
{{ else }}
{{- toYaml .Values.cvat.backend.permissionFix.commandOverride | nindent 12 }}
{{ end }}
{{- with merge $localValues.resources .Values.cvat.backend.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ spec:
{{- if .Values.cvat.backend.permissionFix.enabled }}
- name: user-data-permission-fix
image: busybox
command: ["/bin/chmod", "-R", "777", "/home/django"]
command: ["/bin/sh", "-c"]
args:
{{ if not .Values.cvat.backend.permissionFix.commandOverride }}
{{- with join " " .Values.cvat.backend.permissionFix.paths }}
- chmod -R 777 {{ . }}
{{- end }}
{{ else }}
{{- toYaml .Values.cvat.backend.permissionFix.commandOverride | nindent 12 }}
{{ end }}
{{- with merge $localValues.resources .Values.cvat.backend.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
3 changes: 3 additions & 0 deletions helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ cvat:
imagePullPolicy: Always
permissionFix:
enabled: true
# commandOverride: []
paths:
- /home/django
service:
annotations:
traefik.ingress.kubernetes.io/service.sticky.cookie: "true"
Expand Down