From 4047ad8ebb7c4ec8728bfbf01195b9da4ba5f28b Mon Sep 17 00:00:00 2001 From: Michael Mekuleyi Date: Mon, 16 Jan 2023 11:20:49 +0100 Subject: [PATCH] corrected stateful sets and all that --- 13-10-mongo-simple.yaml | 7 +++++-- 13-13-mongo.yaml | 7 +++++-- 13-5-nfs-volume-claim.yaml | 2 +- 13-6-mysql-replicaset.yaml | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/13-10-mongo-simple.yaml b/13-10-mongo-simple.yaml index 0e50b65..aedd59c 100644 --- a/13-10-mongo-simple.yaml +++ b/13-10-mongo-simple.yaml @@ -1,14 +1,17 @@ -apiVersion: apps/v1beta1 +apiVersion: apps/v1 kind: StatefulSet metadata: name: mongo spec: serviceName: "mongo" replicas: 3 + selector: + matchLabels: + name: mongo template: metadata: labels: - app: mongo + name: mongo spec: containers: - name: mongodb diff --git a/13-13-mongo.yaml b/13-13-mongo.yaml index 368b1a6..8cefb93 100644 --- a/13-13-mongo.yaml +++ b/13-13-mongo.yaml @@ -1,14 +1,17 @@ -apiVersion: apps/v1beta1 +apiVersion: apps/v1 kind: StatefulSet metadata: name: mongo spec: serviceName: "mongo" replicas: 3 + selector: + matchLabels: + name: mongo template: metadata: labels: - app: mongo + name: mongo spec: containers: - name: mongodb diff --git a/13-5-nfs-volume-claim.yaml b/13-5-nfs-volume-claim.yaml index 5821301..9b335cb 100644 --- a/13-5-nfs-volume-claim.yaml +++ b/13-5-nfs-volume-claim.yaml @@ -8,7 +8,7 @@ spec: - ReadWriteMany resources: requests: - storage: 0.5Gi + storage: 1Gi selector: matchLabels: volume: my-volume diff --git a/13-6-mysql-replicaset.yaml b/13-6-mysql-replicaset.yaml index 58d2162..041ef76 100644 --- a/13-6-mysql-replicaset.yaml +++ b/13-6-mysql-replicaset.yaml @@ -21,7 +21,7 @@ spec: resources: requests: cpu: 1 - memory: 1Gi + memory: 2Gi env: # Environment variables are not a best practice for security, # but we're using them here for brevity in the example.