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

Add deployment health check implementation #2359

Merged
merged 25 commits into from
Jul 11, 2019

Conversation

tejal29
Copy link
Contributor

@tejal29 tejal29 commented Jun 27, 2019

This PR depends on #2338 to go in.

This in addition to add status-check flag covered in #2338, does the following

  • implements the status check for deployment by

    • get a list of skaffold deployed deployments using label -l app.kubernetes.io/managed-by=skaffold-<version>
    • for every deployment, get the spec.progressDeadline if set or set it to 10 minutes.
    • run kubectl rollout status after every 600 ms which is the default polling period.
    • finally either pass or fail depending on if the deployment was stabalized
  • Add unit tests

  • Add integration tests.

TODO:

@codecov
Copy link

codecov bot commented Jun 27, 2019

Codecov Report

Merging #2359 into master will decrease coverage by <.01%.
The diff coverage is 68.35%.

Impacted Files Coverage Δ
cmd/skaffold/app/cmd/flags.go 100% <ø> (ø) ⬆️
pkg/skaffold/deploy/kubectl/cli.go 96% <100%> (+0.44%) ⬆️
pkg/skaffold/deploy/status_check.go 66.17% <66.17%> (ø)
pkg/skaffold/runner/runner.go 70.67% <66.66%> (-0.65%) ⬇️

Copy link
Contributor

@priyawadhwa priyawadhwa left a comment

Choose a reason for hiding this comment

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

lgtm overall!

pkg/skaffold/deploy/status_check.go Outdated Show resolved Hide resolved
pkg/skaffold/deploy/status_check.go Outdated Show resolved Hide resolved
Copy link
Contributor

@priyawadhwa priyawadhwa left a comment

Choose a reason for hiding this comment

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

LGTM! Just a nit and small questions

pkg/skaffold/deploy/status_check.go Outdated Show resolved Hide resolved
pkg/skaffold/deploy/status_check_test.go Outdated Show resolved Hide resolved
pkg/skaffold/runner/runner.go Show resolved Hide resolved
@tejal29 tejal29 merged commit 9981c37 into GoogleContainerTools:master Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants