corrected stateful sets and all that

This commit is contained in:
Michael Mekuleyi 2023-01-16 11:20:49 +01:00
parent 86ad08faeb
commit 4047ad8ebb
4 changed files with 12 additions and 6 deletions

View File

@ -1,14 +1,17 @@
apiVersion: apps/v1beta1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: mongo name: mongo
spec: spec:
serviceName: "mongo" serviceName: "mongo"
replicas: 3 replicas: 3
selector:
matchLabels:
name: mongo
template: template:
metadata: metadata:
labels: labels:
app: mongo name: mongo
spec: spec:
containers: containers:
- name: mongodb - name: mongodb

View File

@ -1,14 +1,17 @@
apiVersion: apps/v1beta1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: mongo name: mongo
spec: spec:
serviceName: "mongo" serviceName: "mongo"
replicas: 3 replicas: 3
selector:
matchLabels:
name: mongo
template: template:
metadata: metadata:
labels: labels:
app: mongo name: mongo
spec: spec:
containers: containers:
- name: mongodb - name: mongodb

View File

@ -8,7 +8,7 @@ spec:
- ReadWriteMany - ReadWriteMany
resources: resources:
requests: requests:
storage: 0.5Gi storage: 1Gi
selector: selector:
matchLabels: matchLabels:
volume: my-volume volume: my-volume

View File

@ -21,7 +21,7 @@ spec:
resources: resources:
requests: requests:
cpu: 1 cpu: 1
memory: 1Gi memory: 2Gi
env: env:
# Environment variables are not a best practice for security, # Environment variables are not a best practice for security,
# but we're using them here for brevity in the example. # but we're using them here for brevity in the example.