-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to backup-restore-sidecar based meilisearch database.
- Loading branch information
Showing
13 changed files
with
422 additions
and
94 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
51 changes: 28 additions & 23 deletions
51
control-plane/roles/auditing-meili/defaults/main/main.yaml
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,34 @@ | ||
# meili-backup-restore | ||
|
||
Deploys a meilisearch database together with a [backup-restore-sidecar](https://github.com/metal-stack/backup-restore-sidecar). | ||
|
||
## Variables | ||
|
||
This role uses variables from [control-plane-defaults](/control-plane). So, make sure you define them adequately as well. | ||
|
||
You can look up all the default values of this role [here](defaults/main/main.yaml). | ||
|
||
| Name | Mandatory | Description | | ||
| ---------------------------------------------------------- | --------- | ----------------------------------------------------------------------- | | ||
| meilisearch_image_name | yes | Image version of the meilisearch | | ||
| meilisearch_image_tag | yes | Image tag of the meilisearch | | ||
| meilisearch_registry_auth_enabled | | Enables registry authentication | | ||
| meilisearch_registry_auth | | The dockerconfigjson content used for registry authentication | | ||
| meilisearch_image_pull_policy | | Image pull policy (defaults to IfNotPresent) | | ||
| meilisearch_name | | The name of the meilisearch instance | | ||
| meilisearch_namespace | | The deployment's target namespace | | ||
| meilisearch_storage_size | | The size of the PVC | | ||
| meilisearch_storage_class | | The storage class of the PVC | | ||
| meilisearch_api_key | | The api key for meilisearch | | ||
| meilisearch_env | | Sets the environment configuration for meilisearch | | ||
| meilisearch_no_analytics | | Sets the no analytics configuration for meilisearch | | ||
| meilisearch_backup_restore_sidecar_image_name | yes | Image version of the backup-restore-sidecar | | ||
| meilisearch_backup_restore_sidecar_image_tag | yes | Image tag of the backup-restore-sidecar | | ||
| meilisearch_backup_restore_sidecar_provider | | The backup provider | | ||
| meilisearch_backup_restore_sidecar_backup_cron_schedule | | The backup cron schedule | | ||
| meilisearch_backup_restore_sidecar_log_level | | The log level of the sidecar | | ||
| meilisearch_backup_restore_sidecar_gcp_bucket_name | | Bucket name of the GCP bucket | | ||
| meilisearch_backup_restore_sidecar_gcp_backup_location | | Location of the GCP bucket | | ||
| meilisearch_backup_restore_sidecar_gcp_project_id | | GCP project name | | ||
| meilisearch_backup_restore_sidecar_gcp_serviceaccount_json | | GCP Serviceaccount JSON string (service account requires bucket access) | | ||
| meilisearch_resources | | The kubernetes resources for the actual meilisearch container | |
1 change: 1 addition & 0 deletions
1
control-plane/roles/meili-backup-restore/defaults/main/control-plane-defaults
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 @@ | ||
../../../../control-plane-defaults/ |
1 change: 1 addition & 0 deletions
1
control-plane/roles/meili-backup-restore/defaults/main/global-defaults
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 @@ | ||
../../../../../defaults |
40 changes: 40 additions & 0 deletions
40
control-plane/roles/meili-backup-restore/defaults/main/main.yaml
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,40 @@ | ||
--- | ||
meilisearch_name: meilisearch | ||
meilisearch_namespace: "{{ metal_control_plane_namespace }}" | ||
|
||
meilisearch_image_pull_policy: "{{ metal_control_plane_image_pull_policy }}" | ||
|
||
meilisearch_storage_size: 5Gi | ||
meilisearch_storage_class: | ||
|
||
meilisearch_api_key: change-me-at-least-16-chars | ||
meilisearch_env: production | ||
meilisearch_no_analytics: true | ||
|
||
meilisearch_backup_restore_sidecar_image_pull_policy: "{{ metal_control_plane_image_pull_policy }}" | ||
meilisearch_backup_restore_sidecar_provider: local | ||
meilisearch_backup_restore_sidecar_backup_cron_schedule: "0 * * * *" | ||
meilisearch_backup_restore_sidecar_log_level: debug | ||
meilisearch_backup_restore_sidecar_object_prefix: "{{ meilisearch_name }}-{{ metal_control_plane_stage_name }}" | ||
meilisearch_backup_restore_sidecar_object_max_keep: | ||
|
||
meilisearch_backup_restore_sidecar_gcp_bucket_name: | ||
meilisearch_backup_restore_sidecar_gcp_backup_location: | ||
meilisearch_backup_restore_sidecar_gcp_project_id: | ||
meilisearch_backup_restore_sidecar_gcp_serviceaccount_json: | ||
|
||
meilisearch_resources: | ||
requests: | ||
memory: "256Mi" | ||
cpu: "500m" | ||
limits: | ||
memory: "1Gi" | ||
cpu: "1" | ||
|
||
meilisearch_registry_auth_enabled: "{{ metal_registry_auth_enabled }}" | ||
meilisearch_registry_auth: | ||
auths: | ||
https://index.docker.io/v1/: | ||
username: "{{ metal_registry_auth_user }}" | ||
password: "{{ metal_registry_auth_password }}" | ||
auth: "{{ (metal_registry_auth_user + ':' + metal_registry_auth_password) | b64encode }}" |
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,19 @@ | ||
--- | ||
- name: Gather release versions | ||
setup_yaml: | ||
|
||
- name: Check mandatory variables for this role are set | ||
assert: | ||
fail_msg: "not all mandatory variables given, check role documentation" | ||
quiet: yes | ||
that: | ||
- meilisearch_image_name is defined | ||
- meilisearch_image_tag is defined | ||
- meilisearch_backup_restore_sidecar_image_name is defined | ||
- meilisearch_backup_restore_sidecar_image_tag is defined | ||
|
||
- name: Deploy meilisearch (backup-restore) | ||
k8s: | ||
definition: "{{ lookup('template', 'meilisearch.yaml') }}" | ||
namespace: "{{ meilisearch_namespace }}" | ||
apply: yes |
Oops, something went wrong.