diff --git a/cmd/annotate.go b/cmd/annotate.go index ab77757ba..6dd573738 100644 --- a/cmd/annotate.go +++ b/cmd/annotate.go @@ -385,8 +385,8 @@ func init() { AnnotateCmd.Flags().StringVar(&annotateDaprImage, "dapr-image", "", "The image to use for the dapr sidecar container") AnnotateCmd.Flags().BoolVar(&annotateAppSSL, "app-ssl", false, "Enable SSL for the app") AnnotateCmd.Flags().MarkDeprecated("app-ssl", "This flag is deprecated and will be removed in a future release. Use \"app-protocol\" flag with https or grpcs instead") - AnnotateCmd.Flags().IntVar(&annotateMaxRequestBodySize, "max-request-body-size", -1, "The maximum request body size to use") - AnnotateCmd.Flags().IntVar(&annotateReadBufferSize, "http-read-buffer-size", -1, "The maximum size of HTTP header read buffer in kilobytes") + AnnotateCmd.Flags().IntVar(&annotateMaxRequestBodySize, "max-body-size", -1, "The maximum request body size to use") + AnnotateCmd.Flags().IntVar(&annotateReadBufferSize, "read-buffer-size", -1, "The maximum size of HTTP header read buffer in kilobytes") AnnotateCmd.Flags().BoolVar(&annotateHTTPStreamRequestBody, "http-stream-request-body", false, "Enable streaming request body for HTTP") AnnotateCmd.Flags().IntVar(&annotateGracefulShutdownSeconds, "graceful-shutdown-seconds", -1, "The number of seconds to wait for the app to shutdown") AnnotateCmd.Flags().BoolVar(&annotateEnableAPILogging, "enable-api-logging", false, "Enable API logging for the Dapr sidecar") diff --git a/cmd/run.go b/cmd/run.go index 799952384..c6dfdd93d 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -473,8 +473,8 @@ func init() { RunCmd.Flags().MarkDeprecated("app-ssl", "This flag is deprecated and will be removed in the future releases. Use \"app-protocol\" flag with https or grpcs values instead") RunCmd.Flags().IntVarP(&metricsPort, "metrics-port", "M", -1, "The port of metrics on dapr") RunCmd.Flags().BoolP("help", "h", false, "Print this help message") - RunCmd.Flags().IntVarP(&maxRequestBodySize, "dapr-http-max-request-size", "", -1, "Max size of request body in MB") - RunCmd.Flags().IntVarP(&readBufferSize, "dapr-http-read-buffer-size", "", -1, "HTTP header read buffer in KB") + RunCmd.Flags().IntVarP(&maxRequestBodySize, "max-body-size", "", -1, "Max size of request body in MB") + RunCmd.Flags().IntVarP(&readBufferSize, "read-buffer-size", "", -1, "HTTP header read buffer in KB") RunCmd.Flags().StringVarP(&unixDomainSocket, "unix-domain-socket", "u", "", "Path to a unix domain socket dir. If specified, Dapr API servers will use Unix Domain Sockets") RunCmd.Flags().BoolVar(&enableAppHealth, "enable-app-health-check", false, "Enable health checks for the application using the protocol defined with app-protocol") RunCmd.Flags().StringVar(&appHealthPath, "app-health-check-path", "", "Path used for health checks; HTTP only") diff --git a/pkg/kubernetes/annotator.go b/pkg/kubernetes/annotator.go index 251a9c646..17b074b1d 100644 --- a/pkg/kubernetes/annotator.go +++ b/pkg/kubernetes/annotator.go @@ -55,8 +55,8 @@ const ( daprReadinessProbeThresholdKey = "dapr.io/sidecar-readiness-probe-threshold" daprImageKey = "dapr.io/sidecar-image" daprAppSSLKey = "dapr.io/app-ssl" - daprMaxRequestBodySizeKey = "dapr.io/http-max-request-size" - daprReadBufferSizeKey = "dapr.io/http-read-buffer-size" + daprMaxRequestBodySizeKey = "dapr.io/max-body-size" + daprReadBufferSizeKey = "dapr.io/read-buffer-size" daprHTTPStreamRequestBodyKey = "dapr.io/http-stream-request-body" daprGracefulShutdownSecondsKey = "dapr.io/graceful-shutdown-seconds" daprEnableAPILoggingKey = "dapr.io/enable-api-logging" diff --git a/pkg/runexec/runexec_test.go b/pkg/runexec/runexec_test.go index 8b24a2fc3..14ff619cf 100644 --- a/pkg/runexec/runexec_test.go +++ b/pkg/runexec/runexec_test.go @@ -120,9 +120,9 @@ func assertCommonArgs(t *testing.T, basicConfig *standalone.RunConfig, output *R assertArgumentEqual(t, "components-path", standalone.GetDaprComponentsPath(daprPath), output.DaprCMD.Args) assertArgumentEqual(t, "app-ssl", "", output.DaprCMD.Args) assertArgumentEqual(t, "metrics-port", "9001", output.DaprCMD.Args) - assertArgumentEqual(t, "dapr-http-max-request-size", "-1", output.DaprCMD.Args) + assertArgumentEqual(t, "max-body-size", "-1", output.DaprCMD.Args) assertArgumentEqual(t, "dapr-internal-grpc-port", "5050", output.DaprCMD.Args) - assertArgumentEqual(t, "dapr-http-read-buffer-size", "-1", output.DaprCMD.Args) + assertArgumentEqual(t, "read-buffer-size", "-1", output.DaprCMD.Args) assertArgumentEqual(t, "dapr-listen-addresses", "127.0.0.1", output.DaprCMD.Args) } diff --git a/pkg/standalone/list.go b/pkg/standalone/list.go index fa064a6da..da25807b0 100644 --- a/pkg/standalone/list.go +++ b/pkg/standalone/list.go @@ -105,9 +105,9 @@ func List() ([]ListOutput, error) { enableMetrics = true } - maxRequestBodySize := getIntArg(argumentsMap, "http-max-request-size", runtime.DefaultMaxRequestBodySize) + maxRequestBodySize := getIntArg(argumentsMap, "max-body-size", runtime.DefaultMaxRequestBodySize) - httpReadBufferSize := getIntArg(argumentsMap, "http-read-buffer-size", runtime.DefaultReadBufferSize) + httpReadBufferSize := getIntArg(argumentsMap, "read-buffer-size", runtime.DefaultReadBufferSize) appID := argumentsMap["--app-id"] appCmd := "" diff --git a/pkg/standalone/run.go b/pkg/standalone/run.go index 57781e4b5..2752edab2 100644 --- a/pkg/standalone/run.go +++ b/pkg/standalone/run.go @@ -79,8 +79,8 @@ type SharedRunConfig struct { ResourcesPaths []string `arg:"resources-path" yaml:"resourcesPaths"` // Speicifcally omitted from annotations as appSSL is deprecated. AppSSL bool `arg:"app-ssl" yaml:"appSSL"` - MaxRequestBodySize int `arg:"dapr-http-max-request-size" annotation:"dapr.io/http-max-request-size" yaml:"daprHTTPMaxRequestSize" default:"-1"` - HTTPReadBufferSize int `arg:"dapr-http-read-buffer-size" annotation:"dapr.io/http-read-buffer-size" yaml:"daprHTTPReadBufferSize" default:"-1"` + MaxRequestBodySize int `arg:"max-body-size" annotation:"dapr.io/max-body-size" yaml:"maxBodySize" default:"-1"` + HTTPReadBufferSize int `arg:"read-buffer-size" annotation:"dapr.io/read-buffer-size" yaml:"readBufferSize" default:"-1"` EnableAppHealth bool `arg:"enable-app-health-check" annotation:"dapr.io/enable-app-health-check" yaml:"enableAppHealthCheck"` AppHealthPath string `arg:"app-health-check-path" annotation:"dapr.io/app-health-check-path" yaml:"appHealthCheckPath"` AppHealthInterval int `arg:"app-health-probe-interval" annotation:"dapr.io/app-health-probe-interval" ifneq:"0" yaml:"appHealthProbeInterval"`