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

Increase deploy timeouts and make them configurable #170

Merged
merged 1 commit into from
Mar 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Changed
- Location of slugbuilder and slugrunner images
- Read keys from k8s secrets
- Increase deploy timeouts and make them configurable

## [0.2.2] - 2017-03-16
### Changed
Expand Down
6 changes: 3 additions & 3 deletions Godeps/Godeps.json

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

12 changes: 7 additions & 5 deletions k8s/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ type deploy struct {
}

type DeploymentConfig struct {
RevisionHistoryLimit int32 `envconfig:"revision_history_limit" default:"5"`
FinishTimeout time.Duration `split_words:"true" default:"30m"`
RevisionHistoryLimit int32 `split_words:"true" default:"5"`
StartTimeout time.Duration `split_words:"true" default:"10m"`
}

var deploymentConfig DeploymentConfig
Expand Down Expand Up @@ -166,15 +168,14 @@ func (c deployments) Get(appName string) (d *extensions.Deployment, err error) {

// buildApp creates a builder POD to build the App, waits the POD to be completed
func (c deployments) buildApp(app *models.App, deploy *deploy, storage helpers.Storage, w io.Writer) error {
// TODO: fix times for wait start and wait end

// creating builder POD
pod, err := c.createBuilderPod(app, deploy, storage)
if err != nil {
return err
}
// wainting POD to start the builder proccess
if err = c.waitPodStart(pod, 1*time.Second, 2*time.Minute); err != nil {
err = c.waitPodStart(pod, 1*time.Second, deploymentConfig.StartTimeout)
if err != nil {
return err
}
opts := &api.PodLogOptions{
Expand All @@ -188,7 +189,8 @@ func (c deployments) buildApp(app *models.App, deploy *deploy, storage helpers.S
defer s.Close()
io.Copy(w, s)
// wait POD finish
if err = c.waitPodEnd(pod, 1*time.Second, 2*time.Minute); err != nil {
err = c.waitPodEnd(pod, 1*time.Second, deploymentConfig.FinishTimeout)
if err != nil {
return err
}
// get POD exit code.
Expand Down
7 changes: 4 additions & 3 deletions vendor/github.com/kelseyhightower/envconfig/.travis.yml

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

57 changes: 42 additions & 15 deletions vendor/github.com/kelseyhightower/envconfig/README.md

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

7 changes: 7 additions & 0 deletions vendor/github.com/kelseyhightower/envconfig/env_os.go

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

7 changes: 7 additions & 0 deletions vendor/github.com/kelseyhightower/envconfig/env_syscall.go

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

Loading