Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace OpenSearch SLM and Backup with SM Policy #2344

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/flavors/air-gapped/sc-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ opensearch:
snapshot:
min: 300 # 12 / day * 30 days = 360, subtract some to account for failures
max: 500
ageSeconds: 2592000 # 30 days
retentionAge: 30d # 30 days
backupSchedule: 30 */2 * * * # 30 min past every 2nd hour to avoid collision with retention

harbor:
Expand Down
1 change: 0 additions & 1 deletion config/flavors/dev/sc-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ opensearch:
snapshot:
enabled: false
backupSchedule: 0 */12 * * * # run twice/day
retentionSchedule: 0 1 * * * # 1am

prometheus:
alertmanagerSpec:
Expand Down
2 changes: 1 addition & 1 deletion config/flavors/prod/sc-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ opensearch:
snapshot:
min: 300 # 12 / day * 30 days = 360, subtract some to account for failures
max: 500
ageSeconds: 2592000 # 30 days
retentionAge: 30d # 30 days
backupSchedule: 30 */2 * * * # 30 min past every 2nd hour to avoid collision with retention

harbor:
Expand Down
17 changes: 2 additions & 15 deletions config/sc-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -973,22 +973,9 @@ opensearch:
repository: opensearch-snapshots # Uses the bucket set in `objectStorage.buckets.opensearch`
min: 7
max: 14
ageSeconds: 864000
maxRequestSeconds: 1200
retentionAge: 10d
backupSchedule: 0 */2 * * *
backupStartingDeadlineSeconds: 600
backupActiveDeadlineSeconds: 600
retentionSchedule: '@daily'
retentionStartingDeadlineSeconds: 600
retentionActiveDeadlineSeconds: 2700
retentionResources:
requests:
cpu: 50m
memory: 32Mi
limits:
cpu: 100m
memory: 128Mi

retentionSchedule: 0 0 * * *
exporter:
serviceMonitor:
interval: 30s
Expand Down
36 changes: 8 additions & 28 deletions config/schemas/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5606,7 +5606,7 @@ properties:
snapshot:
title: OpenSearch Snapshot
description: |-
Configures the CronJob and repository to take snapshots in OpenSearch.
Configure OpenSearch snapshot creation and retention.

This requires that `objectStorage` is configured, and will use the bucket or container set in `objectStorage.buckets.opensearch`.
type: object
Expand All @@ -5620,9 +5620,6 @@ properties:
title: OpenSearch Snapshot Repository
type: string
default: opensearch-snapshots
ageSeconds:
default: 864000
type: number
min:
title: OpenSearch Minimum Retained Snapshots
type: number
Expand All @@ -5631,41 +5628,24 @@ properties:
title: OpenSearch Maximum Retained Snapshots
default: 14
type: number
maxRequestSeconds:
type: number
default: 1200
backupSchedule:
title: OpenSearch Backup CronJob Schedule
title: OpenSearch Snapshot Backup Schedule
description: |-
Schedule to trigger Opensearch backups.
Uses the Cron format, see https://en.wikipedia.org/wiki/Cron.
default: 0 */2 * * *
$ref: '#/$defs/cronSchedule'
backupStartingDeadlineSeconds:
title: OpenSearch Backup Job Starting Deadline
type: number
default: 600
backupActiveDeadlineSeconds:
title: OpenSearch Backup Job Active Deadline
type: number
default: 600
retentionSchedule:
title: OpenSearch Retention CronJob Schedule
title: OpenSearch Snapshot Retention Schedule
description: |-
Schedule to check for and remove old snapshots.
Uses the Cron format, see https://en.wikipedia.org/wiki/Cron.
default: '@daily'
default: '0 0 * * *'
$ref: '#/$defs/cronSchedule'
retentionStartingDeadlineSeconds:
title: OpenSearch Retention Job Starting Deadline
type: number
default: 600
retentionActiveDeadlineSeconds:
title: OpenSearch Retention Job Active Deadline
type: number
default: 2700
retentionResources:
$ref: '#/$defs/kubernetesResourceRequirements'
retentionAge:
title: OpenSearch Maximum Snapshot Age
type: string
default: '10d'
securityadmin:
title: OpenSearch Security Admin
description: Configures the Job that initialises OpenSearch Security.
Expand Down
9 changes: 0 additions & 9 deletions docs/sbom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,6 @@
name: node-local-dns
app_version: ''
chart_version: 0.1.1
- domain: Custom Helm Charts
name: opensearch-backup
app_version: 0.1.0
chart_version: 0.1.0
- domain: Custom Helm Charts
name: opensearch-configurer
app_version: 0.1.0
Expand All @@ -486,10 +482,6 @@
name: opensearch-securityadmin
app_version: 0.1.0
chart_version: 0.1.0
- domain: Custom Helm Charts
name: opensearch-slm
app_version: 0.1.0
chart_version: 0.1.0
- domain: Custom Helm Charts
name: openstack-monitoring
app_version: 1.16.0
Expand Down Expand Up @@ -780,7 +772,6 @@
- opensearch
- init-harbor
- opensearch-configurer
- opensearch-backup
- domain: Container images
name: "docker.io/opensearchproject/opensearch-dashboards"
tag: "2.12.0"
Expand Down
4 changes: 2 additions & 2 deletions helmfile.d/charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ As part of our effort to make our Helm charts available for public and internal

```terminal
cd helmfile.d/charts
helm pull --verify oci://ghcr.io/elastisys/opensearch-slm --version 0.1.0 --keyring public.gpg
helm pull --verify oci://ghcr.io/elastisys/opensearch-configurer --version 0.1.0 --keyring public.gpg
```

1. Pull and install charts e.g:

```terminal
helm install opensearch-slm oci://ghcr.io/elastisys/opensearch-slm --version 0.1.0 --namespace <NAMESPACE>
helm install opensearch-configurer oci://ghcr.io/elastisys/opensearch-configurer --version 0.1.0 --namespace <NAMESPACE>
```
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
"pluginVersion": "8.2.7",
"targets": [
{
"expr": "min((time()-kube_job_status_completion_time{job_name=~\"opensearch-backup-.*\", cluster=~\"$cluster\"})/3600)",
"expr": "min((time()-elasticsearch_snapshot_stats_latest_snapshot_timestamp_seconds{cluster=~\"$cluster\"})/3600)",
"instant": false,
"interval": "",
"legendFormat": "{{job_name}}",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ spec:
- podSelector:
matchLabels:
app.kubernetes.io/instance: opensearch-curator
- podSelector:
matchLabels:
app.kubernetes.io/instance: opensearch-backup
- podSelector:
matchLabels:
app.kubernetes.io/instance: opensearch-slm
- podSelector:
matchLabels:
app: opensearch-dashboards
Expand Down

This file was deleted.

23 changes: 0 additions & 23 deletions helmfile.d/charts/opensearch/backup/.helmignore

This file was deleted.

6 changes: 0 additions & 6 deletions helmfile.d/charts/opensearch/backup/Chart.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions helmfile.d/charts/opensearch/backup/scripts/backup.sh

This file was deleted.

52 changes: 0 additions & 52 deletions helmfile.d/charts/opensearch/backup/templates/_helpers.tpl

This file was deleted.

This file was deleted.

Loading
Loading