-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KubernetesManifest] Check manifest stability for Pods #10684
Conversation
…-tasks into users/desattir/stabilityDetectionForPod
const timeOut = 5 * 60 * 1000; // Timeout 5 min | ||
let currentTime = new Date(); | ||
let podStatus; | ||
while (currentTime.getTime() - startTime.getTime() < timeOut) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is busy loop. Can you add sleep and Instead of time use Iteration.
@@ -66,5 +66,7 @@ | |||
"loc.messages.NullInputObjectMetadata": "Input object metadata is null.", | |||
"loc.messages.CanaryDeploymentAlreadyExistErrorMessage": "Canary deployment already exists. Rejecting this deployment.", | |||
"loc.messages.InvalidRejectActionDeploymentStrategy": "Reject action works only with strategy: canary", | |||
"loc.messages.InvalidPromotetActionDeploymentStrategy": "Promote action works only with strategy: canary" | |||
"loc.messages.InvalidPromotetActionDeploymentStrategy": "Promote action works only with strategy: canary", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End with '.'. Add for below messages.
while (currentTime.getTime() - startTime.getTime() < timeOut) { | ||
tl.debug(`Polling for pod status: ${podName}`); | ||
podStatus = getPodStatus(kubectl, podName); | ||
if (podStatus.phase && podStatus.phase !== 'Pending') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of 'Unknown' status do you want to retry?
@@ -14,7 +14,7 @@ | |||
"version": { | |||
"Major": 0, | |||
"Minor": 154, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.155.0
This PR adds the capability to check if a pod is in a ready state to the KubernetesManifest task.