Skip to content

Commit

Permalink
Add ETCD Addon catalogs
Browse files Browse the repository at this point in the history
Signed-off-by: piyush1146115 <piyush@appscode.com>
  • Loading branch information
piyush1146115 committed Oct 8, 2021
1 parent a088dcd commit 0819b1c
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 0 deletions.
6 changes: 6 additions & 0 deletions catalog/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@
"5.0.13",
"6.2.5"
]
},
{
"name": "etcd",
"versions": [
"3.5.0"
]
}
]
}
37 changes: 37 additions & 0 deletions catalog/raw/etcd/3.5.0/etcd-backup-function.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: stash.appscode.com/v1beta1
kind: Function
metadata:
name: etcd-backup-3.5.0
spec:
args:
- backup-etcd
- --provider=${REPOSITORY_PROVIDER:=}
- --bucket=${REPOSITORY_BUCKET:=}
- --endpoint=${REPOSITORY_ENDPOINT:=}
- --region=${REPOSITORY_REGION:=}
- --path=${REPOSITORY_PREFIX:=}
- --secret-dir=/etc/repository/secret
- --scratch-dir=/tmp
- --enable-cache=${ENABLE_CACHE:=true}
- --max-connections=${MAX_CONNECTIONS:=0}
- --wait-timeout=${waitTimeout:=300}
- --hostname=${HOSTNAME:=}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
- --backupsession=${BACKUP_SESSION:=}
- --etcd-args=${args:=}
- --retention-keep-last=${RETENTION_KEEP_LAST:=0}
- --retention-keep-hourly=${RETENTION_KEEP_HOURLY:=0}
- --retention-keep-daily=${RETENTION_KEEP_DAILY:=0}
- --retention-keep-weekly=${RETENTION_KEEP_WEEKLY:=0}
- --retention-keep-monthly=${RETENTION_KEEP_MONTHLY:=0}
- --retention-keep-yearly=${RETENTION_KEEP_YEARLY:=0}
- --retention-keep-tags=${RETENTION_KEEP_TAGS:=}
- --retention-prune=${RETENTION_PRUNE:=false}
- --retention-dry-run=${RETENTION_DRY_RUN:=false}
- --output-dir=${outputDir:=}
- --license-apiservice=${LICENSE_APISERVICE:=}
image: stashed/stash-etcd:v3.5.0
volumeMounts:
- mountPath: /etc/repository/secret
name: ${secretVolume}
22 changes: 22 additions & 0 deletions catalog/raw/etcd/3.5.0/etcd-backup-task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: stash.appscode.com/v1beta1
kind: Task
metadata:
name: etcd-backup-3.5.0
spec:
steps:
- name: etcd-backup-3.5.0
params:
- name: outputDir
value: /tmp/output
- name: secretVolume
value: secret-volume
- name: update-status
params:
- name: outputDir
value: /tmp/output
- name: secretVolume
value: secret-volume
volumes:
- name: secret-volume
secret:
secretName: ${REPOSITORY_SECRET_NAME}
40 changes: 40 additions & 0 deletions catalog/raw/etcd/3.5.0/etcd-restore-function.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: stash.appscode.com/v1beta1
kind: Function
metadata:
name: etcd-restore-3.5.0
spec:
args:
- restore-etcd
- --provider=${REPOSITORY_PROVIDER:=}
- --bucket=${REPOSITORY_BUCKET:=}
- --endpoint=${REPOSITORY_ENDPOINT:=}
- --region=${REPOSITORY_REGION:=}
- --path=${REPOSITORY_PREFIX:=}
- --secret-dir=/etc/repository/secret
- --scratch-dir=/tmp
- --enable-cache=${ENABLE_CACHE:=true}
- --max-connections=${MAX_CONNECTIONS:=0}
- --wait-timeout=${waitTimeout:=300}
- --hostname=${HOSTNAME:=}
- --source-hostname=${SOURCE_HOSTNAME:=}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
- --etcd-args=${args:=}
- --initial-cluster=${initialCluster:=}
- --initial-cluster-token=${initialClusterToken:=}
- --data-dir=${dataDir:=}
- --workload-kind=${workloadKind:=}
- --workload-name=${workloadName:=}
- --storage-class=${storageClass:=}
- --storage-size=${storageSize:=}
- --output-dir=${outputDir:=}
- --license-apiservice=${LICENSE_APISERVICE:=}
- --invoker-kind=${INVOKER_KIND:=}
- --invoker-name=${INVOKER_NAME:=}
- --image=${ADDON_IMAGE:=}
- --secret-name=${REPOSITORY_SECRET_NAME:=}
- --snapshots=${RESTORE_SNAPSHOTS:=}
image: stashed/stash-etcd:3.5.0
volumeMounts:
- mountPath: /etc/repository/secret
name: ${secretVolume}
22 changes: 22 additions & 0 deletions catalog/raw/etcd/3.5.0/etcd-restore-task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: stash.appscode.com/v1beta1
kind: Task
metadata:
name: etcd-restore-3.5.0
spec:
steps:
- name: etcd-restore-3.5.0
params:
- name: outputDir
value: /tmp/output
- name: secretVolume
value: secret-volume
- name: update-status
params:
- name: outputDir
value: /tmp/output
- name: secretVolume
value: secret-volume
volumes:
- name: secret-volume
secret:
secretName: ${REPOSITORY_SECRET_NAME}

0 comments on commit 0819b1c

Please sign in to comment.