From 96b03e4b9da5b60c3835ae88ff0c9c07bb2233ae Mon Sep 17 00:00:00 2001 From: "Waylon S. Walker" Date: Sun, 11 Feb 2024 21:05:05 -0600 Subject: [PATCH] central storage --- active/storage.yaml | 13 +++++++++++++ active/superflat.yaml | 22 ++++------------------ pvc-inpsector.yaml | 17 +++++++++++++++++ 3 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 active/storage.yaml create mode 100644 pvc-inpsector.yaml diff --git a/active/storage.yaml b/active/storage.yaml new file mode 100644 index 0000000..c243d9c --- /dev/null +++ b/active/storage.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: data + namespace: minecraft +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi + limits: + storage: 4Gi diff --git a/active/superflat.yaml b/active/superflat.yaml index 0a3b1ee..ae60ba9 100644 --- a/active/superflat.yaml +++ b/active/superflat.yaml @@ -2,14 +2,14 @@ apiVersion: v1 kind: Namespace metadata: name: superflat - namespace: superflat + namespace: minecraft --- apiVersion: v1 kind: Service metadata: name: superflat - namespace: superflat + namespace: minecraft spec: selector: app: superflat @@ -24,7 +24,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: superflat - namespace: superflat + namespace: minecraft spec: replicas: 1 selector: @@ -61,23 +61,9 @@ spec: volumeMounts: - mountPath: /data name: data + subPath: superflat restartPolicy: Always volumes: - name: data persistentVolumeClaim: claimName: data - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: data - namespace: superflat -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi - limits: - storage: 4Gi diff --git a/pvc-inpsector.yaml b/pvc-inpsector.yaml new file mode 100644 index 0000000..2f72fa9 --- /dev/null +++ b/pvc-inpsector.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Pod +metadata: + name: pvc-inspector + namespace: superflat +spec: + containers: + - image: busybox + name: pvc-inspector + command: ["sleep", "3600"] + volumeMounts: + - mountPath: /data + name: data + volumes: + - name: data + persistentVolumeClaim: + claimName: data