Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
saidghamra committed Nov 21, 2021
2 parents bdeee7b + edaedee commit fbcdf62
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ description: A Helm chart for Deploying AgoraCloud

type: application
version: 1.0.0
appVersion: 1.6.2
appVersion: 1.6.3
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agoracloud_server",
"version": "1.6.2",
"version": "1.6.3",
"description": "AgoraClouds Server",
"author": "AgoraCloud",
"private": true,
Expand Down
19 changes: 15 additions & 4 deletions src/modules/kubernetes/kubernetes.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,10 +670,21 @@ export class KubernetesService implements OnModuleInit {
DeploymentStatusDto.Unknown,
);
} else if (podPhase === PodPhase.Running) {
await this.deploymentsService.updateStatus(
deploymentId,
DeploymentStatusDto.Running,
);
/**
* Since we are listening to pod status updates, a pod might be running and is able to accept connections
* before Kubernetes updates the status of the Kubernetes Deployment to running. This might cause issues
* where an AgoraCloud deployment status is set to running but Kubernetes will not allow any connections
* to the Kubernetes Deployment, as the status of the Kubernetes Deployment has not been updated yet,
* leading to errors in the UI. Therefore, out of an abundance of caution, a 5 second delay is added to
* ensure that Kubernetes is ready to allow connections to AgoraCloud deployments before the status of
* the deployment is set to running.
*/
setTimeout(async () => {
await this.deploymentsService.updateStatus(
deploymentId,
DeploymentStatusDto.Running,
);
}, 5000);
} else if (podPhase === PodPhase.Pending) {
/**
* Check if the pod can not be scheduled by Kubernetes due
Expand Down

0 comments on commit fbcdf62

Please sign in to comment.