Skip to content
Permalink
Browse files
feat(helm): werf.io/no-activity-timeout annotation
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
  • Loading branch information
ilya-lesikov committed Jul 18, 2022
1 parent 7d7c71a commit 7b84ea057b8acb7d060344b2893c10878b4987e8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
@@ -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"
@@ -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
}
}

0 comments on commit 7b84ea0

Please sign in to comment.