diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index 7c764f4..bf090a1 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -5,20 +5,18 @@ on: push: # file paths to consider in the event. Optional; defaults to all. paths: - - 'templates/**' - - 'Chart.yaml' - - 'requirements.yaml' - - 'values.yaml' - - '.github/workflows/helm.yml' + - 'charts/**' + - 'ct.yaml' + - '.github/workflows/lint-test.yml' + - '!**.md' - '!**.txt' pull_request: # file paths to consider in the event. Optional; defaults to all. paths: - - 'templates/**' - - 'Chart.yaml' - - 'requirements.yaml' - - 'values.yaml' - - '.github/workflows/helm.yml' + - 'charts/**' + - 'ct.yaml' + - '.github/workflows/lint-test.yml' + - '!**.md' - '!**.txt' jobs: @@ -34,14 +32,20 @@ jobs: run: git fetch --prune --unshallow - name: Run chart-testing (lint) id: lint - uses: helm/chart-testing-action@v1.0.0-rc.1 + uses: helm/chart-testing-action@v1.0.0-rc.2 with: command: lint + config: ct.yaml - name: Create kind cluster uses: helm/kind-action@v1.0.0-alpha.3 # Only build a kind cluster if there are chart changes to test. if: steps.lint.outputs.changed == 'true' + - name: Modify Values Yaml file + shell: bash + run: | + sed -i '/^mysql:/{n;s/true/false/;}' charts/milvus/values.yaml - name: Run chart-testing (install) - uses: helm/chart-testing-action@v1.0.0-rc.1 + uses: helm/chart-testing-action@v1.0.0-rc.2 with: command: install + config: ct.yaml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..675ff84 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release Charts + +# This workflow is triggered on pushes or pull request to the repository. +on: + push: + branches: + - master + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Fetch history + run: git fetch --prune --unshallow + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.0.0-rc.2 + env: + CR_TOKEN: "${{ secrets.CR_TOKEN }}" diff --git a/README.md b/README.md index 527af29..d69c10f 100644 --- a/README.md +++ b/README.md @@ -1,218 +1,46 @@ -# Milvus Helm Chart +# Milvus Helm Charts -For more information about installing and using Helm, see the [Helm Docs](https://helm.sh/docs/). For a quick introduction to Charts, see the [Chart Guide](https://helm.sh/docs/topics/charts/). +This GitHub repository is the official source for Milvus's Helm charts. -To install Milvus, refer to [Milvus installation](https://milvus.io/docs/guides/get_started/install_milvus/install_milvus.md). +![GitHub](https://img.shields.io/github/license/milvus-io/milvus-helm) +[![](https://github.com/milvus-io/milvus-helm/workflows/Release%20Charts/badge.svg?branch=master)](https://github.com/milvus-io/milvus-helm/actions) -## Introduction -This chart bootstraps Milvus deployment on a Kubernetes cluster using the Helm package manager. - -## Prerequisites - -- Kubernetes 1.10+ -- Helm >= 2.12.0 - -## Installing the Chart - -1. Add the stable repository -```bash -$ helm repo add stable https://kubernetes-charts.storage.googleapis.com -``` -2. Install Chart dependencies -```bash -# in 'milvus-helm/' -$ helm dep update -``` -3. Install Helm package - -To install the chart with the release name `my-release`: - -```bash -# Helm v2.x -$ cd milvus-helm -$ helm install --name my-release . -``` - -or - -```bash -# Helm v3.x -$ cd milvus-helm -$ helm install my-release . -``` - -> **Tip**: To list all releases, using `helm list`. - -### Deploying Milvus with cluster enabled - -```bash -$ helm install --set cluster.enabled=true --set persistence.enabled=true my-release . -``` - -> **NOTE:** Since all Pods should have the same collection of Milvus files, it is recommended to create just one PV -that is shared. This is controlled by setting `persistence.enabled=true`. You will have to ensure yourself the -PVC are shared properly between your pods: -- If you are on AWS, you can use [Elastic File System (EFS)](https://aws.amazon.com/efs/). -- If you are on Azure, you can use -[Azure File Storage (AFS)](https://docs.microsoft.com/en-us/azure/aks/azure-files-dynamic-pv). - -To share a PV with multiple Pods, the PV needs to have accessMode 'ReadOnlyMany' or 'ReadWriteMany'. - -## Uninstall the Chart - -To uninstall/delete the my-release deployment: - -```bash -# Helm v2.x -$ helm delete my-release -``` - -or - -```bash -# Helm v3.x -$ helm uninstall my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Configuration - -### Milvus server Configuration - -The following table lists the configurable parameters of the Milvus chart and their default values. - -| Parameter | Description | Default | -|-------------------------------------------|-----------------------------------------------|---------------------------------------------------------| -| `version` | Configuration Version | `0.5` | -| `primaryPath` | Primary directory used to save meta data, vector data and index data. | `/var/lib/milvus` | -| `timeZone` | Use UTC-x or UTC+x to specify a time zone. | `UTC+8` | -| `autoFlushInterval` | The interval, in seconds, at which Milvus automatically flushes data to disk. 0 means disable the regular flush. (s) | `1` | -| `fileCleanupTimeout` | The time gap between marking a file as 'deleted' and physically deleting this file from disk, range [0, 3600]. (s) | `10` | -| `logs.path` | Absolute path to the folder holding the log files. | `/var/lib/milvus/logs` | -| `logs.maxLogFileSize` | The maximum size of each log file, size range [512, 4096]. (MB) | `1024MB` | -| `logs.logRotateNum` | The maximum number of log files that Milvus keeps for each logging level, num range [0, 1024], 0 means unlimited. | `0` | -| `cache.insertBufferSize` | Maximum insert buffer size allowed (GB) | `1GB` | -| `cache.cacheSize` | Size of CPU memory used for cache (GB) | `4GB` | -| `network.httpEnabled` | Enable web server or not. | `true` | -| `network.httpPort` | Port that Milvus web server monitors. | `19121` | -| `wal.enabled` | Enable write-ahead logging. | `true` | -| `wal.recoveryErrorIgnore` | Whether to ignore logs with errors that happens during WAL | `true` | -| `wal.bufferSize` | Sum total of the read buffer and the write buffer. (MB) | `256MB` | -| `wal.path` | Location of WAL log files. | `/var/lib/milvus/db/wal` | -| `gpu.enabled` | Enable GPU resources | `false` | -| `gpu.cacheSize` | Size of GPU memory per card used for cache (GB) | `1GB` | -| `gpu.gpuSearchThreshold` | GPU search threshold | `1000` | -| `gpu.searchDevices` | Define the GPU devices used for search computation | `[gpu0]` | -| `gpu.buildIndexDevices` | Define the GPU devices used for index building | `[gpu0]` | -| `metrics.enabled` | Set this to `true` to enable exporting Prometheus monitoring metrics | `false` | -| `metrics.address` | Pushgateway address | `127.0.0.1` | -| `metrics.port` | Prometheus monitoring metrics port | `9091` | -| `readonly.logs.path` | Absolute path to the folder holding the log files. | `/var/lib/milvus/logs` | -| `readonly.logs.maxLogFileSize` | The maximum size of each log file, size range [512, 4096]. (MB) | `1024` | -| `readonly.logs.logRotateNum` | The maximum number of log files that Milvus keeps for each logging level, num range [0, 1024], 0 means unlimited. | `0` | -| `readonly.cache.insertBufferSize` | Maximum insert buffer size allowed (GB) | `1GB` | -| `readonly.cache.cacheSize` | Size of CPU memory used for cache (GB) | `4GB` | -| `readonly.gpu.enabled` | Enable GPU resources | `false` | -| `readonly.gpu.cacheSize` | Size of GPU memory per card used for cache (GB) | `1GB` | -| `readonly.gpu.gpuSearchThreshold` | GPU search threshold | `1000` | -| `readonly.gpu.searchDevices` | Define the GPU devices used for search computation | `[gpu0]` | -| `readonly.gpu.buildIndexDevices` | Define the GPU devices used for index building | `[gpu0]` | - - -### Milvus Deployment Configuration - -The following table lists the configurable parameters of the Milvus chart and their default values. - -| Parameter | Description | Default | -|-------------------------------------------|-----------------------------------------------|---------------------------------------------------------| -| `cluster.enabled` | Create a Milvus cluster | `false` | -| `replicas` | Number of nodes | `1` | -| `restartPolicy` | Restart policy for all containers | `Always` | -| `initContainerImage` | Init container image | `alpine:3.8` | -| `image.repository` | Image repository | `milvusdb/milvus` | -| `image.tag` | Image tag | `0.10.0-cpu-d061620-5f3c00` | -| `image.pullPolicy` | Image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Image pull secrets | `{}` | -| `resources` | CPU/GPU/Memory resource requests/limits | `{}` | -| `terminationGracePeriodSeconds` | Optional duration in seconds the pod needs to terminate gracefully | `30` | -| `extraInitContainers` | Additional init containers | `[]` | -| `extraContainers` | Additional containers | `unset` | -| `extraVolumes` | Additional volumes for use in extraContainers | `unset` | -| `extraVolumeMounts` | Additional volume mounts to add to the pods | `unset` | -| `extraConfigFiles` | Content of additional configuration files. | `{}` | -| `livenessProbe` | Liveness Probe settings | `{ "tcpSocket": { "port": 19530 } "initialDelaySeconds": 15, "periodSeconds": 15, "timeoutSeconds": 10, "failureThreshold": 5 }` | -| `readinessProbe` | Readiness Probe settings | `{ "tcpSocket": { "port": 19530 } "initialDelaySeconds": 15, "periodSeconds": 15, "timeoutSeconds": 10, "failureThreshold": 3 }` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.port` | Kubernetes port where service is exposed | `19530` | -| `service.nodePort` | Kubernetes service nodePort | `unset` | -| `service.webNodePort` | Kubernetes web server nodePort | `unset` | -| `service.metricsNodePort` | Kubernetes metrics server nodePort | `unset` | -| `service.annotations` | Service annotations | `{}` | -| `service.labels` | Custom labels | `{}` | -| `service.clusterIP` | Internal cluster service IP | `unset` | -| `service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `unset` | -| `service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to lb (if supported) | `[]` | -| `serivce.externalIPs` | service external IP addresses | `[]` | -| `persistence.enabled` | Use persistent volume to store data | `false` | -| `persistence.annotations` | PersistentVolumeClaim annotations | `{}` | -| `persistence.persistentVolumeClaim.existingClaim` | Use your own data Persistent Volume existing claim name | `unset` | -| `persistence.persistentVolumeClaim.storageClass` | The Milvus data Persistent Volume Storage Class | `unset` | -| `persistence.persistentVolumeClaim.accessModes` | The Milvus data Persistence access modes | `ReadWriteMany` | -| `persistence.persistentVolumeClaim.size` | The size of Milvus data Persistent Volume Storage Class | `50Gi` | -| `persistence.persistentVolumeClaim.subPath` | SubPath for Milvus data mount | `unset` | -| `logsPersistence.enabled` | Use persistent volume to store logs | `false` | -| `logsPersistence.annotations` | PersistentVolumeClaim annotations | `{}` | -| `logsPersistence.persistentVolumeClaim.existingClaim` | Use your own logs Persistent Volume existing claim name | `unset` | -| `logsPersistence.persistentVolumeClaim.storageClass` | The Milvus logs Persistent Volume Storage Class | `unset` | -| `logsPersistence.persistentVolumeClaim.accessModes` | The Milvus logs Persistence access modes | `ReadWriteMany` | -| `logsPersistence.persistentVolumeClaim.size` | The size of Milvus logs Persistent Volume Storage Class | `5Gi` | -| `logsPersistence.persistentVolumeClaim.subPath` | SubPath for Milvus logs mount | `unset` | -| `nodeSelector` | Node labels for pod assignment | `{}` | -| `tolerations` | Toleration labels for pod assignment | `[]` | -| `affinity` | Affinity settings for pod assignment | `{}` | -| `podAnnotations` | Additional pod annotations | `{}` | -| `podDisruptionBudget.minAvailable` | Pod disruption minimum available | `unset` | -| `podDisruptionBudget.maxUnavailable` | Pod disruption maximum unavailable | `unset` | -| `mishards.image.repository` | Mishards image repository | `milvusdb/mishards` | -| `mishards.image.tag` | Mishards image tag | `0.10.0` | -| `mishards.image.pullPolicy` | Mishards image pull policy | `IfNotPresent` | -| `mishards.replicas` | Number of mishards nodes | `1` | -| `mishards.resources` | Mishards CPU/GPU/Memory resource requests/limits | `{}` | -| `readonly.replicas` | Number of readonly nodes | `1` | -| `mishards.resources` | Mishards CPU/GPU/Memory resource requests/limits | `{}` | -| `admin.enabled` | Enable deployment of Milvus admin | `false` | -| `admin.image.repository` | Milvus Admin image repository | `milvusdb/milvus-em` | -| `admin.image.tag` | Milvus Admin image tag | `v0.4.0` | -| `admin.image.pullPolicy` | Milvus Admin image pull policy | `IfNotPresent` | -| `admin.replicas` | Number of Milvus Admin nodes | `1` | -| `admin.resources` | Milvus Admin CPU/GPU/Memory resource requests/limits | `{}` | -| `externalMysql.enabled` | Use exist mysql database | `false` | -| `externalMysql.ip` | IP address | `{}` | -| `externalMysql.port` | Port | `{}` | -| `externalMysql.user` | Username | `{}` | -| `externalMysql.password` | Password for the user | `{}` | -| `externalMysql.database` | Database name | `{}` | - - -### MySQL Configuration - -The following table lists the configurable parameters of the mysql chart and their default values. - -| Parameter | Description | Default | -|-------------------------------------------|-----------------------------------------------|---------------------------------------------------------| -| `mysql.enabled` | Enable deployment of MySQL | `true` | -| `mysql.mysqlDatabase` | Database name | `milvus` | -| `mysql.imageTag` | Image targe | `5.7.14` | -| `mysql.imagePullPolicy` | Image pull policy | `IfNotPresent` | -| `mysql.mysqlUser` | Username of new user to create. | `milvus` | -| `mysql.mysqlPassword` | Password for the new user. Ignored if existing secret is provided | `milvus` | -| `mysql.mysqlRootPassword` | Password for the root user. Ignored if existing secret is provided | `milvusroot` | -| `mysql.configurationFiles` | List of mysql configuration files | `...` | -| `mysql.initializationFiles` | List of SQL files which are run after the container started | `...` | -| `mysql.persistence.enabled` | Create a volume to store data | `true` | -| `mysql.persistence.existingClaim` | Name of existing persistent volume | `unset` | -| `mysql.persistence.annotations` | Persistent Volume annotations | `{}` | -| `mysql.persistence.storageClass` | Type of persistent volume claim | `unset` | -| `mysql.persistence.accessMode` | ReadWriteOnce or ReadOnly | `ReadWriteOnce` | -| `mysql.persistence.size` | Size of persistent volume claim | `8Gi` | +For instructions about how to install charts from this repository, visit the public website at: +[milvus-io.github.io/milvus-helm](https://github.com/milvus-io/milvus-helm) + +## Make changes to an existing chart without publishing + +If you make changes to an existing chart, but do not change its version, nothing new will be published to the _charts repository_. + +## Publishing a new version of a chart + +When a commit to master includes a new version of a _chart_, a GitHub action will make it available on the _charts repository_. + +### Detailed explanation of publish procedure + +With each commit to _master_, a GitHub action will compare all charts versions at the `charts` folder on _master_ branch with published versions at the `index.yaml` chart list on _gh-pages_ branch. + +When it detects that the version in the folder doesn't exist in `index.yaml`, it will create a release with the packaged chart content on the _GitHub repository_, and update `index.yaml` to include it on the `charts repository`. + +`index.yaml` is accesible from [milvus-io.github.io/milvus-helm/index.yaml](https://github.com/milvus-io/milvus-helm/index.yaml) and is the list of all _charts_ and their _versions_ available when you interact with the _charts repository_ using Helm. + +The packaged referenced in `index.yaml`, when it's updated using the GitHub action, will link for download to the URL provided by the _GitHub repository_ release files. + +## Add a new chart + +To add a new chart, create a directory inside _charts_ with it contents at _master_ branch. + +When you commit it, it will be picked up by the GitHub action, and if it contains a chart and version that doesn't already exist in the _charts repository_, a new release with the package for the chart will be published on the _GitHub repository_, +and the list of all charts at `index.yaml` on _gh-pages_ branch will be updated on the _charts repository_. + +## More information + +You can find more information at: +* [milvus-io.github.io/milvus-helm](https://github.com/milvus-io/milvus-helm) +* [The Helm package manager](https://helm.sh/) +* [Chart Releaser](https://github.com/helm/chart-releaser) +* [Chart Releaser GitHub Action](https://github.com/helm/chart-releaser-action) + +--- + +![Milvus logo](https://raw.githubusercontent.com/milvus-io/docs/master/assets/milvus_logo.png) diff --git a/.helmignore b/charts/milvus/.helmignore similarity index 100% rename from .helmignore rename to charts/milvus/.helmignore diff --git a/Chart.yaml b/charts/milvus/Chart.yaml similarity index 79% rename from Chart.yaml rename to charts/milvus/Chart.yaml index 2cb4fd1..cda99e3 100755 --- a/Chart.yaml +++ b/charts/milvus/Chart.yaml @@ -16,8 +16,7 @@ sources: - https://github.com/milvus-io/milvus - https://github.com/milvus-io/milvus-helm maintainers: - - name: milvus-dev - email: dev.milvus@zilliz.com - - name: community - email: community@zilliz.com -engine: gotpl \ No newline at end of file + - email: community@zilliz.com + name: community + url: www.zilliz.com +engine: gotpl diff --git a/charts/milvus/README.md b/charts/milvus/README.md new file mode 100644 index 0000000..52e26c1 --- /dev/null +++ b/charts/milvus/README.md @@ -0,0 +1,218 @@ +# Milvus Helm Chart + +For more information about installing and using Helm, see the [Helm Docs](https://helm.sh/docs/). For a quick introduction to Charts, see the [Chart Guide](https://helm.sh/docs/topics/charts/). + +To install Milvus, refer to [Milvus installation](https://milvus.io/docs/guides/get_started/install_milvus/install_milvus.md). + +## Introduction +This chart bootstraps Milvus deployment on a Kubernetes cluster using the Helm package manager. + +## Prerequisites + +- Kubernetes 1.10+ +- Helm >= 2.12.0 + +## Installing the Chart + +1. Add the stable repository +```bash +$ helm repo add stable https://kubernetes-charts.storage.googleapis.com +``` +2. Install Chart dependencies +```bash +# in 'milvus-helm/charts/milvus' +$ helm dep update +``` +3. Install Helm package + +To install the chart with the release name `my-release`: + +```bash +# Helm v2.x +$ cd milvus-helm +$ helm install --name my-release . +``` + +or + +```bash +# Helm v3.x +$ cd milvus-helm +$ helm install my-release . +``` + +> **Tip**: To list all releases, using `helm list`. + +### Deploying Milvus with cluster enabled + +```bash +$ helm install --set cluster.enabled=true --set persistence.enabled=true my-release . +``` + +> **NOTE:** Since all Pods should have the same collection of Milvus files, it is recommended to create just one PV +that is shared. This is controlled by setting `persistence.enabled=true`. You will have to ensure yourself the +PVC are shared properly between your pods: +- If you are on AWS, you can use [Elastic File System (EFS)](https://aws.amazon.com/efs/). +- If you are on Azure, you can use +[Azure File Storage (AFS)](https://docs.microsoft.com/en-us/azure/aks/azure-files-dynamic-pv). + +To share a PV with multiple Pods, the PV needs to have accessMode 'ReadOnlyMany' or 'ReadWriteMany'. + +## Uninstall the Chart + +To uninstall/delete the my-release deployment: + +```bash +# Helm v2.x +$ helm delete my-release +``` + +or + +```bash +# Helm v3.x +$ helm uninstall my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configuration + +### Milvus server Configuration + +The following table lists the configurable parameters of the Milvus chart and their default values. + +| Parameter | Description | Default | +|-------------------------------------------|-----------------------------------------------|---------------------------------------------------------| +| `version` | Configuration Version | `0.5` | +| `primaryPath` | Primary directory used to save meta data, vector data and index data. | `/var/lib/milvus` | +| `timeZone` | Use UTC-x or UTC+x to specify a time zone. | `UTC+8` | +| `autoFlushInterval` | The interval, in seconds, at which Milvus automatically flushes data to disk. 0 means disable the regular flush. (s) | `1` | +| `fileCleanupTimeout` | The time gap between marking a file as 'deleted' and physically deleting this file from disk, range [0, 3600]. (s) | `10` | +| `logs.path` | Absolute path to the folder holding the log files. | `/var/lib/milvus/logs` | +| `logs.maxLogFileSize` | The maximum size of each log file, size range [512, 4096]. (MB) | `1024MB` | +| `logs.logRotateNum` | The maximum number of log files that Milvus keeps for each logging level, num range [0, 1024], 0 means unlimited. | `0` | +| `cache.insertBufferSize` | Maximum insert buffer size allowed (GB) | `1GB` | +| `cache.cacheSize` | Size of CPU memory used for cache (GB) | `4GB` | +| `network.httpEnabled` | Enable web server or not. | `true` | +| `network.httpPort` | Port that Milvus web server monitors. | `19121` | +| `wal.enabled` | Enable write-ahead logging. | `true` | +| `wal.recoveryErrorIgnore` | Whether to ignore logs with errors that happens during WAL | `true` | +| `wal.bufferSize` | Sum total of the read buffer and the write buffer. (MB) | `256MB` | +| `wal.path` | Location of WAL log files. | `/var/lib/milvus/db/wal` | +| `gpu.enabled` | Enable GPU resources | `false` | +| `gpu.cacheSize` | Size of GPU memory per card used for cache (GB) | `1GB` | +| `gpu.gpuSearchThreshold` | GPU search threshold | `1000` | +| `gpu.searchDevices` | Define the GPU devices used for search computation | `[gpu0]` | +| `gpu.buildIndexDevices` | Define the GPU devices used for index building | `[gpu0]` | +| `metrics.enabled` | Set this to `true` to enable exporting Prometheus monitoring metrics | `false` | +| `metrics.address` | Pushgateway address | `127.0.0.1` | +| `metrics.port` | Prometheus monitoring metrics port | `9091` | +| `readonly.logs.path` | Absolute path to the folder holding the log files. | `/var/lib/milvus/logs` | +| `readonly.logs.maxLogFileSize` | The maximum size of each log file, size range [512, 4096]. (MB) | `1024` | +| `readonly.logs.logRotateNum` | The maximum number of log files that Milvus keeps for each logging level, num range [0, 1024], 0 means unlimited. | `0` | +| `readonly.cache.insertBufferSize` | Maximum insert buffer size allowed (GB) | `1GB` | +| `readonly.cache.cacheSize` | Size of CPU memory used for cache (GB) | `4GB` | +| `readonly.gpu.enabled` | Enable GPU resources | `false` | +| `readonly.gpu.cacheSize` | Size of GPU memory per card used for cache (GB) | `1GB` | +| `readonly.gpu.gpuSearchThreshold` | GPU search threshold | `1000` | +| `readonly.gpu.searchDevices` | Define the GPU devices used for search computation | `[gpu0]` | +| `readonly.gpu.buildIndexDevices` | Define the GPU devices used for index building | `[gpu0]` | + + +### Milvus Deployment Configuration + +The following table lists the configurable parameters of the Milvus chart and their default values. + +| Parameter | Description | Default | +|-------------------------------------------|-----------------------------------------------|---------------------------------------------------------| +| `cluster.enabled` | Create a Milvus cluster | `false` | +| `replicas` | Number of nodes | `1` | +| `restartPolicy` | Restart policy for all containers | `Always` | +| `initContainerImage` | Init container image | `alpine:3.8` | +| `image.repository` | Image repository | `milvusdb/milvus` | +| `image.tag` | Image tag | `0.10.0-cpu-d061620-5f3c00` | +| `image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Image pull secrets | `{}` | +| `image.resources` | CPU/GPU/Memory resource requests/limits | `{}` | +| `terminationGracePeriodSeconds` | Optional duration in seconds the pod needs to terminate gracefully | `30` | +| `extraInitContainers` | Additional init containers | `[]` | +| `extraContainers` | Additional containers | `unset` | +| `extraVolumes` | Additional volumes for use in extraContainers | `unset` | +| `extraVolumeMounts` | Additional volume mounts to add to the pods | `unset` | +| `extraConfigFiles` | Content of additional configuration files. | `{}` | +| `livenessProbe` | Liveness Probe settings | `{ "tcpSocket": { "port": 19530 } "initialDelaySeconds": 15, "periodSeconds": 15, "timeoutSeconds": 10, "failureThreshold": 5 }` | +| `readinessProbe` | Readiness Probe settings | `{ "tcpSocket": { "port": 19530 } "initialDelaySeconds": 15, "periodSeconds": 15, "timeoutSeconds": 10, "failureThreshold": 3 }` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.port` | Kubernetes port where service is exposed | `19530` | +| `service.nodePort` | Kubernetes service nodePort | `unset` | +| `service.webNodePort` | Kubernetes web server nodePort | `unset` | +| `service.metricsNodePort` | Kubernetes metrics server nodePort | `unset` | +| `service.annotations` | Service annotations | `{}` | +| `service.labels` | Custom labels | `{}` | +| `service.clusterIP` | Internal cluster service IP | `unset` | +| `service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `unset` | +| `service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to lb (if supported) | `[]` | +| `serivce.externalIPs` | service external IP addresses | `[]` | +| `persistence.enabled` | Use persistent volume to store data | `false` | +| `persistence.annotations` | PersistentVolumeClaim annotations | `{}` | +| `persistence.persistentVolumeClaim.existingClaim` | Use your own data Persistent Volume existing claim name | `unset` | +| `persistence.persistentVolumeClaim.storageClass` | The Milvus data Persistent Volume Storage Class | `unset` | +| `persistence.persistentVolumeClaim.accessModes` | The Milvus data Persistence access modes | `ReadWriteMany` | +| `persistence.persistentVolumeClaim.size` | The size of Milvus data Persistent Volume Storage Class | `50Gi` | +| `persistence.persistentVolumeClaim.subPath` | SubPath for Milvus data mount | `unset` | +| `logsPersistence.enabled` | Use persistent volume to store logs | `false` | +| `logsPersistence.annotations` | PersistentVolumeClaim annotations | `{}` | +| `logsPersistence.persistentVolumeClaim.existingClaim` | Use your own logs Persistent Volume existing claim name | `unset` | +| `logsPersistence.persistentVolumeClaim.storageClass` | The Milvus logs Persistent Volume Storage Class | `unset` | +| `logsPersistence.persistentVolumeClaim.accessModes` | The Milvus logs Persistence access modes | `ReadWriteMany` | +| `logsPersistence.persistentVolumeClaim.size` | The size of Milvus logs Persistent Volume Storage Class | `5Gi` | +| `logsPersistence.persistentVolumeClaim.subPath` | SubPath for Milvus logs mount | `unset` | +| `nodeSelector` | Node labels for pod assignment | `{}` | +| `tolerations` | Toleration labels for pod assignment | `[]` | +| `affinity` | Affinity settings for pod assignment | `{}` | +| `podAnnotations` | Additional pod annotations | `{}` | +| `podDisruptionBudget.minAvailable` | Pod disruption minimum available | `unset` | +| `podDisruptionBudget.maxUnavailable` | Pod disruption maximum unavailable | `unset` | +| `mishards.image.repository` | Mishards image repository | `milvusdb/mishards` | +| `mishards.image.tag` | Mishards image tag | `0.10.0` | +| `mishards.image.pullPolicy` | Mishards image pull policy | `IfNotPresent` | +| `mishards.replicas` | Number of mishards nodes | `1` | +| `mishards.resources` | Mishards CPU/GPU/Memory resource requests/limits | `{}` | +| `readonly.replicas` | Number of readonly nodes | `1` | +| `mishards.resources` | Mishards CPU/GPU/Memory resource requests/limits | `{}` | +| `admin.enabled` | Enable deployment of Milvus admin | `false` | +| `admin.image.repository` | Milvus Admin image repository | `milvusdb/milvus-em` | +| `admin.image.tag` | Milvus Admin image tag | `v0.4.0` | +| `admin.image.pullPolicy` | Milvus Admin image pull policy | `IfNotPresent` | +| `admin.replicas` | Number of Milvus Admin nodes | `1` | +| `admin.resources` | Milvus Admin CPU/GPU/Memory resource requests/limits | `{}` | +| `externalMysql.enabled` | Use exist mysql database | `false` | +| `externalMysql.ip` | IP address | `{}` | +| `externalMysql.port` | Port | `{}` | +| `externalMysql.user` | Username | `{}` | +| `externalMysql.password` | Password for the user | `{}` | +| `externalMysql.database` | Database name | `{}` | + + +### MySQL Configuration + +The following table lists the configurable parameters of the mysql chart and their default values. + +| Parameter | Description | Default | +|-------------------------------------------|-----------------------------------------------|---------------------------------------------------------| +| `mysql.enabled` | Enable deployment of MySQL | `true` | +| `mysql.mysqlDatabase` | Database name | `milvus` | +| `mysql.imageTag` | Image targe | `5.7.14` | +| `mysql.imagePullPolicy` | Image pull policy | `IfNotPresent` | +| `mysql.mysqlUser` | Username of new user to create. | `milvus` | +| `mysql.mysqlPassword` | Password for the new user. Ignored if existing secret is provided | `milvus` | +| `mysql.mysqlRootPassword` | Password for the root user. Ignored if existing secret is provided | `milvusroot` | +| `mysql.configurationFiles` | List of mysql configuration files | `...` | +| `mysql.initializationFiles` | List of SQL files which are run after the container started | `...` | +| `mysql.persistence.enabled` | Create a volume to store data | `true` | +| `mysql.persistence.existingClaim` | Name of existing persistent volume | `unset` | +| `mysql.persistence.annotations` | Persistent Volume annotations | `{}` | +| `mysql.persistence.storageClass` | Type of persistent volume claim | `unset` | +| `mysql.persistence.accessMode` | ReadWriteOnce or ReadOnly | `ReadWriteOnce` | +| `mysql.persistence.size` | Size of persistent volume claim | `4Gi` | diff --git a/charts/mysql-1.6.4.tgz b/charts/milvus/charts/mysql-1.6.4.tgz similarity index 100% rename from charts/mysql-1.6.4.tgz rename to charts/milvus/charts/mysql-1.6.4.tgz diff --git a/ci/db_backend/mysql_cpu_values.yaml b/charts/milvus/ci/db_backend/mysql_cpu_values.yaml similarity index 100% rename from ci/db_backend/mysql_cpu_values.yaml rename to charts/milvus/ci/db_backend/mysql_cpu_values.yaml diff --git a/ci/db_backend/mysql_gpu_values.yaml b/charts/milvus/ci/db_backend/mysql_gpu_values.yaml similarity index 64% rename from ci/db_backend/mysql_gpu_values.yaml rename to charts/milvus/ci/db_backend/mysql_gpu_values.yaml index 308a7ab..8219550 100644 --- a/ci/db_backend/mysql_gpu_values.yaml +++ b/charts/milvus/ci/db_backend/mysql_gpu_values.yaml @@ -2,14 +2,15 @@ cache: insertBufferSize: 1GB cacheSize: 8GB -resources: - limits: - memory: "12Gi" - cpu: "4.0" - aliyun.com/gpu-mem: 2 # GiB - requests: - memory: "8Gi" - cpu: "2.0" +image: + resources: + limits: + memory: "12Gi" + cpu: "4.0" + aliyun.com/gpu-mem: 2 # GiB + requests: + memory: "8Gi" + cpu: "2.0" gpu: enabled: true diff --git a/ci/db_backend/sqlite_cpu_values.yaml b/charts/milvus/ci/db_backend/sqlite_cpu_values.yaml similarity index 100% rename from ci/db_backend/sqlite_cpu_values.yaml rename to charts/milvus/ci/db_backend/sqlite_cpu_values.yaml diff --git a/ci/db_backend/sqlite_gpu_values.yaml b/charts/milvus/ci/db_backend/sqlite_gpu_values.yaml similarity index 52% rename from ci/db_backend/sqlite_gpu_values.yaml rename to charts/milvus/ci/db_backend/sqlite_gpu_values.yaml index c7ff8bd..915baca 100644 --- a/ci/db_backend/sqlite_gpu_values.yaml +++ b/charts/milvus/ci/db_backend/sqlite_gpu_values.yaml @@ -2,14 +2,15 @@ cache: insertBufferSize: 1GB cacheSize: 8GB -resources: - limits: - memory: "12Gi" - cpu: "4.0" - aliyun.com/gpu-mem: 2 # GiB - requests: - memory: "8Gi" - cpu: "2.0" +image: + resources: + limits: + memory: "12Gi" + cpu: "4.0" + aliyun.com/gpu-mem: 2 # GiB + requests: + memory: "8Gi" + cpu: "2.0" gpu: enabled: true diff --git a/ci/filebeat/values.yaml b/charts/milvus/ci/filebeat/values.yaml similarity index 100% rename from ci/filebeat/values.yaml rename to charts/milvus/ci/filebeat/values.yaml diff --git a/requirements.lock b/charts/milvus/requirements.lock similarity index 100% rename from requirements.lock rename to charts/milvus/requirements.lock diff --git a/requirements.yaml b/charts/milvus/requirements.yaml similarity index 100% rename from requirements.yaml rename to charts/milvus/requirements.yaml diff --git a/templates/NOTES.txt b/charts/milvus/templates/NOTES.txt similarity index 100% rename from templates/NOTES.txt rename to charts/milvus/templates/NOTES.txt diff --git a/templates/_helpers.tpl b/charts/milvus/templates/_helpers.tpl similarity index 100% rename from templates/_helpers.tpl rename to charts/milvus/templates/_helpers.tpl diff --git a/templates/_mishards_config.tpl b/charts/milvus/templates/_mishards_config.tpl similarity index 100% rename from templates/_mishards_config.tpl rename to charts/milvus/templates/_mishards_config.tpl diff --git a/templates/_readonly_server_config.tpl b/charts/milvus/templates/_readonly_server_config.tpl similarity index 100% rename from templates/_readonly_server_config.tpl rename to charts/milvus/templates/_readonly_server_config.tpl diff --git a/templates/_server_config.tpl b/charts/milvus/templates/_server_config.tpl similarity index 100% rename from templates/_server_config.tpl rename to charts/milvus/templates/_server_config.tpl diff --git a/templates/admin-deployment.yaml b/charts/milvus/templates/admin-deployment.yaml similarity index 100% rename from templates/admin-deployment.yaml rename to charts/milvus/templates/admin-deployment.yaml diff --git a/templates/admin-svc.yaml b/charts/milvus/templates/admin-svc.yaml similarity index 100% rename from templates/admin-svc.yaml rename to charts/milvus/templates/admin-svc.yaml diff --git a/templates/config.yaml b/charts/milvus/templates/config.yaml similarity index 100% rename from templates/config.yaml rename to charts/milvus/templates/config.yaml diff --git a/templates/mishards-deployment.yaml b/charts/milvus/templates/mishards-deployment.yaml similarity index 100% rename from templates/mishards-deployment.yaml rename to charts/milvus/templates/mishards-deployment.yaml diff --git a/templates/mishards-svc.yaml b/charts/milvus/templates/mishards-svc.yaml similarity index 100% rename from templates/mishards-svc.yaml rename to charts/milvus/templates/mishards-svc.yaml diff --git a/templates/pvc.yaml b/charts/milvus/templates/pvc.yaml similarity index 100% rename from templates/pvc.yaml rename to charts/milvus/templates/pvc.yaml diff --git a/templates/readonly-deployment.yaml b/charts/milvus/templates/readonly-deployment.yaml similarity index 98% rename from templates/readonly-deployment.yaml rename to charts/milvus/templates/readonly-deployment.yaml index f17aa40..43f7db2 100755 --- a/templates/readonly-deployment.yaml +++ b/charts/milvus/templates/readonly-deployment.yaml @@ -89,7 +89,7 @@ spec: port: 19530 {{ toYaml .Values.readinessProbe | indent 10 }} resources: - {{- toYaml .Values.resources | nindent 10 }} + {{- toYaml .Values.image.resources | nindent 10 }} volumeMounts: - name: milvus-data-disk mountPath: {{ .Values.persistence.mountPath | quote }} diff --git a/templates/readonly-svc.yaml b/charts/milvus/templates/readonly-svc.yaml similarity index 100% rename from templates/readonly-svc.yaml rename to charts/milvus/templates/readonly-svc.yaml diff --git a/templates/writable-deployment.yaml b/charts/milvus/templates/writable-deployment.yaml similarity index 98% rename from templates/writable-deployment.yaml rename to charts/milvus/templates/writable-deployment.yaml index 0b17431..e5978a9 100755 --- a/templates/writable-deployment.yaml +++ b/charts/milvus/templates/writable-deployment.yaml @@ -90,7 +90,7 @@ spec: port: 19530 {{ toYaml .Values.readinessProbe | indent 10 }} resources: - {{- toYaml .Values.resources | nindent 10 }} + {{- toYaml .Values.image.resources | nindent 10 }} volumeMounts: - name: milvus-data-disk mountPath: {{ .Values.persistence.mountPath | quote }} diff --git a/templates/writable-svc.yaml b/charts/milvus/templates/writable-svc.yaml similarity index 100% rename from templates/writable-svc.yaml rename to charts/milvus/templates/writable-svc.yaml diff --git a/values.yaml b/charts/milvus/values.yaml similarity index 98% rename from values.yaml rename to charts/milvus/values.yaml index 0e18c6b..713a3af 100755 --- a/values.yaml +++ b/charts/milvus/values.yaml @@ -27,7 +27,7 @@ storage: wal: enabled: true - recoveryErrorIgnore: false + recoveryErrorIgnore: false bufferSize: 256MB path: /var/lib/milvus/db/wal @@ -186,14 +186,15 @@ image: ## # pullSecrets: # - myRegistryKeySecretName + resources: + limits: + memory: "6Gi" + cpu: "2.0" + requests: + memory: "4Gi" + cpu: "1.0" + replicas: 1 -resources: - limits: - memory: "12Gi" - cpu: "4.0" - requests: - memory: "8Gi" - cpu: "2.0" livenessProbe: initialDelaySeconds: 30 periodSeconds: 15 @@ -365,4 +366,4 @@ mysql: # "helm.sh/resource-policy": keep storageClass: accessMode: ReadWriteOnce - size: 8Gi + size: 4Gi diff --git a/ct.yaml b/ct.yaml new file mode 100644 index 0000000..69b7c27 --- /dev/null +++ b/ct.yaml @@ -0,0 +1,9 @@ +# See https://github.com/helm/chart-testing#configuration +remote: origin +chart-dirs: + - charts/ +validate-maintainers: false +chart-repos: + - incubator=https://kubernetes-charts-incubator.storage.googleapis.com/ + - stable=https://kubernetes-charts.storage.googleapis.com/ +helm-extra-args: --timeout 300s