Move generic agent flags to cmd/agent/core (#3484)

This commit is contained in:
zowhoey 2024-03-15 10:31:35 +00:00 committed by GitHub
parent 0a99726fec
commit ad507d8ee4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 14 deletions

View file

@ -97,4 +97,16 @@ var flags = []cli.Flag{
Usage: "backend to run pipelines on",
Value: "auto-detect",
},
&cli.IntFlag{
EnvVars: []string{"WOODPECKER_CONNECT_RETRY_COUNT"},
Name: "connect-retry-count",
Usage: "number of times to retry connecting to the server",
Value: 5,
},
&cli.DurationFlag{
EnvVars: []string{"WOODPECKER_CONNECT_RETRY_DELAY"},
Name: "connect-retry-delay",
Usage: "duration to wait before retrying to connect to the server",
Value: time.Second * 2,
},
}

View file

@ -15,8 +15,6 @@
package kubernetes
import (
"time"
"github.com/urfave/cli/v2"
)
@ -62,18 +60,6 @@ var Flags = []cli.Flag{
Name: "backend-k8s-secctx-nonroot",
Usage: "`run as non root` Kubernetes security context option",
},
&cli.IntFlag{
EnvVars: []string{"WOODPECKER_CONNECT_RETRY_COUNT"},
Name: "connect-retry-count",
Usage: "number of times to retry connecting to the server",
Value: 5,
},
&cli.DurationFlag{
EnvVars: []string{"WOODPECKER_CONNECT_RETRY_DELAY"},
Name: "connect-retry-delay",
Usage: "duration to wait before retrying to connect to the server",
Value: time.Second * 2,
},
&cli.StringSliceFlag{
EnvVars: []string{"WOODPECKER_BACKEND_K8S_PULL_SECRET_NAMES"},
Name: "backend-k8s-pod-image-pull-secret-names",