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

multiple fixes to make helm work #6137

Merged
merged 34 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0f2eb4b
[] multiple fixes to make it work
Keramblock May 12, 2023
71f15e0
Merge branch 'develop' into fix-helm
Keramblock May 12, 2023
d53faa9
Merge branch 'develop' into fix-helm
Keramblock May 15, 2023
24b60ab
updated changelog
Keramblock May 15, 2023
edf8d00
updated changelog
Keramblock May 15, 2023
8515861
Merge branch 'develop' into fix-helm
Keramblock May 15, 2023
402344d
[NOTASK] merge develop, again
Keramblock May 16, 2023
d298d10
[NOTASK] aaaand we still waiting for merge, antoher develop conflict
Keramblock May 25, 2023
2da7f88
[NOTASK] change default volume accessmode, removed default storage class
Keramblock May 25, 2023
deaf53b
turn on analytics by default
Keramblock May 26, 2023
883a0db
Add example comment for ingress
Keramblock May 26, 2023
322eb6e
Merge branch 'develop' into fix-helm
nmanovic May 26, 2023
d25ce79
fix changelog formatting
Keramblock May 26, 2023
f135743
merge remote
Keramblock May 26, 2023
cf8474a
Merge branch 'develop' into fix-helm
Keramblock May 30, 2023
2c0b8ee
one more develop conflict
Keramblock Jun 6, 2023
853772c
merge new changes from develop
Keramblock Jul 19, 2023
11fabab
trying to fix helm check
Keramblock Jul 19, 2023
e76097f
[] moving all values files to the same directory
Keramblock Jul 19, 2023
b0f0c2e
temporary remove distinct cache dir to check CI reaction
Keramblock Jul 19, 2023
63827be
Merge branch 'develop' into fix-helm
Keramblock Jul 19, 2023
a8b4042
trying to trigger helm linter
Keramblock Jul 19, 2023
f5d63af
Merge branch 'fix-helm' of github.com:Keramblock/cvat into fix-helm
Keramblock Jul 19, 2023
67e5245
trying to trigger helm linter
Keramblock Jul 19, 2023
5973a76
trying to trigger helm linter
Keramblock Jul 19, 2023
ff85522
trying to trigger helm linter
Keramblock Jul 19, 2023
3d2d493
trying to fix kubectl cp
Keramblock Jul 20, 2023
26550b2
fix default access mode for storage
Keramblock Jul 20, 2023
26db28b
fix add switch to turn off all cache dirs
Keramblock Jul 20, 2023
1c3a8b1
fix values formatting, fix minikube deployment
Keramblock Jul 24, 2023
fce4cdf
change traefik config according to azhavoro suggest
Keramblock Jul 24, 2023
bfc8659
reslove conflict with develop
Keramblock Jul 24, 2023
f00b1e9
fix formatting
Keramblock Jul 24, 2023
151c4f6
Merge branch 'develop' into fix-helm
azhavoro Jul 25, 2023
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: 2 additions & 2 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:

- name: Deploy to minikube
run: |
printf " service:\n externalIPs:\n - $(minikube ip)\n" >> tests/values.test.yaml
printf " service:\n externalIPs:\n - $(minikube ip)\n" >> helm-chart/test.values.yaml
cd helm-chart
helm dependency update
cd ..
helm upgrade -n default release-${{ github.run_id }}-${{ github.run_attempt }} -i --create-namespace helm-chart -f helm-chart/values.yaml -f tests/values.test.yaml
helm upgrade -n default release-${{ github.run_id }}-${{ github.run_attempt }} -i --create-namespace helm-chart -f helm-chart/values.yaml -f helm-chart/cvat.values.yaml -f helm-chart/test.values.yaml
- name: Update test config
run: |
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(<https://github.com/opencv/cvat/pull/6428>)

### Changed
- TDB
- \[Helm\] Added configurable default storage option to chart (<https://github.com/opencv/cvat/pull/6137>)

### Deprecated
- TDB

### Removed
- TDB
- \[Helm\] Removed hardcoded mandatory traefik ingress usage(<https://github.com/opencv/cvat/pull/6137>)

### Fixed
- Calculating number of objects on annotation view when frames are deleted
Expand All @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Server-side validation for attribute specifications
(<https://github.com/opencv/cvat/pull/6447>)
- \[API\] File downloading failures for filenames with special characters l(<https://github.com/opencv/cvat/pull/6492>)
- \[Helm\] fixed issue with multiple caches in same RWX volume, which prevents db migration to start (<https://github.com/opencv/cvat/pull/6137>)

### Security
- TDB
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ dependencies:
- name: traefik
version: 10.24.0
repository: https://helm.traefik.io/traefik
condition: ingress.enabled
condition: traefik.enabled
53 changes: 53 additions & 0 deletions helm-chart/cvat.values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
analytics:
enabled: true

ingress:
enabled: true
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web
kubernetes.io/ingress.class: traefik
hosts:
- host: cvat.local
paths:
- path: /api
pathType: "Prefix"
service:
name: backend-service
port: 8080
- path: /admin
pathType: "Prefix"
service:
name: backend-service
port: 8080
- path: /static
pathType: "Prefix"
service:
name: backend-service
port: 8080
- path: /django-rq
pathType: "Prefix"
service:
name: backend-service
port: 8080
- path: /git
pathType: "Prefix"
service:
name: backend-service
port: 8080
- path: /opencv
pathType: "Prefix"
service:
name: backend-service
port: 8080
- path: /profiler
pathType: "Prefix"
service:
name: backend-service
port: 8080
- path : /
pathType: "Prefix"
service:
name: frontend-service
port: 80
traefik:
enabled: true
12 changes: 12 additions & 0 deletions helm-chart/templates/cvat_backend/server/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ spec:
ports:
- containerPort: 8080
volumeMounts:
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-server-backend-cache
{{- end }}
- mountPath: /home/django/data
name: cvat-backend-data
subPath: data
Expand All @@ -140,6 +144,10 @@ spec:
{{- end }}
volumeMounts:
{{- if .Values.cvat.backend.defaultStorage.enabled }}
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-server-backend-cache
{{- end }}
- mountPath: /home/django/data
name: cvat-backend-data
subPath: data
Expand Down Expand Up @@ -170,6 +178,10 @@ spec:
- name: cvat-backend-data
persistentVolumeClaim:
claimName: "{{ .Release.Name }}-backend-data"
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- name: cvat-server-backend-cache
emptyDir: {}
{{- end }}
{{- end }}
{{- with .Values.cvat.backend.server.additionalVolumes }}
{{- toYaml . | nindent 8 }}
Expand Down
11 changes: 9 additions & 2 deletions helm-chart/templates/cvat_backend/storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ metadata:
tier: backend
spec:
accessModes:
- ReadWriteOnce
{{- if .Values.cvat.backend.defaultStorage.accessModes }}
{{ .Values.cvat.backend.defaultStorage.accessModes | toYaml | nindent 4 }}
{{- else }}
- ReadWriteMany
{{- end }}
{{- if .Values.cvat.backend.defaultStorage.storageClassName }}
storageClassName: {{ .Values.cvat.backend.defaultStorage.storageClassName }}
{{- end }}
resources:
requests:
storage: {{ .Values.cvat.backend.defaultStorage.size }}
{{- end}}
{{- end }}
13 changes: 13 additions & 0 deletions helm-chart/templates/cvat_backend/utils/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ spec:
ports:
- containerPort: 8080
volumeMounts:
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-utils-backend-cache
{{- end }}
- mountPath: /home/django/data
name: cvat-backend-data
subPath: data
Expand All @@ -134,6 +138,10 @@ spec:
{{- end }}
volumeMounts:
{{- if .Values.cvat.backend.defaultStorage.enabled }}
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-utils-backend-cache
{{- end }}
- mountPath: /home/django/data
name: cvat-backend-data
subPath: data
Expand Down Expand Up @@ -164,6 +172,11 @@ spec:
- name: cvat-backend-data
persistentVolumeClaim:
claimName: "{{ .Release.Name }}-backend-data"

{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- name: cvat-utils-backend-cache
emptyDir: {}
{{- end }}
{{- end }}
{{- with .Values.cvat.backend.utils.additionalVolumes }}
{{- toYaml . | nindent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
volumeMounts:
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-worker-annotation-backend-cache
{{- end }}
- mountPath: /home/django/data
name: cvat-backend-data
subPath: data
Expand Down Expand Up @@ -135,6 +139,10 @@ spec:
{{- end }}
volumeMounts:
{{- if .Values.cvat.backend.defaultStorage.enabled }}
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-worker-annotation-backend-cache
{{- end }}
- mountPath: /home/django/data
name: cvat-backend-data
subPath: data
Expand Down Expand Up @@ -165,6 +173,8 @@ spec:
- name: cvat-backend-data
persistentVolumeClaim:
claimName: "{{ .Release.Name }}-backend-data"
- name: cvat-worker-annotation-backend-cache
emptyDir: {}
{{- end }}
{{- with .Values.cvat.backend.worker.annotation.additionalVolumes }}
{{- toYaml . | nindent 8 }}
Expand Down
13 changes: 13 additions & 0 deletions helm-chart/templates/cvat_backend/worker_export/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
volumeMounts:
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-worker-export-backend-cache
{{- end }}
- mountPath: /home/django/data
name: cvat-backend-data
subPath: data
Expand Down Expand Up @@ -135,6 +139,10 @@ spec:
{{- end }}
volumeMounts:
{{- if .Values.cvat.backend.defaultStorage.enabled }}
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-worker-export-backend-cache
{{- end }}
- mountPath: /home/django/data
name: cvat-backend-data
subPath: data
Expand Down Expand Up @@ -165,6 +173,11 @@ spec:
- name: cvat-backend-data
persistentVolumeClaim:
claimName: "{{ .Release.Name }}-backend-data"

{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- name: cvat-worker-export-backend-cache
emptyDir: {}
{{- end }}
{{- end }}
{{- with .Values.cvat.backend.worker.export.additionalVolumes }}
{{- toYaml . | nindent 8 }}
Expand Down
10 changes: 10 additions & 0 deletions helm-chart/templates/cvat_backend/worker_import/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
volumeMounts:
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-worker-import-backend-cache
{{- end }}
- mountPath: /home/django/data
name: cvat-backend-data
subPath: data
Expand Down Expand Up @@ -135,6 +139,10 @@ spec:
{{- end }}
volumeMounts:
{{- if .Values.cvat.backend.defaultStorage.enabled }}
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-worker-import-backend-cache
{{- end }}
- mountPath: /home/django/data
name: cvat-backend-data
subPath: data
Expand Down Expand Up @@ -165,6 +173,8 @@ spec:
- name: cvat-backend-data
persistentVolumeClaim:
claimName: "{{ .Release.Name }}-backend-data"
- name: cvat-worker-import-backend-cache
emptyDir: {}
{{- end }}
{{- with .Values.cvat.backend.worker.import.additionalVolumes }}
{{- toYaml . | nindent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ spec:
{{- with .Values.cvat.backend.worker.qualityreports.labels }}
{{- toYaml . | nindent 6 }}
{{- end }}
app: cvat-app-worker-qualityreports
app: cvat-app
tier: backend
component: worker-qualityreports
template:
metadata:
labels:
app: cvat-app-worker-qualityreports
app: cvat-app
tier: backend
component: worker-qualityreports
{{- include "cvat.labels" . | nindent 8 }}
Expand Down
4 changes: 4 additions & 0 deletions tests/values.test.yaml → helm-chart/test.values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
cvat:
backend:
defaultStorage:
accessModes:
- ReadWriteOnce
disableDistinctCachePerService: true
server:
additionalVolumeMounts:
- mountPath: /home/django/share
Expand Down
Loading