diff --git a/kustomizations/sorcerer/prod/archives-backup-volume.yaml b/kustomizations/sorcerer/prod/archives-backup-volume.yaml new file mode 100644 index 00000000..e4e66426 --- /dev/null +++ b/kustomizations/sorcerer/prod/archives-backup-volume.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pv-prod-backup-archives +spec: + accessModes: + - ReadWriteMany + capacity: + storage: 400T + local: + path: /backup/archives + persistentVolumeReclaimPolicy: Retain + volumeMode: Filesystem + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - ekman +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: prod-oceanbox-backup-archives +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 400T + storageClassName: "" + volumeMode: Filesystem + volumeName: pv-prod-backup-archives diff --git a/kustomizations/sorcerer/prod/archives-ceph-volume.yaml b/kustomizations/sorcerer/prod/archives-ceph-volume.yaml index 5f7c32d9..c958850f 100644 --- a/kustomizations/sorcerer/prod/archives-ceph-volume.yaml +++ b/kustomizations/sorcerer/prod/archives-ceph-volume.yaml @@ -16,7 +16,7 @@ spec: fsName: data clusterID: rook-ceph staticVolume: "true" - rootPath: /archives + rootPath: / volumeHandle: pv-prod-ceph-archives persistentVolumeReclaimPolicy: Retain volumeMode: Filesystem diff --git a/kustomizations/sorcerer/prod/deployment_patch.yaml b/kustomizations/sorcerer/prod/deployment_patch.yaml index 245d8121..1a32b0c0 100644 --- a/kustomizations/sorcerer/prod/deployment_patch.yaml +++ b/kustomizations/sorcerer/prod/deployment_patch.yaml @@ -1,6 +1,17 @@ - op: replace path: /spec/template/spec/containers/0/volumeMounts/0/mountPath - value: /data/archives + value: /data +- op: add + path: /spec/template/spec/containers/0/volumeMounts/- + value: + mountPath: /backup/archives + name: backup +- op: add + path: /spec/template/spec/volumes/- + value: + name: backup + persistentVolumeClaim: + claimName: prod-oceanbox-backup-archives - op: replace path: /spec/template/spec/containers/0/env/0 value: diff --git a/kustomizations/sorcerer/prod/kustomization.yaml b/kustomizations/sorcerer/prod/kustomization.yaml index b4ebbc6e..72f4e964 100644 --- a/kustomizations/sorcerer/prod/kustomization.yaml +++ b/kustomizations/sorcerer/prod/kustomization.yaml @@ -15,7 +15,6 @@ patches: kind: Deployment path: deployment_patch.yaml resources: -# - pv.yaml -# - pvc.yaml - archives-ceph-volume.yaml +- archives-backup-volume.yaml - ../base diff --git a/kustomizations/sorcerer/staging/archives-backup-volume.yaml b/kustomizations/sorcerer/staging/archives-backup-volume.yaml new file mode 100644 index 00000000..a153d67b --- /dev/null +++ b/kustomizations/sorcerer/staging/archives-backup-volume.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pv-staging-backup-archives +spec: + accessModes: + - ReadWriteMany + capacity: + storage: 400T + local: + path: /backup/archives + persistentVolumeReclaimPolicy: Retain + volumeMode: Filesystem + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - ekman +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: staging-oceanbox-backup-archives +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 400T + storageClassName: "" + volumeMode: Filesystem + volumeName: pv-staging-backup-archives diff --git a/kustomizations/sorcerer/staging/archives-ceph-volume.yaml b/kustomizations/sorcerer/staging/archives-ceph-volume.yaml index 160252dd..86cc517b 100644 --- a/kustomizations/sorcerer/staging/archives-ceph-volume.yaml +++ b/kustomizations/sorcerer/staging/archives-ceph-volume.yaml @@ -16,7 +16,7 @@ spec: fsName: data clusterID: rook-ceph staticVolume: "true" - rootPath: /archives + rootPath: / volumeHandle: pv-staging-ceph-archives persistentVolumeReclaimPolicy: Retain volumeMode: Filesystem diff --git a/kustomizations/sorcerer/staging/deployment_patch.yaml b/kustomizations/sorcerer/staging/deployment_patch.yaml index e859f59e..338805e7 100644 --- a/kustomizations/sorcerer/staging/deployment_patch.yaml +++ b/kustomizations/sorcerer/staging/deployment_patch.yaml @@ -1,6 +1,17 @@ - op: replace path: /spec/template/spec/containers/0/volumeMounts/0/mountPath - value: /data/archives + value: /data +- op: add + path: /spec/template/spec/containers/0/volumeMounts/- + value: + mountPath: /backup/archives + name: backup +- op: add + path: /spec/template/spec/volumes/- + value: + name: backup + persistentVolumeClaim: + claimName: staging-oceanbox-backup-archives - op: replace path: /spec/template/spec/containers/0/env/0 value: diff --git a/kustomizations/sorcerer/staging/kustomization.yaml b/kustomizations/sorcerer/staging/kustomization.yaml index c351446a..df82396b 100644 --- a/kustomizations/sorcerer/staging/kustomization.yaml +++ b/kustomizations/sorcerer/staging/kustomization.yaml @@ -15,7 +15,6 @@ patches: kind: Deployment path: deployment_patch.yaml resources: -# - pv.yaml -# - pvc.yaml - archives-ceph-volume.yaml +- archives-backup-volume.yaml - ../base diff --git a/kustomizations/sorcerer/values-prod.yaml b/kustomizations/sorcerer/values-prod.yaml index f8cd8f74..f30cca4f 100644 --- a/kustomizations/sorcerer/values-prod.yaml +++ b/kustomizations/sorcerer/values-prod.yaml @@ -13,12 +13,12 @@ ingress: persistence: enabled: true - # existingClaim: prod-ceph-archives - existingClaim: prod-oceanbox-backup-archives + existingClaim: prod-ceph-archives + # existingClaim: prod-oceanbox-backup-archives nodeSelector: - # topology.kubernetes.io/group: srv - kubernetes.io/hostname: fs-backup + topology.kubernetes.io/group: login + # kubernetes.io/hostname: fs-backup # node-role.kubernetes.io/worker: c1-1 # tolerations: @@ -26,4 +26,3 @@ nodeSelector: # operator: Equal # value: compute # effect: NoSchedule - diff --git a/kustomizations/sorcerer/values-staging.yaml b/kustomizations/sorcerer/values-staging.yaml index fd6a784c..ac33cbb8 100644 --- a/kustomizations/sorcerer/values-staging.yaml +++ b/kustomizations/sorcerer/values-staging.yaml @@ -13,15 +13,19 @@ ingress: - hosts: - sorcerer.ekman.oceanbox.io secretName: staging-sorcerer-tls + persistence: + enabled: true existingClaim: staging-ceph-archives # existingClaim: staging-oceanbox-backup-archives + nodeSelector: - topology.kubernetes.io/group: srv - # kubernetes.io/hostname: fs2 + topology.kubernetes.io/group: login + # kubernetes.io/hostname: fs-backup # node-role.kubernetes.io/worker: c1-1 -tolerations: - - key: workload - operator: Equal - value: compute - effect: NoSchedule + +# tolerations: +# - key: workload +# operator: Equal +# value: compute +# effect: NoSchedule