diff --git a/charts/elasticsearch/templates/cluster.yaml b/charts/elasticsearch/templates/cluster.yaml index b443e7718..9063f2c66 100644 --- a/charts/elasticsearch/templates/cluster.yaml +++ b/charts/elasticsearch/templates/cluster.yaml @@ -34,6 +34,7 @@ spec: {{- end }} snapshot: scheduler-enabled: {{ .Values.snapshot.enabled }} + type: {{ .Values.snapshot.type }} bucket-name: {{ .Values.snapshot.bucketName }} cron-schedule: "{{ .Values.snapshot.schedule }}" image: "{{ .Values.snapshot.image }}" diff --git a/charts/elasticsearch/values.yaml b/charts/elasticsearch/values.yaml index 215ece4c4..9096a56bc 100644 --- a/charts/elasticsearch/values.yaml +++ b/charts/elasticsearch/values.yaml @@ -23,6 +23,7 @@ use-ssl: True snapshot: enabled: false + type: s3 bucketName: elasticsnapshots schedule: "@every 2m" image: upmcenterprises/elasticsearch-cron:0.0.4 diff --git a/example/example-es-cluster-azure.yaml b/example/example-es-cluster-azure.yaml index 207e7c16a..3222c0a94 100644 --- a/example/example-es-cluster-azure.yaml +++ b/example/example-es-cluster-azure.yaml @@ -13,6 +13,7 @@ spec: java-options: "-Xms1024m -Xmx1024m" snapshot: scheduler-enabled: false + type: azure bucket-name: elasticsnapshots99 cron-schedule: "@every 2m" image: upmcenterprises/elasticsearch-cron:0.0.4 diff --git a/pkg/apis/elasticsearchoperator/v1/cluster.go b/pkg/apis/elasticsearchoperator/v1/cluster.go index b33303226..c0036680f 100644 --- a/pkg/apis/elasticsearchoperator/v1/cluster.go +++ b/pkg/apis/elasticsearchoperator/v1/cluster.go @@ -139,10 +139,10 @@ type Snapshot struct { // Enabled determines if snapshots are enabled SchedulerEnabled bool `json:"scheduler-enabled"` - // RepoType defines the type of Elasticsearch Repository, s3 or gcs + // RepoType defines the type of Elasticsearch Repository, s3, gcs, azure RepoType string `json:"type"` - // BucketName defines the AWS S3 or GCS bucket to store snapshots + // BucketName defines the AWS s3, gcs, azure bucket/container to store snapshots BucketName string `json:"bucket-name"` // CronSchedule defines how to run the snapshots