From 54ec867ba105594f568bf50dcd751ea1c7092e1d Mon Sep 17 00:00:00 2001 From: Nayuta <111858489+nayutah@users.noreply.github.com> Date: Mon, 3 Apr 2023 22:19:55 +0800 Subject: [PATCH] feat: addon support for chatgpt-retrieval-plugin milvus qdrant weaviate (#2385) --- Makefile | 2 + .../addons/chatgpt-retrieval-plugin.yaml | 39 +++++++++++++++++++ .../helm/templates/addons/milvus-addon.yaml | 24 ++++++++++++ .../helm/templates/addons/qdrant-addon.yaml | 24 ++++++++++++ .../helm/templates/addons/weaviate-addon.yaml | 24 ++++++++++++ .../weaviate/templates/clusterdefinition.yaml | 2 - .../weaviate/templates/headlessService.yaml | 18 --------- 7 files changed, 113 insertions(+), 20 deletions(-) create mode 100644 deploy/helm/templates/addons/chatgpt-retrieval-plugin.yaml create mode 100644 deploy/helm/templates/addons/milvus-addon.yaml create mode 100644 deploy/helm/templates/addons/qdrant-addon.yaml create mode 100644 deploy/helm/templates/addons/weaviate-addon.yaml delete mode 100644 deploy/weaviate/templates/headlessService.yaml diff --git a/Makefile b/Makefile index 345cebf01..46ac19038 100644 --- a/Makefile +++ b/Makefile @@ -393,6 +393,8 @@ bump-chart-ver: \ bump-single-chart-ver.milvus \ bump-single-chart-ver.qdrant \ bump-single-chart-ver.qdrant-cluster \ + bump-single-chart-ver.weaviate \ + bump-single-chart-ver.weaviate-cluster \ bump-single-chart-ver.chatgpt-retrieval-plugin bump-chart-ver: ## Bump helm chart version. diff --git a/deploy/helm/templates/addons/chatgpt-retrieval-plugin.yaml b/deploy/helm/templates/addons/chatgpt-retrieval-plugin.yaml new file mode 100644 index 000000000..de7826305 --- /dev/null +++ b/deploy/helm/templates/addons/chatgpt-retrieval-plugin.yaml @@ -0,0 +1,39 @@ +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: chatgpt-retrieval-plugin + labels: + {{- include "kubeblocks.labels" . | nindent 4 }} + "kubeblocks.io/provider": apecloud + {{- if .Values.keepAddons }} + annotations: + helm.sh/resource-policy: keep + {{- end }} +spec: + description: 'Deploys a ChatGPT Retrieval Plugin application in a cluster. + ChatGPT Retrieval Plugin is an application for personalizing your ChatGPT dialogue through your private data.' + type: Helm + + helm: + chartLocationURL: https://jihulab.com/api/v4/projects/85949/packages/helm/stable/charts/chatgpt-retrieval-plugin-{{ default .Chart.Version .Values.versionOverride }}.tgz + valuesMapping: + valueMap: + replicaCount: replicaCount + + jsonMap: + tolerations: tolerations + + resources: + cpu: + requests: resources.requests.cpu + limits: resources.limits.cpu + memory: + requests: resources.requests.memory + limits: resources.limits.memory + + defaultInstallValues: + - replicas: 1 + + installable: + autoInstall: false + diff --git a/deploy/helm/templates/addons/milvus-addon.yaml b/deploy/helm/templates/addons/milvus-addon.yaml new file mode 100644 index 000000000..40d9f022f --- /dev/null +++ b/deploy/helm/templates/addons/milvus-addon.yaml @@ -0,0 +1,24 @@ +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: milvus + labels: + {{- include "kubeblocks.labels" . | nindent 4 }} + "kubeblocks.io/provider": community + {{- if .Values.keepAddons }} + annotations: + helm.sh/resource-policy: keep + {{- end }} +spec: + description: 'Milvus is an open source (Apache-2.0 licensed) vector database built to power embedding similarity search and AI applications.' + + type: Helm + + helm: + chartLocationURL: https://jihulab.com/api/v4/projects/85949/packages/helm/stable/charts/milvus-{{ default .Chart.Version .Values.versionOverride }}.tgz + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true diff --git a/deploy/helm/templates/addons/qdrant-addon.yaml b/deploy/helm/templates/addons/qdrant-addon.yaml new file mode 100644 index 000000000..9f3b8ab10 --- /dev/null +++ b/deploy/helm/templates/addons/qdrant-addon.yaml @@ -0,0 +1,24 @@ +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: qdrant + labels: + {{- include "kubeblocks.labels" . | nindent 4 }} + "kubeblocks.io/provider": community + {{- if .Values.keepAddons }} + annotations: + helm.sh/resource-policy: keep + {{- end }} +spec: + description: 'Qdrant is an open source (Apache-2.0 licensed), vector similarity search engine and vector database.' + + type: Helm + + helm: + chartLocationURL: https://jihulab.com/api/v4/projects/85949/packages/helm/stable/charts/qdrant-{{ default .Chart.Version .Values.versionOverride }}.tgz + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true diff --git a/deploy/helm/templates/addons/weaviate-addon.yaml b/deploy/helm/templates/addons/weaviate-addon.yaml new file mode 100644 index 000000000..3d7891897 --- /dev/null +++ b/deploy/helm/templates/addons/weaviate-addon.yaml @@ -0,0 +1,24 @@ +apiVersion: extensions.kubeblocks.io/v1alpha1 +kind: Addon +metadata: + name: weaviate + labels: + {{- include "kubeblocks.labels" . | nindent 4 }} + "kubeblocks.io/provider": community + {{- if .Values.keepAddons }} + annotations: + helm.sh/resource-policy: keep + {{- end }} +spec: + description: 'Weaviate is an open-source (BSD-3.0 licensed) vector database. It allows you to store data objects and vector embeddings from your favorite ML-models, and scale seamlessly into billions of data objects.' + + type: Helm + + helm: + chartLocationURL: https://jihulab.com/api/v4/projects/85949/packages/helm/stable/charts/weaviate-{{ default .Chart.Version .Values.versionOverride }}.tgz + + installable: + autoInstall: false + + defaultInstallValues: + - enabled: true diff --git a/deploy/weaviate/templates/clusterdefinition.yaml b/deploy/weaviate/templates/clusterdefinition.yaml index e30b95f96..34abdb070 100644 --- a/deploy/weaviate/templates/clusterdefinition.yaml +++ b/deploy/weaviate/templates/clusterdefinition.yaml @@ -126,5 +126,3 @@ spec: value: "7000" - name: CLUSTER_DATA_BIND_PORT value: "7001" - - name: CLUSTER_JOIN - value: weaviate-headless.default.svc.cluster.local diff --git a/deploy/weaviate/templates/headlessService.yaml b/deploy/weaviate/templates/headlessService.yaml deleted file mode 100644 index 5c138d5d3..000000000 --- a/deploy/weaviate/templates/headlessService.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: weaviate-headless - labels: - app.kubernetes.io/name: weaviate - app.kubernetes.io/managed-by: helm -spec: - type: ClusterIP - clusterIP: None - selector: - app: weaviate - ports: - - protocol: TCP - port: 80 - targetPort: 7000 - publishNotReadyAddresses: true