Add prod overlay for k8s-poc-demo app
This commit is contained in:
parent
bb858532e0
commit
d6e9fc94eb
4 changed files with 30 additions and 6 deletions
|
@ -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"
|
||||||
|
|
5
deploy/k8s-poc-demo/overlays/prod/kustomization.yaml
Normal file
5
deploy/k8s-poc-demo/overlays/prod/kustomization.yaml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
resources:
|
||||||
|
- ../../base
|
||||||
|
patchesStrategicMerge:
|
||||||
|
- replicas.yaml
|
||||||
|
- resources.yaml
|
6
deploy/k8s-poc-demo/overlays/prod/replicas.yaml
Normal file
6
deploy/k8s-poc-demo/overlays/prod/replicas.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: k8s-poc-nginx-deployment
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
15
deploy/k8s-poc-demo/overlays/prod/resources.yaml
Normal file
15
deploy/k8s-poc-demo/overlays/prod/resources.yaml
Normal 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"
|
Loading…
Reference in a new issue