Support CVAT 2.X deployment using helm (#4448)
* Fix frontend helm labels taken. Previously those were erronously taken from backend. * Add support for CVAT 2.X in helm charts Added templates for OPA and extended readme on how to deploy. Moreover modernized the ingress chart to support k8s version 1.22+. * Update Changelog * Fix helm readme linter error Fix linter error due to markdown line longer than 120 charactersmain
parent
eb634200e4
commit
6fd7a0e1ae
@ -0,0 +1,17 @@
|
||||
{{- if .Values.cvat.opa.defaultStorage.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-opa-rules
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "cvat.labels" . | nindent 4 }}
|
||||
app: cvat-app
|
||||
tier: opa
|
||||
{{- if semverCompare ">=1.21-0" .Capabilities.KubeVersion.GitVersion }}
|
||||
immutable: true
|
||||
{{- end }}
|
||||
binaryData:
|
||||
rules.tar.gz: |-
|
||||
{{ .Files.Get "rules.tar.gz" | b64enc }}
|
||||
{{- end}}
|
||||
@ -0,0 +1,82 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-opa
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "cvat.labels" . | nindent 4 }}
|
||||
app: cvat-app
|
||||
tier: opa
|
||||
spec:
|
||||
replicas: {{ .Values.cvat.opa.replicas }}
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "cvat.labels" . | nindent 6 }}
|
||||
app: cvat-app
|
||||
tier: opa
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "cvat.labels" . | nindent 8 }}
|
||||
app: cvat-app
|
||||
tier: opa
|
||||
{{- with .Values.cvat.opa.labels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.cvat.opa.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: cvat-opa-app-container
|
||||
image: {{ .Values.cvat.opa.image }}:{{ .Values.cvat.opa.tag }}
|
||||
args:
|
||||
- run
|
||||
- --server
|
||||
- --addr
|
||||
- :8181
|
||||
- --set=decision_logs.console=true
|
||||
- /rules/rules.tar.gz
|
||||
{{- with .Values.cvat.opa.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 8181
|
||||
{{- with .Values.cvat.opa.additionalEnv }}
|
||||
env:
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- mountPath: /rules
|
||||
name: cvat-opa-rules
|
||||
{{- with .Values.cvat.opa.additionalVolumeMounts }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.cvat.opa.defaultStorage.enabled }}
|
||||
- name: cvat-opa-rules
|
||||
configMap:
|
||||
name: "{{ .Release.Name }}-opa-rules"
|
||||
items:
|
||||
- key: "rules.tar.gz"
|
||||
path: "rules.tar.gz"
|
||||
{{- end }}
|
||||
{{- with .Values.cvat.opa.additionalVolumes }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.cvat.opa.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.cvat.opa.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
@ -0,0 +1,21 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
{{- if .Values.cvat.opa.composeCompatibleServiceName }}
|
||||
name: opa
|
||||
{{- else }}
|
||||
name: {{ .Release.Name }}-opa-service
|
||||
{{- end }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "cvat.labels" . | nindent 4 }}
|
||||
app: cvat-app
|
||||
tier: opa
|
||||
spec:
|
||||
selector:
|
||||
app: cvat-app
|
||||
tier: opa
|
||||
{{- include "cvat.labels" . | nindent 4 }}
|
||||
{{- with .Values.cvat.opa.service }}
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
Loading…
Reference in New Issue