You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: internal/cmd/cli/apply.go
+45-43Lines changed: 45 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -42,30 +42,31 @@ type Apply struct {
42
42
FleetClient
43
43
BundleInputArgs
44
44
OutputArgsNoDefault
45
-
Labelmap[string]string`usage:"Labels to apply to created bundles" short:"l"`
46
-
TargetsFilestring`usage:"Addition source of targets and restrictions to be append"`
47
-
Compressbool`usage:"Force all resources to be compress" short:"c"`
48
-
ServiceAccountstring`usage:"Service account to assign to bundle created" short:"a"`
49
-
SyncGenerationint`usage:"Generation number used to force sync the deployment"`
50
-
TargetNamespacestring`usage:"Ensure this bundle goes to this target namespace"`
51
-
Pausedbool`usage:"Create bundles in a paused state"`
52
-
Commitstring`usage:"Commit to assign to the bundle" env:"COMMIT"`
53
-
Usernamestring`usage:"Basic auth username for helm repo" env:"HELM_USERNAME"`
54
-
PasswordFilestring`usage:"Path of file containing basic auth password for helm repo"`
55
-
CACertsFilestring`usage:"Path of custom cacerts for helm repo" name:"cacerts-file"`
56
-
SSHPrivateKeyFilestring`usage:"Path of ssh-private-key for helm repo" name:"ssh-privatekey-file"`
57
-
HelmRepoURLRegexstring`usage:"Helm credentials will be used if the helm repo matches this regex. Credentials will always be used if this is empty or not provided" name:"helm-repo-url-regex"`
58
-
KeepResourcesbool`usage:"Keep resources created after the GitRepo or Bundle is deleted" name:"keep-resources"`
59
-
DeleteNamespacebool`usage:"Delete GitRepo target namespace after the GitRepo or Bundle is deleted" name:"delete-namespace"`
60
-
HelmCredentialsByPathFilestring`usage:"Path of file containing helm credentials for paths" name:"helm-credentials-by-path-file"`
61
-
HelmBasicHTTPbool`usage:"Uses plain HTTP connections when downloading from helm repositories" name:"helm-basic-http"`
62
-
HelmInsecureSkipTLSbool`usage:"Skip TLS verification when downloading from helm repositories" name:"helm-insecure-skip-tls"`
63
-
CorrectDriftbool`usage:"Rollback any change made from outside of Fleet" name:"correct-drift"`
64
-
CorrectDriftForcebool`usage:"Use --force when correcting drift. Resources can be deleted and recreated" name:"correct-drift-force"`
65
-
CorrectDriftKeepFailHistorybool`usage:"Keep helm history for failed rollbacks" name:"correct-drift-keep-fail-history"`
DrivenScanbool`usage:"Use driven scan. Bundles are defined by the user" name:"driven-scan"`
68
-
DrivenScanSeparatorstring`usage:"Separator to use for bundle folder and options file" name:"driven-scan-sep" default:":"`
45
+
Labelmap[string]string`usage:"Labels to apply to created bundles" short:"l"`
46
+
TargetsFilestring`usage:"Addition source of targets and restrictions to be append"`
47
+
Compressbool`usage:"Force all resources to be compress" short:"c"`
48
+
ServiceAccountstring`usage:"Service account to assign to bundle created" short:"a"`
49
+
SyncGenerationint`usage:"Generation number used to force sync the deployment"`
50
+
TargetNamespacestring`usage:"Ensure this bundle goes to this target namespace"`
51
+
Pausedbool`usage:"Create bundles in a paused state"`
52
+
Commitstring`usage:"Commit to assign to the bundle" env:"COMMIT"`
53
+
Usernamestring`usage:"Basic auth username for helm repo" env:"HELM_USERNAME"`
54
+
PasswordFilestring`usage:"Path of file containing basic auth password for helm repo"`
55
+
CACertsFilestring`usage:"Path of custom cacerts for helm repo" name:"cacerts-file"`
56
+
SSHPrivateKeyFilestring`usage:"Path of ssh-private-key for helm repo" name:"ssh-privatekey-file"`
57
+
HelmRepoURLRegexstring`usage:"Helm credentials will be used if the helm repo matches this regex. Credentials will always be used if this is empty or not provided" name:"helm-repo-url-regex"`
58
+
KeepResourcesbool`usage:"Keep resources created after the GitRepo or Bundle is deleted" name:"keep-resources"`
59
+
DeleteNamespacebool`usage:"Delete GitRepo target namespace after the GitRepo or Bundle is deleted" name:"delete-namespace"`
60
+
HelmCredentialsByPathFilestring`usage:"Path of file containing helm credentials for paths" name:"helm-credentials-by-path-file"`
61
+
HelmBasicHTTPbool`usage:"Uses plain HTTP connections when downloading from helm repositories" name:"helm-basic-http"`
62
+
HelmInsecureSkipTLSbool`usage:"Skip TLS verification when downloading from helm repositories" name:"helm-insecure-skip-tls"`
63
+
CorrectDriftbool`usage:"Rollback any change made from outside of Fleet" name:"correct-drift"`
64
+
CorrectDriftForcebool`usage:"Use --force when correcting drift. Resources can be deleted and recreated" name:"correct-drift-force"`
65
+
CorrectDriftKeepFailHistorybool`usage:"Keep helm history for failed rollbacks" name:"correct-drift-keep-fail-history"`
DrivenScanbool`usage:"Use driven scan. Bundles are defined by the user" name:"driven-scan"`
68
+
DrivenScanSeparatorstring`usage:"Separator to use for bundle folder and options file" name:"driven-scan-sep" default:":"`
69
+
BundleCreationMaxConcurrencyint`usage:"Maximum number of concurrent bundle creation routines" name:"bundle-creation-max-concurrency" default:"4" env:"FLEET_BUNDLE_CREATION_MAX_CONCURRENCY"`
// 1. Goroutines will be launched, honouring the concurrency limit, and eventually block trying to write to `bundlesChan`.
121
131
// 2. The main function will read from `bundlesChan`, hence unblocking the goroutines. This will continue to read from `bundlesChan` until it is closed.
122
132
// 3. We use another goroutine to wait for all goroutines to finish, then close `bundlesChan`, finally unblocking the main function.
123
133
bundlesChan:=make(chan*fleet.Bundle)
124
134
eg, ctx:=errgroup.WithContext(pctx)
125
-
eg.SetLimit(bundleCreationMaxConcurrency+1) // extra goroutine for WalkDir loop
135
+
eg.SetLimit(maxConcurrency+1) // extra goroutine for WalkDir loop
// 1. Goroutines will be launched, honouring the concurrency limit, and eventually block trying to write to `bundlesChan`.
223
235
// 2. The main function will read from `bundlesChan`, hence unblocking the goroutines. This will continue to read from `bundlesChan` until it is closed.
224
236
// 3. We use another goroutine to wait for all goroutines to finish, then close `bundlesChan`, finally unblocking the main function.
225
237
bundlesChan:=make(chan*fleet.Bundle)
226
238
eg, ctx:=errgroup.WithContext(pctx)
227
-
eg.SetLimit(bundleCreationMaxConcurrency+1) // extra goroutine for WalkDir loop
239
+
eg.SetLimit(maxConcurrency+1) // extra goroutine for scanning loop
0 commit comments