From 81fb3a895300c5f83f7b8ea7a3bf03308b457de4 Mon Sep 17 00:00:00 2001 From: YuitoAkatsuki Date: Wed, 28 Aug 2024 17:37:25 +0900 Subject: [PATCH] chore: changed NFS configure --- manifests/mysql-deployment.yaml | 2 +- manifests/mysql-inf.yaml | 35 +++++++++++++++++++++ manifests/wiki-deploy.yaml | 4 +-- manifests/wikinfs.yaml | 56 ++++++--------------------------- 4 files changed, 48 insertions(+), 49 deletions(-) create mode 100644 manifests/mysql-inf.yaml diff --git a/manifests/mysql-deployment.yaml b/manifests/mysql-deployment.yaml index aab77d6..8ab45be 100644 --- a/manifests/mysql-deployment.yaml +++ b/manifests/mysql-deployment.yaml @@ -30,4 +30,4 @@ spec: volumes: - name: dbvol persistentVolumeClaim: - claimName: db-pvc \ No newline at end of file + claimName: db \ No newline at end of file diff --git a/manifests/mysql-inf.yaml b/manifests/mysql-inf.yaml new file mode 100644 index 0000000..2ab78c5 --- /dev/null +++ b/manifests/mysql-inf.yaml @@ -0,0 +1,35 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: db + labels: + app: mysql + annotations: + "volume.beta.kubernetes.io/storage-class": "slow" +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 10Gi + volumeName: wiki-db +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: wiki-db + annotations: + volume.beta.kubernetes.io/storage-class: "slow" +spec: + capacity: + storage: 10Gi + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + claimRef: + namespace: mediawiki + name: db + nfs: + server: 172.16.110.199 + path: /nfs/infra/wiki/db \ No newline at end of file diff --git a/manifests/wiki-deploy.yaml b/manifests/wiki-deploy.yaml index 8a12180..bfe565a 100644 --- a/manifests/wiki-deploy.yaml +++ b/manifests/wiki-deploy.yaml @@ -40,10 +40,10 @@ spec: volumes: - name: imgvol persistentVolumeClaim: - claimName: img-pvc + claimName: image - name: delimgvol persistentVolumeClaim: - claimName: delimg-pvc + claimName: delimage - name: mediawiki-config configMap: name: mediawiki-config diff --git a/manifests/wikinfs.yaml b/manifests/wikinfs.yaml index 9564276..0c495c6 100644 --- a/manifests/wikinfs.yaml +++ b/manifests/wikinfs.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: wiki-sql + name: wiki-imgage annotations: volume.beta.kubernetes.io/storage-class: "slow" spec: @@ -13,15 +13,15 @@ spec: persistentVolumeReclaimPolicy: Retain claimRef: namespace: mediawiki - name: db-pvc + name: imgage nfs: server: 172.16.110.199 - path: /nfs/wiki/db + path: /nfs/infra/wiki/image --- apiVersion: v1 kind: PersistentVolume metadata: - name: wiki-img + name: wiki-delimage annotations: volume.beta.kubernetes.io/storage-class: "slow" spec: @@ -32,50 +32,15 @@ spec: persistentVolumeReclaimPolicy: Retain claimRef: namespace: mediawiki - name: img-pvc + name: delimage nfs: server: 172.16.110.199 - path: /nfs/wiki/image ---- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: wiki-delimg - annotations: - volume.beta.kubernetes.io/storage-class: "slow" -spec: - capacity: - storage: 10Gi - accessModes: - - ReadWriteMany - persistentVolumeReclaimPolicy: Retain - claimRef: - namespace: mediawiki - name: delimg-pvc - nfs: - server: 172.16.110.199 - path: /nfs/wiki/del-image ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: db-pvc - labels: - app: mysql - annotations: - "volume.beta.kubernetes.io/storage-class": "slow" -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: 10Gi - volumeName: "wiki-sql" + path: /nfs/infra/wiki/del-image --- apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: img-pvc + name: image labels: app: mediawiki annotations: @@ -86,13 +51,12 @@ spec: resources: requests: storage: 10Gi - volumeName: "wiki-img" - + volumeName: wiki-image --- apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: delimg-pvc + name: delimage labels: app: mediawiki annotations: @@ -103,4 +67,4 @@ spec: resources: requests: storage: 10Gi - volumeName: "wiki-delimg" \ No newline at end of file + volumeName: wiki-delimage \ No newline at end of file