Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 50 additions & 1 deletion deploy/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,61 @@ spec:
imagePullPolicy: Always
ports:
- containerPort: 80
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: 50m
memory: 128Mi
readinessProbe:
initialDelaySeconds: 1
periodSeconds: 2
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 1
httpGet:
host:
scheme: HTTP
path: /
port: 80
livenessProbe:
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 2
httpGet:
host:
scheme: HTTP
path: /
port: 80
envFrom:
- secretRef:
name: nisia
imagePullSecrets:
- name: regcred

---
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: nisia
namespace: production
labels:
app: nisia
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: nisia
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
---
apiVersion: v1
kind: Service
Expand Down
30 changes: 29 additions & 1 deletion deploy/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
app: nisia
spec:
replicas: 2
replicas: 1
selector:
matchLabels:
app: nisia
Expand All @@ -21,6 +21,34 @@ spec:
imagePullPolicy: Always
ports:
- containerPort: 80
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: 50m
memory: 128Mi
readinessProbe:
initialDelaySeconds: 1
periodSeconds: 2
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 1
httpGet:
host:
scheme: HTTP
path: /
port: 80
livenessProbe:
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 2
httpGet:
host:
scheme: HTTP
path: /
port: 80
envFrom:
- secretRef:
name: nisia
Expand Down