generated from onedr0p/cluster-template
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: split up volsync component files (#3606)
* feat: split up volsync component files * fix: update workflow for kubernetes/shared
- Loading branch information
1 parent
f5f202f
commit c976541
Showing
14 changed files
with
159 additions
and
213 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
19 changes: 19 additions & 0 deletions
19
kubernetes/shared/components/volsync/local/externalsecret.yaml
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,19 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kube-schemas.pages.dev/external-secrets.io/externalsecret_v1beta1.json | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
name: &name "${APP}-volsync" | ||
spec: | ||
secretStoreRef: | ||
kind: ClusterSecretStore | ||
name: onepassword | ||
target: | ||
name: *name | ||
template: | ||
data: | ||
RESTIC_REPOSITORY: "/repository/${APP}" | ||
RESTIC_PASSWORD: "{{ .RESTIC_PASSWORD }}" | ||
dataFrom: | ||
- extract: | ||
key: volsync-template |
8 changes: 8 additions & 0 deletions
8
kubernetes/shared/components/volsync/local/kustomization.yaml
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,8 @@ | ||
--- | ||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./externalsecret.yaml | ||
- ./replicationdestination.yaml | ||
- ./replicationsource.yaml |
28 changes: 28 additions & 0 deletions
28
kubernetes/shared/components/volsync/local/replicationdestination.yaml
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,28 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kube-schemas.pages.dev/volsync.backube/replicationdestination_v1alpha1.json | ||
apiVersion: volsync.backube/v1alpha1 | ||
kind: ReplicationDestination | ||
metadata: | ||
name: "${APP}-bootstrap" | ||
labels: | ||
kustomize.toolkit.fluxcd.io/ssa: IfNotPresent | ||
spec: | ||
trigger: | ||
manual: restore-once | ||
restic: | ||
repository: "${APP}-volsync" | ||
copyMethod: Snapshot | ||
volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS}" | ||
cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS}" | ||
cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:=ReadWriteOnce}"] | ||
cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:=10Gi}" | ||
storageClassName: "${VOLSYNC_STORAGECLASS}" | ||
accessModes: ["${VOLSYNC_ACCESSMODES:=ReadWriteOnce}"] | ||
capacity: "${VOLSYNC_CAPACITY:=2Gi}" | ||
moverSecurityContext: | ||
runAsUser: ${VOLSYNC_PUID:=1000} | ||
runAsGroup: ${VOLSYNC_PGID:=100} | ||
fsGroup: ${VOLSYNC_PGID:=100} | ||
enableFileDeletion: true | ||
cleanupCachePVC: true | ||
cleanupTempPVC: true |
30 changes: 30 additions & 0 deletions
30
kubernetes/shared/components/volsync/local/replicationsource.yaml
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,30 @@ | ||
--- | ||
|
||
# yaml-language-server: $schema=https://kube-schemas.pages.dev/volsync.backube/replicationsource_v1alpha1.json | ||
apiVersion: volsync.backube/v1alpha1 | ||
kind: ReplicationSource | ||
metadata: | ||
name: "${APP}" | ||
spec: | ||
sourcePVC: "${CLAIM:=${APP}}" | ||
trigger: | ||
schedule: "0 * * * *" | ||
restic: | ||
copyMethod: "${VOLSYNC_COPYMETHOD:=Snapshot}" | ||
pruneIntervalDays: 14 | ||
repository: "${APP}-volsync" | ||
volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS}" | ||
cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:=10Gi}" | ||
cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS}" | ||
cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:=ReadWriteOnce}"] | ||
storageClassName: "${VOLSYNC_STORAGECLASS}" | ||
accessModes: ["${VOLSYNC_SNAP_ACCESSMODES:=ReadWriteOnce}"] # Use ReadOnlyMany for CephFS | ||
moverSecurityContext: | ||
runAsUser: ${VOLSYNC_PUID:=1000} | ||
runAsGroup: ${VOLSYNC_PGID:=100} | ||
fsGroup: ${VOLSYNC_PGID:=100} | ||
retain: | ||
hourly: 24 | ||
daily: 10 | ||
weekly: 5 | ||
monthly: 3 |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
kubernetes/shared/components/volsync/remote/externalsecret.yaml
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,23 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kube-schemas.pages.dev/external-secrets.io/externalsecret_v1beta1.json | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
name: &name "${APP}-volsync-r2" | ||
spec: | ||
secretStoreRef: | ||
kind: ClusterSecretStore | ||
name: onepassword | ||
target: | ||
name: *name | ||
template: | ||
data: | ||
RESTIC_REPOSITORY: "{{ .REPOSITORY_TEMPLATE }}/${APP}" | ||
RESTIC_PASSWORD: "{{ .RESTIC_PASSWORD }}" | ||
AWS_ACCESS_KEY_ID: "{{ .R2_ACCESS_KEY_ID }}" | ||
AWS_SECRET_ACCESS_KEY: "{{ .R2_SECRET_ACCESS_KEY }}" | ||
dataFrom: | ||
- extract: | ||
key: cloudflare | ||
- extract: | ||
key: volsync-r2-template |
7 changes: 7 additions & 0 deletions
7
kubernetes/shared/components/volsync/remote/kustomization.yaml
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,7 @@ | ||
--- | ||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./externalsecret.yaml | ||
- ./replicationsource.yaml |
Oops, something went wrong.