Skip to content

Commit

Permalink
Merge pull request #219 from rajan123456/resource_limits
Browse files Browse the repository at this point in the history
Add Resource Limits
  • Loading branch information
rajan123456 authored Jul 11, 2020
2 parents a257367 + 086207c commit 1d193a9
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 195 deletions.
63 changes: 0 additions & 63 deletions scripts/prod-hex/deployments/attendance-deployment.yaml

This file was deleted.

30 changes: 30 additions & 0 deletions scripts/prod-hex/deployments/hexagon-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,18 @@ spec:
labels:
app: hexagon
spec:
#nodeSelector:
# affinity: hexagon
containers:
- image: rajagupt/attendance:latest
name: attendance
resources:
requests:
memory: "600Mi"
cpu: "150m"
limits:
memory: "1200Mi"
cpu: "300m"
imagePullPolicy: Always
ports:
- name: attendance
Expand Down Expand Up @@ -49,6 +58,13 @@ spec:
name: user-data-vol
- image: rajagupt/management:latest
name: management
resources:
requests:
memory: "600Mi"
cpu: "150m"
limits:
memory: "1200Mi"
cpu: "300m"
imagePullPolicy: Always
ports:
- name: management
Expand All @@ -64,6 +80,13 @@ spec:
value: "http://hexagon:8084/reporting"
- image: rajagupt/reporting:latest
name: reporting
resources:
requests:
memory: "600Mi"
cpu: "150m"
limits:
memory: "1200Mi"
cpu: "300m"
imagePullPolicy: Always
ports:
- name: reporting
Expand All @@ -77,6 +100,13 @@ spec:
value: "0"
- image: rajagupt/user:latest
name: user
resources:
requests:
memory: "600Mi"
cpu: "150m"
limits:
memory: "1200Mi"
cpu: "300m"
imagePullPolicy: Always
ports:
- name: user
Expand Down
32 changes: 0 additions & 32 deletions scripts/prod-hex/deployments/management-deployment.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions scripts/prod-hex/deployments/reporting-deployment.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions scripts/prod-hex/deployments/user-deployment.yaml

This file was deleted.

9 changes: 5 additions & 4 deletions scripts/prod-hex/volumes/user-data-vol-claim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ metadata:
spec:
accessModes:
- ReadWriteOnce
#- ReadOnlyMany
resources:
requests:
storage: 10Gi
#storageClassName: "io1"
# selector:
# matchExpressions:
# - {key: kubernetes.io/hostname, operator: In, values: [ip-192-168-33-3.us-east-2.compute.internal]}
#storageClassName: "io1"
# selector:
# matchExpressions:
# - {key: kubernetes.io/hostname, operator: In, values: [ip-192-168-33-3.us-east-2.compute.internal]}
31 changes: 19 additions & 12 deletions scripts/prod-micro/deployments/attendance-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,25 @@ spec:
labels:
app: attendance
spec:
# affinity:
#nodeAffinity:
#requiredDuringSchedulingIgnoredDuringExecution:
#nodeSelectorTerms:
# - matchExpressions:
# - key: kubernetes.io/hostname
# operator: In
# values:
# - ip-192-168-33-3.us-east-2.compute.internal
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: kubernetes.io/hostname
# operator: In
# values:
# - ip-192-168-33-3.us-east-2.compute.internal
containers:
- image: rajagupt/attendance:latest
name: attendance
resources:
requests:
memory: "600Mi"
cpu: "150m"
limits:
memory: "1200Mi"
cpu: "300m"
imagePullPolicy: Always
ports:
- name: attendance
Expand All @@ -54,10 +61,10 @@ spec:
- name: FACENET_ENABLED
value: "0"
volumeMounts:
- mountPath: /app/resources/images
name: user-data-vol
- mountPath: /app/resources/images
name: user-data-vol
volumes:
- name: user-data-vol
persistentVolumeClaim:
claimName: user-data-vol-claim
readOnly: false
readOnly: false
7 changes: 7 additions & 0 deletions scripts/prod-micro/deployments/management-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ spec:
containers:
- image: rajagupt/management:latest
name: management
resources:
requests:
memory: "600Mi"
cpu: "150m"
limits:
memory: "1200Mi"
cpu: "300m"
imagePullPolicy: Always
ports:
- name: management
Expand Down
7 changes: 7 additions & 0 deletions scripts/prod-micro/deployments/reporting-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ spec:
containers:
- image: rajagupt/reporting:latest
name: reporting
resources:
requests:
memory: "600Mi"
cpu: "150m"
limits:
memory: "1200Mi"
cpu: "300m"
imagePullPolicy: Always
ports:
- name: reporting
Expand Down
7 changes: 7 additions & 0 deletions scripts/prod-micro/deployments/user-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ spec:
containers:
- image: rajagupt/user:latest
name: user
resources:
requests:
memory: "600Mi"
cpu: "150m"
limits:
memory: "1200Mi"
cpu: "300m"
imagePullPolicy: Always
ports:
- name: user
Expand Down
8 changes: 4 additions & 4 deletions scripts/prod-micro/services/reporting-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
app: reporting
type: ClusterIP
ports:
- protocol: TCP
port: 8080
targetPort: 8084
name: reporting
- protocol: TCP
port: 8080
targetPort: 8084
name: reporting
8 changes: 4 additions & 4 deletions scripts/prod-micro/services/user-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
app: user
type: ClusterIP
ports:
- protocol: TCP
port: 8080
targetPort: 8082
name: user
- protocol: TCP
port: 8080
targetPort: 8082
name: user
2 changes: 1 addition & 1 deletion scripts/prod-micro/services/vault-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
spec:
selector:
app: vault
type: ClusterIP
type: LoadBalancer
ports:
- protocol: TCP
port: 443
Expand Down

0 comments on commit 1d193a9

Please sign in to comment.