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

Add helm chart proto #3102

Merged
merged 20 commits into from
Apr 27, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fixes according review
  • Loading branch information
keramblock committed Apr 20, 2021
commit f8d6ab36d1d4a3931db4f7a7ef1a715e395cc3e3
16 changes: 8 additions & 8 deletions helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -24,11 +24,11 @@ version: 0.1.0
appVersion: "1.16.0"

dependencies:
- name: redis
version: "12.9.*"
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled
- name: postgresql
version: "10.3.*"
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
- name: redis
version: "12.9.*"
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled
- name: postgresql
version: "10.3.*"
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
29 changes: 23 additions & 6 deletions helm-chart/templates/cvat_backend/deployment.yml
Original file line number Diff line number Diff line change
@@ -4,16 +4,26 @@ metadata:
name: {{ .Release.Name }}-backend
namespace: {{ .Release.Namespace }}
labels:
{{- include "cvat.labels" . | nindent 4 }}
app: cvat-app
tier: backend
{{- include "cvat.labels" . | nindent 4 }}
{{- with .Values.cvat.backend.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.cvat.backend.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.cvat.backend.replicas }}
strategy:
type: Recreate
selector:
matchLabels:
{{- include "cvat.labels" . | nindent 6 }}
{{- with .Values.cvat.backend.labels }}
{{- toYaml . | nindent 6 }}
{{- end }}
app: cvat-app
tier: backend
template:
@@ -39,16 +49,19 @@ spec:
{{- end }}
env:
- name: DJANGO_MODWSGI_EXTRA_ARGS
value: ""
- name: UI_PORT
value: "80"
value: {{ .Values.cvat.backend.envs.DJANGO_MODWSGI_EXTRA_ARGS}}
- name: ALLOWED_HOSTS
value: {{ .Values.cvat.backend.envs.ALLOWED_HOSTS | squote}}
- name: UI_HOST
value: "{{ .Release.Name }}-frontend-service"
- name: ALLOWED_HOSTS
value: "*"
- name: UI_PORT
value: "{{ .Values.cvat.frontend.service.ports }}"
{{- if .Values.redis.enabled }}
- name: CVAT_REDIS_HOST
value: "{{ .Release.Name }}-redis-master"
{{- else }}
- name: CVAT_REDIS_HOST
value: "{{ .Values.redis.external.host }}"
{{- end }}
- name: CVAT_POSTGRES_HOST
valueFrom:
@@ -100,6 +113,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.cvat.backend.defaultStorage.enabled }}
- mountPath: /home/django/data
name: cvat-backend-data
subPath: data
@@ -112,6 +126,7 @@ spec:
- mountPath: /home/django/models
name: cvat-backend-data
subPath: models
{{- end }}
{{- with .Values.cvat.backend.additionalVolumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
@@ -120,9 +135,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.cvat.backend.defaultStorage.enabled }}
- name: cvat-backend-data
persistentVolumeClaim:
claimName: "{{ .Release.Name }}-backend-data"
{{- end }}
{{- with .Values.cvat.backend.additionalVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
17 changes: 6 additions & 11 deletions helm-chart/templates/cvat_backend/service.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.postgresql.enabled -}}
apiVersion: v1
kind: Service
metadata:
@@ -9,14 +8,10 @@ metadata:
app: cvat-app
tier: backend
spec:
type: ClusterIP
selector:
{{- include "cvat.labels" . | nindent 6 }}
app: cvat-app
tier: backend
ports:
- port: 8080
targetPort: 8080
protocol: TCP
name: http
{{- end }}
app: cvat-app
tier: backend
{{- include "cvat.labels" . | nindent 4 }}
{{- with .Values.cvat.backend.service }}
{{- toYaml . | nindent 2 }}
{{- end }}
4 changes: 3 additions & 1 deletion helm-chart/templates/cvat_backend/storage.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.cvat.backend.defaultStorage.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
@@ -13,4 +14,5 @@ spec:
storageClassName: standard
resources:
requests:
storage: 20Gi
storage: {{ .Values.cvat.backend.defaultStorage.size }}
{{- end}}
15 changes: 6 additions & 9 deletions helm-chart/templates/cvat_frontend/service.yml
Original file line number Diff line number Diff line change
@@ -8,13 +8,10 @@ metadata:
app: cvat-app
tier: frontend
spec:
type: ClusterIP
selector:
{{- include "cvat.labels" . | nindent 6 }}
app: cvat-app
tier: frontend
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
app: cvat-app
tier: frontend
{{- include "cvat.labels" . | nindent 4 }}
{{- with .Values.cvat.frontend.service }}
{{- toYaml . | nindent 2 }}
{{- end }}
Loading