Revision b3081bf143bbac12feb4a8ac3584419ae0e09565 authored by Roman Donchenko on 29 June 2023, 16:58:21 UTC, committed by GitHub on 29 June 2023, 16:58:21 UTC
<!-- Raise an issue to propose your change (https://github.com/opencv/cvat/issues). It helps to avoid duplication of efforts from multiple independent contributors. Discuss your ideas with maintainers to be sure that changes will be approved and merged. Read the [Contribution guide](https://opencv.github.io/cvat/docs/contributing/). --> <!-- Provide a general summary of your changes in the Title above --> ### Motivation and context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. Describe your changes in detail, add screenshots. --> For unclear reasons, when this setting is enabled, the OpenAPI Generator runtime becomes unable to parse `AnnotationsRead` values from JSON. Specifically, it thinks that the JSON value is ambiguous, because it can be parsed both as `LabeledData` and as `IOBase`. The former makes sense, but the latter does not. I think it's just a bug in the runtime. This line is why the issue only occurs when `discard_unknown_keys` is set: https://github.com/OpenAPITools/openapi-generator/blob/v6.0.1/modules/openapi-generator/src/main/resources/python/model_utils.mustache#L1139 The CLI currently doesn't parse `AnnotationRead` anywhere, so this patch doesn't have any user-visible effects. However, I'm prototyping a new CLI command which will need to parse annotations. Change `tasks_create` so that it routes kwargs to the appropriate destinations instead of passing all of them both to `TaskWriteRequest` and `create_from_data`. I don't think this is _really_ necessary (the extra arguments should just be ignored), but it makes the code more illustrative. ### How has this been tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> Unit tests. ### Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ the whole line. If you don't do that, GitHub will show incorrect progress for the pull request. If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I submit my changes into the `develop` branch - ~~[ ] I have added a description of my changes into the [CHANGELOG](https://github.com/opencv/cvat/blob/develop/CHANGELOG.md) file~~ - ~~[ ] I have updated the documentation accordingly~~ - ~~[ ] I have added tests to cover my changes~~ - ~~[ ] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))~~ - ~~[ ] I have increased versions of npm packages if it is necessary ([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning), [cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning), [cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning) and [cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning))~~ ### License - [x] I submit _my code changes_ under the same [MIT License]( https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern.
1 parent 29397b3
values.yaml
# Default values for cvat.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
cvat:
backend:
server:
replicas: 1
labels: {}
annotations: {}
resources: {}
affinity: {}
tolerations: []
envs:
ALLOWED_HOSTS: "*"
DJANGO_MODWSGI_EXTRA_ARGS: ""
additionalEnv: []
additionalVolumes: []
additionalVolumeMounts: []
worker:
export:
replicas: 2
labels: {}
annotations: {}
resources: {}
affinity: {}
tolerations: []
additionalEnv: []
additionalVolumes: []
additionalVolumeMounts: []
import:
replicas: 2
labels: {}
annotations: {}
resources: {}
affinity: {}
tolerations: []
additionalEnv: []
additionalVolumes: []
additionalVolumeMounts: []
annotation:
replicas: 1
labels: {}
annotations: {}
resources: {}
affinity: {}
tolerations: []
additionalEnv: []
additionalVolumes: []
additionalVolumeMounts: []
webhooks:
replicas: 1
labels: {}
annotations: {}
resources: {}
affinity: {}
tolerations: []
additionalEnv: []
additionalVolumes: []
additionalVolumeMounts: []
qualityreports:
replicas: 1
labels: {}
annotations: {}
resources: {}
affinity: {}
tolerations: []
additionalEnv: []
additionalVolumes: []
additionalVolumeMounts: []
utils:
replicas: 1
labels: {}
annotations: {}
resources: {}
affinity: {}
tolerations: []
additionalEnv: []
additionalVolumes: []
additionalVolumeMounts: []
replicas: 1
image: cvat/server
tag: dev
imagePullPolicy: Always
permissionFix:
enabled: true
service:
annotations:
traefik.ingress.kubernetes.io/service.sticky.cookie: "true"
spec:
type: ClusterIP
ports:
- port: 8080
targetPort: 8080
protocol: TCP
name: http
defaultStorage:
enabled: true
size: 20Gi
frontend:
replicas: 1
image: cvat/ui
tag: dev
imagePullPolicy: Always
labels: {}
# test: test
annotations: {}
# test.io/test: test
resources: {}
affinity: {}
tolerations: []
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: kubernetes.io/e2e-az-name
# operator: In
# values:
# - e2e-az1
# - e2e-az2
additionalEnv: []
# Example:
# - name: volume-from-secret
# - name: TEST
# value: "test"
additionalVolumes: []
# Example(assumes that pvc was already created):
# - name: tmp
# persistentVolumeClaim:
# claimName: tmp
additionalVolumeMounts: []
# Example:
# - mountPath: /tmp
# name: tmp
# subPath: test
service:
type: ClusterIP
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
opa:
replicas: 1
image: openpolicyagent/opa
tag: 0.45.0-rootless
imagepullploicy: IfNotPresent
labels: {}
# test: test
annotations: {}
# test.io/test: test
resources: {}
affinity: {}
tolerations: []
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: kubernetes.io/e2e-az-name
# operator: In
# values:
# - e2e-az1
# - e2e-az2
additionalEnv: []
# Example:
# - name: volume-from-secret
# - name: TEST
# value: "test"
additionalVolumes: []
# Example(assumes that pvc was already created):
# - name: tmp
# persistentVolumeClaim:
# claimName: tmp
additionalVolumeMounts: []
# Example:
# - mountPath: /tmp
# name: tmp
# subPath: test
composeCompatibleServiceName: true # Sets service name to opa in order to be compatible with Docker Compose. Necessary because changing IAM_OPA_DATA_URL via environment variables in current images. Hinders multiple deployment due to duplicate name
service:
type: ClusterIP
ports:
- port: 8181
targetPort: 8181
protocol: TCP
name: http
postgresql:
#See https://github.com/bitnami/charts/blob/master/bitnami/postgresql/ for more info
enabled: true # false for external db
external:
host: 127.0.0.1
port: 5432
# If not external following config will be applied by default
auth:
existingSecret: "{{ .Release.Name }}-postgres-secret"
username: cvat
database: cvat
service:
ports:
postgresql: 5432
secret:
create: true
name: "{{ .Release.Name }}-postgres-secret"
password: cvat_postgresql
postgres_password: cvat_postgresql_postgres
replication_password: cvat_postgresql_replica
redis:
#See https://github.com/bitnami/charts/blob/master/bitnami/redis/ for more info
enabled: true
external:
host: 127.0.0.1
auth:
existingSecret: "{{ .Release.Name }}-redis-secret"
secret:
create: true
name: "{{ .Release.Name }}-redis-secret"
password: cvat_redis
cluster:
enabled: false
nuclio:
enabled: false
# See https://github.com/nuclio/nuclio/blob/master/hack/k8s/helm/nuclio/values.yaml for more info
# registry:
# loginUrl: someurl
# credentials:
# username: someuser
# password: somepass
analytics:
enabled: true
clickhouseDb: cvat
clickhouseUser: user
clickhousePassword: user
clickhouseHost: "{{ .Release.Name }}-clickhouse"
ingress:
path: /analytics
pathType: "Prefix"
annotations:
kubernetes.io/ingress.class: traefik
service:
name: grafana
port: 80
vector:
envFrom:
- secretRef:
name: cvat-analytics-secret
existingConfigMaps:
- cvat-vector-config
dataDir: "/vector-data-dir"
containerPorts:
- name: http
containerPort: 80
protocol: TCP
service:
ports:
- name: http
port: 80
protocol: TCP
image:
tag: "0.26.0-alpine"
clickhouse:
shards: 1
replicaCount: 1
extraEnvVarsSecret: cvat-analytics-secret
initdbScriptsSecret: cvat-clickhouse-init
auth:
username: user
existingSecret: cvat-analytics-secret
existingSecretKey: CLICKHOUSE_PASSWORD
grafana:
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: 'ClickHouse'
type: 'grafana-clickhouse-datasource'
isDefault: true
jsonData:
defaultDatabase: cvat
port: 9000
server: "{{ .Release.Name }}-clickhouse"
username: user
tlsSkipVerify: false
secureJsonData:
password: user
editable: false
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards
dashboardsConfigMaps:
default: "cvat-grafana-dashboards"
plugins:
- grafana-clickhouse-datasource
grafana.ini:
server:
root_url: https://cvat.local/analytics
dashboards:
default_home_dashboard_path: /var/lib/grafana/dashboards/default/all_events.json
users:
viewers_can_edit: true
auth:
disable_login_form: true
disable_signout_menu: true
auth.anonymous:
enabled: true
org_role: Admin
auth.basic:
enabled: false
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
# tls:
# - hosts:
# - <your_domain>
# secretName: ingress-tls-cvat
traefik:
service:
externalIPs:
# - "192.168.49.2"
smokescreen:
opts: ''
Computing file changes ...