This repository has been archived by the owner on Feb 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NDS-886: etcdumper restore currently broken in cluster-backup (#20)
* Added my setup stuff * sync * Sync * Updated specs * Removed my personal templates * Added a YAML for cluster-backup as a cronjob (requires setting a special flag on the apiserver) * Added a shell into a backup container * Sync with upstream, fix merge conflicts, make sure PR is synced * Removed hard-coded CLUSTER_ID * Update backup.yaml * Update shell.yaml * Removed stray spaces from env block
- Loading branch information
1 parent
ee6da17
commit 2279d40
Showing
5 changed files
with
111 additions
and
4 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
apiVersion: batch/v2alpha1 | ||
kind: CronJob | ||
metadata: | ||
name: cluster-backup | ||
spec: | ||
# suspend: true | ||
# schedule: "*/1 * * * *" | ||
schedule: "@daily" | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
hostNetwork: true | ||
restartPolicy: OnFailure | ||
containers: | ||
- image: ndslabs/cluster-backup:latest | ||
imagePullPolicy: Always | ||
name: cluster-backup | ||
command: [ "./backup.sh" ] | ||
env: | ||
- name: CLUSTER_ID | ||
valueFrom: | ||
configMapKeyRef: | ||
name: ndslabs-config | ||
key: workbench.domain | ||
- name: ETCD_HOST | ||
value: $(NDSLABS_ETCD_SERVICE_HOST) | ||
- name: ETCD_PORT | ||
value: $(NDSLABS_ETCD_SERVICE_PORT) | ||
- name: BACKUP_SRC | ||
value: "/var/glfs" | ||
- name: BACKUP_DEST | ||
value: /ndsbackup | ||
- name: BACKUP_HOST | ||
value: | ||
- name: BACKUP_USER | ||
value: | ||
- name: BACKUP_KEY | ||
value: "/etc/backup-key/ssh-privatekey" | ||
volumeMounts: | ||
- name: clusterdata | ||
mountPath: /var/glfs | ||
- name: backupkey | ||
readOnly: true | ||
mountPath: /etc/backup-key/ | ||
volumes: | ||
- name: clusterdata | ||
hostPath: | ||
path: /var/glfs | ||
- name: backupkey | ||
secret: | ||
secretName: backup-key | ||
defaultMode: 0600 |
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,54 @@ | ||
apiVersion: v1 | ||
kind: ReplicationController | ||
metadata: | ||
name: backup-shell | ||
spec: | ||
replicas: 1 | ||
selector: | ||
component: backup-shell | ||
template: | ||
metadata: | ||
labels: | ||
component: backup-shell | ||
spec: | ||
hostNetwork: true | ||
containers: | ||
- name: backup-shell | ||
imagePullPolicy: Always | ||
image: ndslabs/cluster-backup:latest | ||
stdin: true | ||
tty: true | ||
env: | ||
- name: CLUSTER_ID | ||
valueFrom: | ||
configMapKeyRef: | ||
name: ndslabs-config | ||
key: workbench.domain | ||
- name: ETCD_HOST | ||
value: $(NDSLABS_ETCD_SERVICE_HOST) | ||
- name: ETCD_PORT | ||
value: $(NDSLABS_ETCD_SERVICE_PORT) | ||
- name: BACKUP_SRC | ||
value: "/var/glfs" | ||
- name: BACKUP_DEST | ||
value: /ndsbackup | ||
- name: BACKUP_HOST | ||
value: | ||
- name: BACKUP_USER | ||
value: | ||
- name: BACKUP_KEY | ||
value: "/etc/backup-key/ssh-privatekey" | ||
volumeMounts: | ||
- name: clusterdata | ||
mountPath: /var/glfs | ||
- name: backupkey | ||
readOnly: true | ||
mountPath: /etc/backup-key/ | ||
volumes: | ||
- name: clusterdata | ||
hostPath: | ||
path: /var/glfs | ||
- name: backupkey | ||
secret: | ||
secretName: backup-key | ||
defaultMode: 0600 |
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