Skip to content
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

Merged
merged 4 commits into from
Jun 24, 2019

Conversation

thesattiraju
Copy link
Contributor

@thesattiraju thesattiraju commented Jun 18, 2019

This PR adds the capability to check if a pod is in a ready state to the KubernetesManifest task.

@thesattiraju thesattiraju requested a review from bansalaseem June 18, 2019 14:03
@thesattiraju thesattiraju marked this pull request as ready for review June 18, 2019 14:04
@thesattiraju thesattiraju merged commit 49b47e7 into master Jun 24, 2019
@thesattiraju thesattiraju deleted the users/desattir/stabilityDetectionForPod branch June 24, 2019 10:44
const timeOut = 5 * 60 * 1000; // Timeout 5 min
let currentTime = new Date();
let podStatus;
while (currentTime.getTime() - startTime.getTime() < timeOut) {
Copy link
Member

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",
Copy link
Member

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') {
Copy link
Member

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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.155.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants