-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7b7810
commit f8fc383
Showing
23 changed files
with
655 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...nt/kubernetes/complex/handle-temporary-contents/handle-temporary-contents-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: handle-temporary-contents | ||
namespace: eduhelper | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app: handle-temporary-contents | ||
template: | ||
metadata: | ||
labels: | ||
app: handle-temporary-contents | ||
spec: | ||
containers: | ||
- name: handle-temporary-contents | ||
image: 397789365835.dkr.ecr.ap-southeast-1.amazonaws.com/esd-eduhelper-eks-ecr-production:handle-temporary-contents | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 50051 | ||
env: | ||
- name: GRPC_SERVER_ADDRESS | ||
value: "0.0.0.0:50051" | ||
- name: CONTENT_SERVICE_HOST | ||
value: "contents" | ||
- name: CONTENT_SERVICE_PORT | ||
value: "50051" | ||
- name: NOTES_SERVICE_HOST | ||
value: "notes" | ||
- name: NOTES_SERVICE_PORT | ||
value: "50052" | ||
livenessProbe: | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:50051"] | ||
initialDelaySeconds: 30 | ||
periodSeconds: 15 | ||
timeoutSeconds: 5 | ||
failureThreshold: 3 | ||
readinessProbe: | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:50051"] | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
timeoutSeconds: 5 | ||
successThreshold: 1 | ||
failureThreshold: 3 | ||
restartPolicy: Always | ||
status: {} |
32 changes: 32 additions & 0 deletions
32
...t/kubernetes/complex/handle-temporary-contents/handle-temporary-contents-service-hpa.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: handle-temporary-contents | ||
namespace: eduhelper | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: handle-temporary-contents | ||
minReplicas: 1 | ||
maxReplicas: 6 | ||
behavior: | ||
scaleUp: | ||
stabilizationWindowSeconds: 60 | ||
policies: | ||
- type: Percent | ||
value: 100 | ||
periodSeconds: 15 | ||
scaleDown: | ||
stabilizationWindowSeconds: 300 | ||
policies: | ||
- type: Percent | ||
value: 100 | ||
periodSeconds: 15 | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: 75 |
12 changes: 12 additions & 0 deletions
12
...yment/kubernetes/complex/handle-temporary-contents/handle-temporary-contents-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: handle-temporary-contents | ||
namespace: eduhelper | ||
spec: | ||
selector: | ||
app: handle-temporary-contents | ||
ports: | ||
- protocol: TCP | ||
port: 50051 | ||
targetPort: 50051 |
49 changes: 49 additions & 0 deletions
49
deployment/kubernetes/complex/make-payment/make-payment-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: make-payment | ||
namespace: eduhelper | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app: make-payment | ||
template: | ||
metadata: | ||
labels: | ||
app: make-payment | ||
spec: | ||
containers: | ||
- name: make-payment | ||
image: 397789365835.dkr.ecr.ap-southeast-1.amazonaws.com/esd-eduhelper-eks-ecr-production:make-payment | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 50051 | ||
env: | ||
- name: GRPC_SERVER_ADDRESS | ||
value: "0.0.0.0:50051" | ||
- name: SUBSCRIPTION_SERVICE_HOST | ||
value: "subscriptions" | ||
- name: SUBSCRIPTION_SERVICE_PORT | ||
value: "50051" | ||
- name: PAYMENT_SERVICE_HOST | ||
value: "payment" | ||
- name: PAYMENT_SERVICE_PORT | ||
value: "50051" | ||
livenessProbe: | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:50051"] | ||
initialDelaySeconds: 30 | ||
periodSeconds: 15 | ||
timeoutSeconds: 5 | ||
failureThreshold: 3 | ||
readinessProbe: | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:50051"] | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
timeoutSeconds: 5 | ||
successThreshold: 1 | ||
failureThreshold: 3 | ||
restartPolicy: Always | ||
status: {} |
32 changes: 32 additions & 0 deletions
32
deployment/kubernetes/complex/make-payment/make-payment-service-hpa.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: make-payment | ||
namespace: eduhelper | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: make-payment | ||
minReplicas: 1 | ||
maxReplicas: 6 | ||
behavior: | ||
scaleUp: | ||
stabilizationWindowSeconds: 60 | ||
policies: | ||
- type: Percent | ||
value: 100 | ||
periodSeconds: 15 | ||
scaleDown: | ||
stabilizationWindowSeconds: 300 | ||
policies: | ||
- type: Percent | ||
value: 100 | ||
periodSeconds: 15 | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: 75 |
12 changes: 12 additions & 0 deletions
12
deployment/kubernetes/complex/make-payment/make-payment-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: make-payment | ||
namespace: eduhelper | ||
spec: | ||
selector: | ||
app: make-payment | ||
ports: | ||
- protocol: TCP | ||
port: 50051 | ||
targetPort: 50051 |
46 changes: 46 additions & 0 deletions
46
deployment/kubernetes/complex/process-chunks/process-chunks-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: save-notes | ||
namespace: eduhelper | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app: save-notes | ||
template: | ||
metadata: | ||
labels: | ||
app: save-notes | ||
spec: | ||
containers: | ||
- name: save-notes | ||
image: 397789365835.dkr.ecr.ap-southeast-1.amazonaws.com/esd-eduhelper-eks-ecr-production:save-notes | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 50051 | ||
env: | ||
- name: CONTENT_SERVICE_ADDRESS | ||
value: "contents:50051" | ||
- name: RABBITMQ_SERVER | ||
valueFrom: | ||
secretKeyRef: | ||
key: RABBITMQ_HOST | ||
name: eks-secrets | ||
- name: RABBITMQ_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
key: RABBITMQ_USERNAME | ||
name: eks-secrets | ||
- name: RABBITMQ_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: RABBITMQ_PASSWORD | ||
name: eks-secrets | ||
- name: OPENAI_API_KEYS | ||
valueFrom: | ||
secretKeyRef: | ||
key: OPENAI_API_KEYS | ||
name: eks-secrets | ||
restartPolicy: Always | ||
status: {} |
32 changes: 32 additions & 0 deletions
32
deployment/kubernetes/complex/process-chunks/process-chunks-service-hpa.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: save-notes | ||
namespace: eduhelper | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: save-notes | ||
minReplicas: 1 | ||
maxReplicas: 6 | ||
behavior: | ||
scaleUp: | ||
stabilizationWindowSeconds: 60 | ||
policies: | ||
- type: Percent | ||
value: 100 | ||
periodSeconds: 15 | ||
scaleDown: | ||
stabilizationWindowSeconds: 300 | ||
policies: | ||
- type: Percent | ||
value: 100 | ||
periodSeconds: 15 | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: 75 |
12 changes: 12 additions & 0 deletions
12
deployment/kubernetes/complex/process-chunks/process-chunks-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: save-notes | ||
namespace: eduhelper | ||
spec: | ||
selector: | ||
app: save-notes | ||
ports: | ||
- protocol: TCP | ||
port: 50051 | ||
targetPort: 50051 |
49 changes: 49 additions & 0 deletions
49
deployment/kubernetes/complex/save-notes/save-notes-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: save-notes | ||
namespace: eduhelper | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app: save-notes | ||
template: | ||
metadata: | ||
labels: | ||
app: save-notes | ||
spec: | ||
containers: | ||
- name: save-notes | ||
image: 397789365835.dkr.ecr.ap-southeast-1.amazonaws.com/esd-eduhelper-eks-ecr-production:save-notes | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 50051 | ||
env: | ||
- name: ENVIRONMENT_MODE | ||
value: "development" | ||
- name: USER_STORAGE_SERVICE_HOST | ||
value: "user-storage" | ||
- name: USER_STORAGE_SERVICE_PORT | ||
value: "50051" | ||
- name: NOTES_SERVICE_HOST | ||
value: "notes" | ||
- name: NOTES_SERVICE_PORT | ||
value: "50052" | ||
livenessProbe: | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:50051"] | ||
initialDelaySeconds: 30 | ||
periodSeconds: 15 | ||
timeoutSeconds: 5 | ||
failureThreshold: 3 | ||
readinessProbe: | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:50051"] | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
timeoutSeconds: 5 | ||
successThreshold: 1 | ||
failureThreshold: 3 | ||
restartPolicy: Always | ||
status: {} |
32 changes: 32 additions & 0 deletions
32
deployment/kubernetes/complex/save-notes/save-notes-service-hpa.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: save-notes | ||
namespace: eduhelper | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: save-notes | ||
minReplicas: 1 | ||
maxReplicas: 6 | ||
behavior: | ||
scaleUp: | ||
stabilizationWindowSeconds: 60 | ||
policies: | ||
- type: Percent | ||
value: 100 | ||
periodSeconds: 15 | ||
scaleDown: | ||
stabilizationWindowSeconds: 300 | ||
policies: | ||
- type: Percent | ||
value: 100 | ||
periodSeconds: 15 | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: 75 |
Oops, something went wrong.