Skip to content
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
16 changes: 12 additions & 4 deletions helm/name-lookup/templates/scripts-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,22 @@ data:
#!/bin/sh
set -xa
DATA_DIR="/var/solr/data"
DOWNLOAD_DIR="/var/solr/download"
BACKUP_NAME="snapshot.backup"
BACKUP_ZIP="${BACKUP_NAME}.tar.gz"
BACKUP_URL="{{ .Values.dataUrl }}"
rm -rf $DATA_DIR/*
wget -nv -O $DATA_DIR/$BACKUP_ZIP $BACKUP_URL

# Delete the download directory.
rm -rf $DOWNLOAD_DIR
mkdir -p $DOWNLOAD_DIR
wget -nv -O $DOWNLOAD_DIR/$BACKUP_ZIP $BACKUP_URL

# Download
rm -rf $DATA_DIR
mkdir -p $DATA_DIR
cd $DATA_DIR
tar -xf $DATA_DIR/$BACKUP_ZIP -C $DATA_DIR
rm $DATA_DIR/$BACKUP_ZIP
tar -xf $DOWNLOAD_DIR/$BACKUP_ZIP -C $DATA_DIR
rm -rf $DOWNLOAD_DIR
restore.sh: |-
#!/bin/sh

Expand Down
2 changes: 1 addition & 1 deletion helm/name-lookup/templates/solr-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
command:
- /download.sh
volumeMounts:
- mountPath: /var/solr/data
- mountPath: /var/solr
name: {{ include "name-lookup.fullname" . }}-solr-data-vol
- mountPath: "/download.sh"
name: {{ include "name-lookup.fullname" . }}-configmap
Expand Down