-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #801 from k8up-io/pvc-rwo
feat: add support for RWO PVCs backups
- Loading branch information
Showing
27 changed files
with
1,123 additions
and
172 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
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
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 was deleted.
Oops, something went wrong.
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,63 @@ | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: pvc-rwo-subject-pvc-controlplane | ||
namespace: k8up-e2e-subject | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 10Mi | ||
storageClassName: standard | ||
volumeMode: Filesystem | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: pvc-rwo-subject-controlplane | ||
namespace: k8up-e2e-subject | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: subject-controlplane | ||
template: | ||
metadata: | ||
labels: | ||
app: subject-controlplane | ||
spec: | ||
containers: | ||
- name: pvc-rwo-subject-container | ||
image: quay.io/prometheus/busybox:latest | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- sh | ||
- -c | ||
- | | ||
printf "$BACKUP_FILE_CONTENT" | tee "/data/$BACKUP_FILE_NAME" && \ | ||
echo && \ | ||
ls -la /data && \ | ||
echo "test file /data/$BACKUP_FILE_NAME written, sleeping now" && \ | ||
sleep infinity | ||
securityContext: | ||
runAsUser: $ID | ||
volumeMounts: | ||
- name: volume | ||
mountPath: /data | ||
env: | ||
- name: BACKUP_FILE_CONTENT | ||
value: "" | ||
- name: BACKUP_FILE_NAME | ||
value: "" | ||
volumes: | ||
- name: volume | ||
persistentVolumeClaim: | ||
claimName: pvc-rwo-subject-pvc-controlplane | ||
tolerations: | ||
- effect: NoSchedule | ||
key: node-role.kubernetes.io/master | ||
- effect: NoSchedule | ||
key: node-role.kubernetes.io/control-plane | ||
nodeSelector: | ||
node-role.kubernetes.io/control-plane: "" |
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,58 @@ | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: pvc-rwo-subject-pvc-worker | ||
namespace: k8up-e2e-subject | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 10Mi | ||
storageClassName: standard | ||
volumeMode: Filesystem | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: pvc-rwo-subject-worker | ||
namespace: k8up-e2e-subject | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: subject-worker | ||
template: | ||
metadata: | ||
labels: | ||
app: subject-worker | ||
spec: | ||
containers: | ||
- name: pvc-rwo-subject-container | ||
image: quay.io/prometheus/busybox:latest | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- sh | ||
- -c | ||
- | | ||
printf "$BACKUP_FILE_CONTENT" | tee "/data/$BACKUP_FILE_NAME" && \ | ||
echo && \ | ||
ls -la /data && \ | ||
echo "test file /data/$BACKUP_FILE_NAME written, sleeping now" && \ | ||
sleep infinity | ||
securityContext: | ||
runAsUser: $ID | ||
volumeMounts: | ||
- name: volume | ||
mountPath: /data | ||
env: | ||
- name: BACKUP_FILE_CONTENT | ||
value: "" | ||
- name: BACKUP_FILE_NAME | ||
value: "" | ||
volumes: | ||
- name: volume | ||
persistentVolumeClaim: | ||
claimName: pvc-rwo-subject-pvc-worker | ||
nodeSelector: | ||
worker: "true" |
Oops, something went wrong.