Add prod overlay for k8s-poc-demo app

This commit is contained in:
douzeb 2022-12-16 00:47:27 +01:00
parent bb858532e0
commit d6e9fc94eb
4 changed files with 30 additions and 6 deletions

View file

@ -2,24 +2,22 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: k8s-poc-nginx-deployment name: k8s-poc-nginx-deployment
labels:
app: nginx
spec: spec:
selector: selector:
matchLabels: matchLabels:
app: nginx app: k8s-poc-nginx
replicas: 2 replicas: 2
template: template:
metadata: metadata:
labels: labels:
app: nginx app: k8s-poc-nginx
spec: spec:
containers: containers:
- name: nginx - name: k8s-poc-nginx
image: nginx:latest image: nginx:latest
imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 80 - containerPort: 80
imagePullPolicy: IfNotPresent
resources: resources:
requests: requests:
cpu: "100m" cpu: "100m"

View file

@ -0,0 +1,5 @@
resources:
- ../../base
patchesStrategicMerge:
- replicas.yaml
- resources.yaml

View file

@ -0,0 +1,6 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: k8s-poc-nginx-deployment
spec:
replicas: 1

View file

@ -0,0 +1,15 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: k8s-poc-nginx-deployment
spec:
template:
spec:
containers:
- name: k8s-poc-nginx
resources:
# requests:
# cpu: "100m"
limits:
memory: "256Mi"
cpu: "150m"