forked from argoproj/argo-cd
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support grpc message size as env
Signed-off-by: pashakostohrys <[email protected]>
- Loading branch information
1 parent
44da206
commit 73cdfa4
Showing
4 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ import ( | |
"crypto/tls" | ||
"crypto/x509" | ||
"fmt" | ||
"github.com/argoproj/argo-cd/v2/common" | ||
"github.com/argoproj/argo-cd/v2/util/env" | ||
"math" | ||
"time" | ||
|
||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" | ||
|
@@ -19,9 +22,9 @@ import ( | |
|
||
//go:generate go run github.com/vektra/mockery/[email protected] --name=RepoServerServiceClient | ||
|
||
const ( | ||
var ( | ||
// MaxGRPCMessageSize contains max grpc message size | ||
MaxGRPCMessageSize = 100 * 1024 * 1024 | ||
MaxGRPCMessageSize = env.ParseNumFromEnv(common.EnvArgoCDgRPCMaxSizeMB, 100, 0, math.MaxInt32) * 1024 * 1024 | ||
) | ||
|
||
// TLSConfiguration describes parameters for TLS configuration to be used by a repo server API client | ||
|