Skip to content

Commit

Permalink
feat(helm): werf.io/no-activity-timeout annotation
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
  • Loading branch information
ilya-lesikov committed Jul 18, 2022
1 parent 7d7c71a commit 7b84ea0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/deploy/helm/annotations.go
Expand Up @@ -11,6 +11,8 @@ const (

IgnoreReadinessProbeFailsForPrefix = "werf.io/ignore-readiness-probe-fails-for-"

NoActivityTimeoutName = "werf.io/no-activity-timeout"

SkipLogsAnnoName = "werf.io/skip-logs"
SkipLogsForContainersAnnoName = "werf.io/skip-logs-for-containers"
ShowLogsOnlyForContainers = "werf.io/show-logs-only-for-containers"
Expand Down
9 changes: 9 additions & 0 deletions pkg/deploy/helm/resources_waiter.go
Expand Up @@ -297,6 +297,15 @@ mainLoop:
}

return nil, fmt.Errorf("%w: choose one of %v", invalidAnnoValueError, values)
case NoActivityTimeoutName:
noActivityTimeout, err := time.ParseDuration(annoValue)
if err != nil {
return nil, fmt.Errorf("%s: %w", invalidAnnoValueError, err)
} else if noActivityTimeout.Seconds() < 1 {
return nil, fmt.Errorf("%w: can't be less than 1 second", invalidAnnoValueError)
}

genericSpec.NoActivityTimeout = &noActivityTimeout
}
}

Expand Down

0 comments on commit 7b84ea0

Please sign in to comment.