Skip to content

Commit

Permalink
update helm charts & readme
Browse files Browse the repository at this point in the history
  • Loading branch information
t83714 committed Jul 17, 2024
1 parent 6a5466c commit 80985af
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 78 deletions.
145 changes: 75 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

An [OpenAI's `embeddings` API](https://platform.openai.com/docs/api-reference/embeddings/create) compatible microservice for Magda.

> See [this test case](../test/integration.test.ts) for an example of how to use this API with [@langchain/openai](https://www.npmjs.com/package/@langchain/openai).
Text embeddings evaluate how closely related text strings are. They are commonly utilized for:

- Search (ranking results based on their relevance to a query)
Expand All @@ -21,76 +23,79 @@ This embedding API is created for [Magda](https://github.com/magda-io/magda)'s v

Kubernetes: `>= 1.21.0`

| Repository | Name | Version |
|------------|------|---------|
| oci://ghcr.io/magda-io/charts | magda-common | 4.2.1 |
| Repository | Name | Version |
| ----------------------------- | ------------ | ------- |
| oci://ghcr.io/magda-io/charts | magda-common | 4.2.1 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| autoscaling.hpa.enabled | bool | `false` | |
| autoscaling.hpa.maxReplicas | int | `3` | |
| autoscaling.hpa.minReplicas | int | `1` | |
| autoscaling.hpa.targetCPU | int | `90` | |
| autoscaling.hpa.targetMemory | string | `""` | |
| debug | bool | `false` | |
| defaultImage.imagePullSecret | bool | `false` | |
| defaultImage.pullPolicy | string | `"IfNotPresent"` | |
| defaultImage.repository | string | `"ghcr.io/magda-io"` | |
| deploymentAnnotations | object | `{}` | |
| envFrom | list | `[]` | |
| extraContainers | string | `""` | |
| extraEnvs | list | `[]` | |
| extraInitContainers | string | `""` | |
| extraVolumeMounts | list | `[]` | |
| extraVolumes | list | `[]` | |
| fullnameOverride | string | `""` | |
| global.image | object | `{}` | |
| global.rollingUpdate | object | `{}` | |
| hostAliases | list | `[]` | |
| image.name | string | `"magda-embedding-api"` | |
| lifecycle | object | `{}` | pod lifecycle policies as outlined here: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks |
| livenessProbe.failureThreshold | int | `10` | |
| livenessProbe.initialDelaySeconds | int | `10` | |
| livenessProbe.periodSeconds | int | `20` | |
| livenessProbe.successThreshold | int | `1` | |
| livenessProbe.tcpSocket.port | int | `5601` | |
| livenessProbe.timeoutSeconds | int | `5` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext.runAsUser | int | `1000` | |
| priorityClassName | string | `"magda-9"` | |
| rbac.automountServiceAccountToken | bool | `false` | Controls whether or not the Service Account token is automatically mounted to /var/run/secrets/kubernetes.io/serviceaccount |
| rbac.create | bool | `false` | |
| rbac.serviceAccountAnnotations | object | `{}` | |
| rbac.serviceAccountName | string | `""` | |
| readinessProbe.failureThreshold | int | `10` | |
| readinessProbe.initialDelaySeconds | int | `10` | |
| readinessProbe.periodSeconds | int | `20` | |
| readinessProbe.successThreshold | int | `1` | |
| readinessProbe.tcpSocket.port | int | `5601` | |
| readinessProbe.timeoutSeconds | int | `5` | |
| replicas | int | `1` | |
| resources.limits.memory | string | `"512M"` | |
| resources.requests.cpu | string | `"100m"` | |
| resources.requests.memory | string | `"512M"` | |
| service.annotations | object | `{}` | |
| service.httpPortName | string | `"http"` | |
| service.labels | object | `{}` | |
| service.loadBalancerIP | string | `""` | |
| service.loadBalancerSourceRanges | list | `[]` | |
| service.name | string | `"magda-embedding-api"` | |
| service.nodePort | string | `""` | |
| service.port | int | `5601` | |
| service.type | string | `"ClusterIP"` | |
| startupProbe.failureThreshold | int | `20` | |
| startupProbe.initialDelaySeconds | int | `10` | |
| startupProbe.periodSeconds | int | `10` | |
| startupProbe.successThreshold | int | `1` | |
| startupProbe.tcpSocket.port | int | `5601` | |
| startupProbe.timeoutSeconds | int | `5` | |
| tolerations | list | `[]` | |
| topologySpreadConstraints | list | `[]` | This is the pod topology spread constraints https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ |
| Key | Type | Default | Description |
| ---------------------------------- | ------ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| affinity | object | `{}` | |
| autoscaling.hpa.enabled | bool | `false` | |
| autoscaling.hpa.maxReplicas | int | `3` | |
| autoscaling.hpa.minReplicas | int | `1` | |
| autoscaling.hpa.targetCPU | int | `90` | |
| autoscaling.hpa.targetMemory | string | `""` | |
| debug | bool | `false` | |
| defaultImage.imagePullSecret | bool | `false` | |
| defaultImage.pullPolicy | string | `"IfNotPresent"` | |
| defaultImage.repository | string | `"ghcr.io/magda-io"` | |
| deploymentAnnotations | object | `{}` | |
| envFrom | list | `[]` | |
| extraContainers | string | `""` | |
| extraEnvs | list | `[]` | |
| extraInitContainers | string | `""` | |
| extraVolumeMounts | list | `[]` | |
| extraVolumes | list | `[]` | |
| fullnameOverride | string | `""` | |
| global.image | object | `{}` | |
| global.rollingUpdate | object | `{}` | |
| hostAliases | list | `[]` | |
| image.name | string | `"magda-embedding-api"` | |
| lifecycle | object | `{}` | pod lifecycle policies as outlined here: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks |
| livenessProbe.failureThreshold | int | `10` | |
| livenessProbe.httpGet.path | string | `"/status/liveness"` | |
| livenessProbe.httpGet.port | int | `8080` | |
| livenessProbe.initialDelaySeconds | int | `10` | |
| livenessProbe.periodSeconds | int | `20` | |
| livenessProbe.successThreshold | int | `1` | |
| livenessProbe.timeoutSeconds | int | `5` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext.runAsUser | int | `1000` | |
| priorityClassName | string | `"magda-9"` | |
| rbac.automountServiceAccountToken | bool | `false` | Controls whether or not the Service Account token is automatically mounted to /var/run/secrets/kubernetes.io/serviceaccount |
| rbac.create | bool | `false` | |
| rbac.serviceAccountAnnotations | object | `{}` | |
| rbac.serviceAccountName | string | `""` | |
| readinessProbe.failureThreshold | int | `10` | |
| readinessProbe.httpGet.path | string | `"/status/readiness"` | |
| readinessProbe.httpGet.port | int | `8080` | |
| readinessProbe.initialDelaySeconds | int | `10` | |
| readinessProbe.periodSeconds | int | `20` | |
| readinessProbe.successThreshold | int | `1` | |
| readinessProbe.timeoutSeconds | int | `5` | |
| replicas | int | `1` | |
| resources.limits.memory | string | `"512M"` | |
| resources.requests.cpu | string | `"100m"` | |
| resources.requests.memory | string | `"512M"` | |
| service.annotations | object | `{}` | |
| service.httpPortName | string | `"http"` | |
| service.labels | object | `{}` | |
| service.loadBalancerIP | string | `""` | |
| service.loadBalancerSourceRanges | list | `[]` | |
| service.name | string | `"magda-embedding-api"` | |
| service.nodePort | string | `""` | |
| service.port | int | `8080` | |
| service.type | string | `"ClusterIP"` | |
| startupProbe.failureThreshold | int | `30` | |
| startupProbe.httpGet.path | string | `"/status/startup"` | |
| startupProbe.httpGet.port | int | `8080` | |
| startupProbe.initialDelaySeconds | int | `10` | |
| startupProbe.periodSeconds | int | `10` | |
| startupProbe.successThreshold | int | `1` | |
| startupProbe.timeoutSeconds | int | `5` | |
| tolerations | list | `[]` | |
| topologySpreadConstraints | list | `[]` | This is the pod topology spread constraints https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ |
2 changes: 2 additions & 0 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

An [OpenAI's `embeddings` API](https://platform.openai.com/docs/api-reference/embeddings/create) compatible microservice for Magda.

> See [this test case](../test/integration.test.ts) for an example of how to use this API with [@langchain/openai](https://www.npmjs.com/package/@langchain/openai).

Text embeddings evaluate how closely related text strings are. They are commonly utilized for:

- Search (ranking results based on their relevance to a query)
Expand Down
19 changes: 11 additions & 8 deletions deploy/magda-embedding-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,29 @@ rbac:
hostAliases: []

startupProbe:
tcpSocket:
port: 5601
httpGet:
path: /status/startup
port: 8080
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 20
failureThreshold: 30
successThreshold: 1
initialDelaySeconds: 10

livenessProbe:
tcpSocket:
port: 5601
httpGet:
path: /status/liveness
port: 8080
periodSeconds: 20
timeoutSeconds: 5
failureThreshold: 10
successThreshold: 1
initialDelaySeconds: 10

readinessProbe:
tcpSocket:
port: 5601
httpGet:
path: /status/readiness
port: 8080
periodSeconds: 20
timeoutSeconds: 5
failureThreshold: 10
Expand Down Expand Up @@ -103,7 +106,7 @@ service:
# ipFamilyPolicy: SingleStack
# ipFamilies:
# - IPv4
port: 5601
port: 8080
loadBalancerIP: ""
nodePort: ""
labels: {}
Expand Down

0 comments on commit 80985af

Please sign in to comment.