Skip to content

Commit

Permalink
Merge #168
Browse files Browse the repository at this point in the history
168: Use helm-docs for documentation r=alallema a=nlamirault

# Pull Request

## Related issue
Fixes #<issue_number>

## What does this PR do?
- Documentation using [helm-docs](https://github.com/norwoodj/helm-docs)

## PR checklist
Please check if your PR fulfills the following requirements:
- [ ] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Nicolas Lamirault <[email protected]>
Co-authored-by: Amélie <[email protected]>
  • Loading branch information
3 people authored Jun 7, 2023
2 parents 2a7746d + fc063a5 commit dbbe8d1
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 92 deletions.
15 changes: 14 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ helm uninstall meilisearch-chart-test

### Tests and Linter <!-- omit in toc -->


Each PR should pass the linter to be accepted.

```bash
Expand All @@ -83,6 +82,20 @@ Or just by comment the PR:

Additionally, the GitHub CI will run a test to check if there are changes introduced to the charts. If changes were introduced, it will require you to update the Chart version.

### Generate Documentation <!-- omit in toc -->

Documentation for this repository is currently autogenerated using by [helm-docs](https://github.com/norwoodj/helm-docs).

At each PR, you must check that the documentation has been correctly updated.

- Install [helm-docs](https://github.com/norwoodj/helm-docs#installation) on your machine.

- Run and generate documentation:
```bash
helm-docs
```
- Then commit your changes in your PR.

## Git Guidelines

### Git Branches <!-- omit in toc -->
Expand Down
2 changes: 1 addition & 1 deletion charts/meilisearch/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "v1.2.0"
description: A Helm chart for the Meilisearch search engine
name: meilisearch
version: 0.1.54
version: 0.1.55
icon: https://res.cloudinary.com/meilisearch/image/upload/v1597822872/Logo/logo_img.svg
home: https://github.com/meilisearch/meilisearch-kubernetes/tree/main/charts/meilisearch
maintainers:
Expand Down
153 changes: 66 additions & 87 deletions charts/meilisearch/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Meilisearch
# meilisearch

A Helm chart for the Meilisearch search engine

![Version: 0.1.55](https://img.shields.io/badge/Version-0.1.55-informational?style=flat-square) ![AppVersion: v1.2.0](https://img.shields.io/badge/AppVersion-v1.2.0-informational?style=flat-square)

Helm works as a package manager to run pre-configured Kubernetes resources.

Expand Down Expand Up @@ -38,92 +42,67 @@ To uninstall/delete the `Meilisearch` deployment:
helm uninstall <your-service-name>
```

## Parameters

| Parameter | Description | Default |
|----------------------------------|----------------------------------------------------------------|-----------------------------------|
| `nameOverride` | String to partially override meilisearch.fullname | `nil`
| | |
| `fullnameOverride` | String to fully override meilisearch.fullname | `nil`
| | |
| `replicaCount` | Number of Meilisearch pods to run | `1`
| | |
| `environment.MEILI_ENV` | Sets the environment. Either **production** or **development** | `development`
| | |
| `environment.MEILI_NO_ANALYTICS` | Deactivates analytics | `true`
| | |
| `auth.existingMasterKeySecret` | Uses an existing secret that has the MEILI_MASTER_KEY set | `nil`
| | |
| `envFrom` | Additional environment variables from ConfigMap or secrets | `[]`
| | |
| `image.repository` | Meilisearch image name | `getmeili/meilisearch`
| | |
| `image.tag` | Meilisearch image tag | `{TAG_NAME}`
| | |
| `image.pullPolicy` | Meilisearch image pull policy | `IfNotPresent`
| | |
| `image.pullSecret` | Secret to authenticate against the docker registry | '' |
| | |
| `serviceAccount.create` | Should this chart create a service account | `true`
| | |
| `serviceAccount.annotations` | Additional annotations for created service account | `{}`
| | |
| `serviceAccount.name` | Custom service account name, if not created by this chart | ''
| | |
| `ingress.enabled` | Enable ingress controller resource | `false`
| | |
| `ingress.annotations` | Ingress annotations | `{}`
| | |
| `ingress.className` | Ingress ingressClassName | `nginx`
| | |
| `ingress.path` | Path within the host | `/`
| | |
| `ingress.hosts` | List of hostnames | `[meilisearch-example.local]`
| | |
| `ingress.tls` | TLS specification | `[]`
| | |
| `service.port` | Service HTTP port | `7700`
| | |
| `service.type` | Kubernetes Service type | `ClusterIP`
| | |
| `service.externalTrafficPolicy` | Service external traffic policy | `-` (No external traffic policy)
| | |
| `service.loadBalancerIP` | Service load balancer IP | `-` (No load balancer IP)
| | |
| `service.annotations` | Additional annotations for service | `{}`
| | |
| `persistence.enabled` | Enable persistence using PVC | `false`
| | |
| `persistence.existingClaim` | Existing PVC | `false`
| | |
| `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce`
| | |
| `persistence.storageClass` | PVC Storage Class | `-` (No storage class)
| | |
| `persistence.size` | PVC Storage Request | `10Gi`
| | |
| `persistence.annotations` | Additional annotations for PVC | `{}`
| | |
| `resources` | Resources allocation (Requests and Limits) | `{}`
| | |
| `command` | Pod command | `[]`
| | |
| `volumes` | Additional volumes for pod | `[]`
| | |
| `volumeMounts` | Additional volumes to mount on pod | `[]`
| | |
| `containers` | Additional containers for pod | `[]`
| | |
| `tolerations` | Tolerations for pod assignment | `[]`
| | |
| `nodeSelector` | Node labels for pod assignment | `{}`
| | |
| `affinity` | Affinity for pod assignment | `{}`
| | |


### Environment
## Environment

The `environment` block allows to specify all the environment variables declared on [Meilisearch Configuration](https://docs.meilisearch.com/guides/advanced_guides/configuration.html#passing-arguments-via-the-command-line)

For production deployment, the `environment.MEILI_MASTER_KEY` is required. If `MEILI_ENV` is set to "production" without setting `environment.MEILI_MASTER_KEY`, then this chart will automatically create a secure `environment.MEILI_MASTER_KEY` as a secret. To get the value of this secret, you can read it with this command: `kubectl get secret meilisearch-master-key --template={{.data.MEILI_MASTER_KEY}} | base64 --decode`. You can also use `auth.existingMasterKeySecret` to use an existing secret that has the key `MEILI_MASTER_KEY`
For production deployment, the `environment.MEILI_MASTER_KEY` is required. If `MEILI_ENV` is set to "production" without setting `environment.MEILI_MASTER_KEY`, then this chart will automatically create a secure `environment.MEILI_MASTER_KEY` as a secret.

You can also use `auth.existingMasterKeySecret` to use an existing secret that has the key `MEILI_MASTER_KEY`

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity for pod assignment |
| auth.existingMasterKeySecret | string | `""` | Use an existing Kubernetes secret for the MEILI_MASTER_KEY |
| command | list | `[]` | Pod command |
| container.containerPort | int | `7700` | |
| containers | list | `[]` | Additional containers for pod |
| customLabels | object | `{}` | Additional labels to add to all resources |
| envFrom | list | `[]` | Additional environment variables from ConfigMap or secrets |
| environment.MEILI_ENV | string | `"development"` | Sets the environment. Either **production** or **development** |
| environment.MEILI_NO_ANALYTICS | bool | `true` | Deactivates analytics |
| fullnameOverride | string | `""` | String to fully override meilisearch.fullname |
| image.pullPolicy | string | `"IfNotPresent"` | Meilisearch image pull policy |
| image.pullSecret | string | `nil` | Secret to authenticate against the docker registry |
| image.repository | string | `"getmeili/meilisearch"` | Meilisearch image name |
| image.tag | string | `"v1.2.0"` | Meilisearch image tag |
| ingress.annotations | object | `{}` | Ingress annotations |
| ingress.className | string | `"nginx"` | Ingress ingressClassName |
| ingress.enabled | bool | `false` | Enable ingress controller resource |
| ingress.hosts | list | `["meilisearch-example.local"]` | List of hostnames |
| ingress.path | string | `"/"` | Path within the host |
| ingress.tls | list | `[]` | TLS specification |
| livenessProbe.InitialDelaySeconds | int | `0` | |
| livenessProbe.periodSeconds | int | `10` | |
| nameOverride | string | `""` | String to partially override meilisearch.fullname |
| nodeSelector | object | `{}` | Node labels for pod assignment |
| persistence.accessMode | string | `"ReadWriteOnce"` | PVC Access Mode |
| persistence.annotations | object | `{}` | Additional annotations for PVC |
| persistence.enabled | bool | `false` | Enable persistence using PVC |
| persistence.existingClaim | string | `""` | Existing PVC |
| persistence.size | string | `"10Gi"` | PVC Storage Request |
| persistence.storageClass | string | `"-"` | PVC Storage Class |
| persistence.volume.mountPath | string | `"/meili_data"` | |
| persistence.volume.name | string | `"data"` | |
| podAnnotations | object | `{}` | |
| readinessProbe.InitialDelaySeconds | int | `0` | |
| readinessProbe.periodSeconds | int | `10` | |
| replicaCount | int | `1` | Number of Meilisearch pods to run |
| resources | object | `{}` | Resources allocation (Requests and Limits) |
| service | object | `{"annotations":{},"port":7700,"type":"ClusterIP"}` | Service HTTP port |
| service.annotations | object | `{}` | Additional annotations for service |
| service.type | string | `"ClusterIP"` | Kubernetes Service type |
| serviceAccount.annotations | object | `{}` | Additional annotations for created service account |
| serviceAccount.create | bool | `true` | Should this chart create a service account |
| serviceAccount.name | string | `""` | Custom service account name, if not created by this chart |
| startupProbe.InitialDelaySeconds | int | `1` | |
| startupProbe.failureThreshold | int | `60` | |
| startupProbe.periodSeconds | int | `1` | |
| tolerations | list | `[]` | Tolerations for pod assignment |
| volumeMounts | list | `[]` | Additional volumes to mount on pod |
| volumes | list | `[]` | Additional volumes for pod |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
56 changes: 56 additions & 0 deletions charts/meilisearch/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{{ template "chart.header" . }}
{{ template "chart.description" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

Helm works as a package manager to run pre-configured Kubernetes resources.

Meilisearch provides a customizable Helm chart, ready to deploy a [Meilisearch](https://github.com/meilisearch/meilisearch) instance on your Kubernetes cluster.

# Getting started

First of all, you will need a Kubernetes cluster up and running. If you are not familiar with how Kuberentes works or need some help with this step, please check the [Kubernetes documentation](https://kubernetes.io/docs/home/).

## Install kubectl

`kubectl` is the most commonly used CLI to handle a Kubernetes cluster. The installation instructions are [available here](https://kubernetes.io/docs/tasks/tools/install-kubectl/).

## Install helm

Helm CLI is a Command Line Interface which will automate chart management and installation on your Kubernetes cluster. To install Helm, follow the [Helm installation instructions](https://helm.sh/docs/intro/install/)

### Install Meilisearch chart

Clone this repository and install the chart

```bash
git clone https://github.com/meilisearch/meilisearch-kubernetes.git
cd meilisearch-kubernetes
# Replace <your-instance-name> with the name you would like to give to your service
helm install <your-service-name> charts/meilisearch
```

This command deploys Meilisearch on your Kubernetes cluster using the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.

## Uninstalling the Chart

To uninstall/delete the `Meilisearch` deployment:

```bash
# Replace <your-instance-name> with the name of your deployed service
helm uninstall <your-service-name>
```

## Environment

The `environment` block allows to specify all the environment variables declared on [Meilisearch Configuration](https://docs.meilisearch.com/guides/advanced_guides/configuration.html#passing-arguments-via-the-command-line)

For production deployment, the `environment.MEILI_MASTER_KEY` is required. If `MEILI_ENV` is set to "production" without setting `environment.MEILI_MASTER_KEY`, then this chart will automatically create a secure `environment.MEILI_MASTER_KEY` as a secret.

You can also use `auth.existingMasterKeySecret` to use an existing secret that has the key `MEILI_MASTER_KEY`

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
Loading

0 comments on commit dbbe8d1

Please sign in to comment.