forked from cvat-ai/cvat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace keydb with kvrocks (cvat-ai#7339)
Resolved cvat-ai#7345
- Loading branch information
Showing
12 changed files
with
211 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### Changed | ||
|
||
- KeyDB used as data cache replaced by Kvrocks | ||
(<https://github.com/opencv/cvat/pull/7339>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,4 +111,4 @@ services: | |
|
||
cvat_redis_ondisk: | ||
ports: | ||
- '6479:6379' | ||
- '6666:6666' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{- if and .Values.cvat.kvrocks.enabled .Values.cvat.kvrocks.secret.create }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: "{{ tpl (.Values.cvat.kvrocks.secret.name) . }}" | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "cvat.labels" . | nindent 4 }} | ||
type: generic | ||
stringData: | ||
password: {{ .Values.cvat.kvrocks.secret.password | toString | quote }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{{- if .Values.cvat.kvrocks.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Release.Name }}-kvrocks | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "cvat.labels" . | nindent 4 }} | ||
app: cvat-app | ||
tier: kvrocks | ||
spec: | ||
selector: | ||
app: cvat-app | ||
tier: kvrocks | ||
{{- include "cvat.labels" . | nindent 4 }} | ||
type: ClusterIP | ||
ports: | ||
- port: 6666 | ||
targetPort: 6666 | ||
protocol: TCP | ||
name: http | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{{- if .Values.cvat.kvrocks.enabled }} | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: {{ .Release.Name }}-kvrocks | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "cvat.labels" . | nindent 4 }} | ||
app: cvat-app | ||
tier: kvrocks | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
{{- include "cvat.labels" . | nindent 6 }} | ||
app: cvat-app | ||
tier: kvrocks | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "cvat.labels" . | nindent 8 }} | ||
app: cvat-app | ||
tier: kvrocks | ||
{{- with .Values.cvat.kvrocks.labels }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.cvat.kvrocks.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
containers: | ||
- name: cvat-kvrocks-app-container | ||
image: {{ .Values.cvat.kvrocks.image }}:{{ .Values.cvat.kvrocks.tag }} | ||
imagePullPolicy: {{ .Values.cvat.kvrocks.imagePullPolicy }} | ||
args: | ||
- --dir | ||
- /var/lib/kvrocks/data | ||
- --requirepass | ||
- "$(CVAT_REDIS_ONDISK_PASSWORD)" | ||
{{- with .Values.cvat.kvrocks.resources }} | ||
resources: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
ports: | ||
- containerPort: 6666 | ||
env: | ||
- name: CVAT_REDIS_ONDISK_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
{{- if .Values.cvat.kvrocks.secret.create }} | ||
name: "{{ tpl (.Values.cvat.kvrocks.secret.name) . }}" | ||
{{- else }} | ||
name: "{{ tpl (.Values.cvat.kvrocks.existingSecret) . }}" | ||
{{- end }} | ||
key: password | ||
{{- with .Values.cvat.kvrocks.additionalEnv }} | ||
{{- toYaml . | nindent 10 }} | ||
{{- end }} | ||
volumeMounts: | ||
- name: {{ .Release.Name }}-kvrocks-data | ||
mountPath: /var/lib/kvrocks/data | ||
{{- with .Values.cvat.kvrocks.additionalVolumeMounts }} | ||
{{- toYaml . | nindent 10 }} | ||
{{- end }} | ||
{{- with .Values.cvat.kvrocks.additionalVolumes }} | ||
volumes: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.cvat.kvrocks.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.cvat.kvrocks.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.cvat.kvrocks.defaultStorage.enabled }} | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: {{ .Release.Name }}-kvrocks-data | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "cvat.labels" . | nindent 8 }} | ||
app: cvat-app | ||
tier: kvroocks | ||
spec: | ||
accessModes: | ||
{{- if .Values.cvat.kvrocks.defaultStorage.accessModes }} | ||
{{ .Values.cvat.kvrocks.defaultStorage.accessModes | toYaml | nindent 6 }} | ||
{{- else }} | ||
- ReadWriteOnce | ||
{{- end }} | ||
{{- if .Values.cvat.kvrocks.defaultStorage.storageClassName }} | ||
storageClassName: {{ .Values.cvat.kvrocks.defaultStorage.storageClassName }} | ||
{{- end }} | ||
resources: | ||
requests: | ||
storage: {{ .Values.cvat.kvrocks.defaultStorage.size }} | ||
{{- end}} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters