Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support grpc message size as env #17728

Merged

Conversation

pasha-codefresh
Copy link
Member

@pasha-codefresh pasha-codefresh commented Apr 4, 2024

The only question, if we want to create separate envs for each client, from one side it will increase complexity , but from another side it will reduce risk for existing users. Open to discuss

@pasha-codefresh pasha-codefresh requested a review from a team as a code owner April 4, 2024 13:00
@crenshaw-dev
Copy link
Member

I like the idea of a single env var. We can always add component-specific vars later if we want.

Could we make these configurable via argocd-cmd-params-cm? Doesn't have to set command flags like the other config values, it could just set the env var.

common/common.go Outdated
@@ -273,6 +273,8 @@ const (
// EnvServerSideDiff defines the env var used to enable ServerSide Diff feature.
// If defined, value must be "true" or "false".
EnvServerSideDiff = "ARGOCD_APPLICATION_CONTROLLER_SERVER_SIDE_DIFF"
// EnvArgoCDgRPCMaxSizeMB is the environment variable to look for a max gRPC message size
EnvArgoCDgRPCMaxSizeMB = "ARGOCD_GRPC_MAX_SIZE_MB"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit, and I know that it was like this before, but I think we do not need to include "ArgoCD" in the environment variable name. Also, I find the casing for gRPC odd in the context of a variable name. Can we make it either EnvGrpcMaxSize or EnvGRPCMaxSize (I prefer the former)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem, that this variable already exist, and it will be breaking change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not talking about the name of the environment variable itself (ARGOCD_GRPC_MAX_SIZE_MB), but the variable name used in the code (EnvArgoCDgRPCMaxSizeMB). I don't see renaming the Go variable to be a breaking change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, my initial comment might have been misleading, because I wrote "environment variable name"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, to clarify:

EnvArgoCDgRPCMaxSizeMB should rather be EnvGrpcMaxSizeMB or EnvGRPCMaxSizeMB, with a preference to the former.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done @jannfis

@pasha-codefresh pasha-codefresh requested a review from jannfis April 5, 2024 16:50
@pasha-codefresh
Copy link
Member Author

I like the idea of a single env var. We can always add component-specific vars later if we want.

Could we make these configurable via argocd-cmd-params-cm? Doesn't have to set command flags like the other config values, it could just set the env var.

Done :)

Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pasha-codefresh pasha-codefresh merged commit cbafc13 into argoproj:master Apr 6, 2024
27 checks passed
mkieweg pushed a commit to mkieweg/argo-cd that referenced this pull request Jun 11, 2024
Hariharasuthan99 pushed a commit to AmadeusITGroup/argo-cd that referenced this pull request Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants