Skip to content

Commit

Permalink
add backuprepo
Browse files Browse the repository at this point in the history
  • Loading branch information
wallyxjh committed Aug 21, 2024
1 parent bd3f6d4 commit 290d18c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions scripts/cloud/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,26 @@ spec:
"
echo "$ingress_config" > $CLOUD_DIR/ingress-nginx-config.yaml

backuprepo='
apiVersion: dataprotection.kubeblocks.io/v1alpha1
kind: BackupRepo
metadata:
annotations:
dataprotection.kubeblocks.io/need-update-tool-config: "true"
dataprotection.kubeblocks.io/is-default-repo: "true"
name: backup
spec:
accessMethod: Mount
config:
accessMode: ReadWriteOnce
storageClassName: openebs-backup
volumeMode: Filesystem
pvReclaimPolicy: Retain
storageProviderRef: pvc
volumeCapacity: 5Gi
'
echo "$backuprepo" > $CLOUD_DIR/backuprepo.yaml

vm_secret='
apiVersion: v1
kind: Secret
Expand Down Expand Up @@ -587,6 +607,8 @@ EOF
kubectl patch addon $addon --type='merge' -p '{"spec":{"install":{"enabled":true,"resources":{},"tolerations":"[{\"effect\":\"NoSchedule\",\"key\":\"kb-controller\",\"operator\":\"Equal\",\"value\":\"true\"}]"}}}'
done

kubectl apply -f $CLOUD_DIR/backuprepo.yaml

kubectl apply -f $CLOUD_DIR/vm-secret.yaml
kubectl patch vmagent -n vm victoria-metrics-k8s-stack --type merge -p '{"spec":{"additionalScrapeConfigs":{"key":"prometheus-additional.yaml","name":"additional-scrape-configs"}}}'
kubectl rollout restart deploy -n vm vmagent-victoria-metrics-k8s-stack || true
Expand Down

0 comments on commit 290d18c

Please sign in to comment.