Skip to content

Commit

Permalink
Explicitly mention --max-request-body-size in the deployment package …
Browse files Browse the repository at this point in the history
…for better awareness
  • Loading branch information
kispaljr committed Nov 24, 2024
1 parent 294f815 commit c7b7398
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions deployments/porch/2-function-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ spec:
- --config=/config.yaml
- --functions=/functions
- --pod-namespace=porch-fn-system
- --max-request-body-size=6291456 # Keep this in sync with porch-server's corresponding argument
env:
- name: WRAPPER_SERVER_IMAGE
value: docker.io/nephio/porch-wrapper-server:latest
Expand Down
19 changes: 10 additions & 9 deletions deployments/porch/3-porch-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,23 @@ spec:
- name: api-server-certs
mountPath: /tmp/certs
env:
# Uncomment to enable trace-reporting to jaeger
#- name: OTEL
# value: otel://jaeger-oltp:4317
- name: OTEL_SERVICE_NAME
value: porch-server
- name: CERT_STORAGE_DIR
value: "/etc/webhook/certs"
- name: GOOGLE_API_GO_EXPERIMENTAL_DISABLE_NEW_AUTH_LIB
value: "true"
# Uncomment to enable trace-reporting to jaeger
#- name: OTEL
# value: otel://jaeger-oltp:4317
- name: OTEL_SERVICE_NAME
value: porch-server
- name: CERT_STORAGE_DIR
value: "/etc/webhook/certs"
- name: GOOGLE_API_GO_EXPERIMENTAL_DISABLE_NEW_AUTH_LIB
value: "true"
args:
- --function-runner=function-runner:9445
- --cache-directory=/cache
- --cert-dir=/tmp/certs
- --secure-port=4443
- --repo-sync-frequency=10m
- --disable-validating-admissions-policy=true
- --max-request-body-size=6291456 # Keep this in sync with function-runner's corresponding argument

---
apiVersion: v1
Expand Down
2 changes: 1 addition & 1 deletion func/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func main() {
flag.StringVar(&o.pod.RegistryAuthSecretName, "registry-auth-secret-name", "auth-secret", "The name of the secret used for authenticating to custom registries")
flag.BoolVar(&o.pod.EnablePrivateRegistriesTls, "enable-private-registries-tls", false, "if enabled, will prioritize use of user provided TLS secret when accessing registries")
flag.StringVar(&o.pod.TlsSecretPath, "tls-secret-path", "/var/tmp/tls-secret/", "The path of the secret used in tls configuration")
flag.IntVar(&o.pod.MaxGrpcMessageSize, "max-request-body-size", 6*1024*1024, "Maximum size of grpc messages in bytes.")
flag.IntVar(&o.pod.MaxGrpcMessageSize, "max-request-body-size", 6*1024*1024, "Maximum size of grpc messages in bytes. Keep this in sync with porch-server's corresponding argument.")

flag.Parse()

Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (o *PorchServerOptions) AddFlags(fs *pflag.FlagSet) {
fs.StringVar(&o.FunctionRunnerAddress, "function-runner", "", "Address of the function runner gRPC service.")
fs.StringVar(&o.DefaultImagePrefix, "default-image-prefix", "gcr.io/kpt-fn/", "Default prefix for unqualified function names")
fs.StringVar(&o.CacheDirectory, "cache-directory", "", "Directory where Porch server stores repository and package caches.")
fs.IntVar(&o.MaxRequestBodySize, "max-request-body-size", 6*1024*1024, "Maximum size of the request body in bytes.")
fs.IntVar(&o.MaxRequestBodySize, "max-request-body-size", 6*1024*1024, "Maximum size of the request body in bytes. Keep this in sync with function-runner's corresponding argument.")
fs.BoolVar(&o.UseGitCaBundle, "use-git-cabundle", false, "Determine whether to use a user-defined CaBundle for TLS towards git.")
fs.BoolVar(&o.DisableValidatingAdmissionPolicy, "disable-validating-admissions-policy", true, "Determine whether to (dis|en)able the Validating Admission Policy, which requires k8s version >= v1.30")
fs.DurationVar(&o.RepoSyncFrequency, "repo-sync-frequency", 10*time.Minute, "Frequency in seconds at which registered repositories will be synced and the background job repository refresh runs.")
Expand Down

0 comments on commit c7b7398

Please sign in to comment.