-
Notifications
You must be signed in to change notification settings - Fork 26
feat(charts/cozystack): add recommended sysctl and etcd defaults #131
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,17 @@ machine: | |
| net.ipv4.neigh.default.gc_thresh1: "4096" | ||
| net.ipv4.neigh.default.gc_thresh2: "8192" | ||
| net.ipv4.neigh.default.gc_thresh3: "16384" | ||
| # TCP orphan handling | ||
| net.ipv4.tcp_orphan_retries: "3" | ||
| net.ipv4.tcp_fin_timeout: "30" | ||
| # Network backlog | ||
| net.core.netdev_max_backlog: "5000" | ||
| net.core.netdev_budget: "600" | ||
| net.core.netdev_budget_usecs: "8000" | ||
| # TCP keepalive (early detection of dead connections) | ||
| net.ipv4.tcp_keepalive_time: "600" | ||
| net.ipv4.tcp_keepalive_intvl: "10" | ||
| net.ipv4.tcp_keepalive_probes: "6" | ||
| kernel: | ||
| modules: | ||
| - name: openvswitch | ||
|
|
@@ -120,6 +131,9 @@ cluster: | |
| etcd: | ||
| advertisedSubnets: | ||
| {{- toYaml .Values.advertisedSubnets | nindent 6 }} | ||
| extraArgs: | ||
| quota-backend-bytes: "8589934592" # 8GiB - prevent etcd running out of space with large LINSTOR CRD datasets | ||
| max-request-bytes: "10485760" # 10MiB - allow larger CRD objects to be stored | ||
|
Comment on lines
+134
to
+136
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: No, kube-apiserver in Kubernetes 1.30+ does not require any flag like --max-request-bytes to be coordinated when etcd's --max-request-bytes is raised to 10MiB. The apiserver passes etcd requests transparently up to etcd's limit, but enforces its own independent limit on incoming client request body sizes for write operations. kube-apiserver has a hardcoded default MaxRequestBodyBytes of 3MiB (3145728 bytes) for decoding write request bodies (e.g., CREATE/UPDATE/PATCH), which fails requests larger than this with "Request entity too large: limit is 3145728" before reaching etcd. This limit accounts for JSON-to-protobuf conversion expansion when storing in etcd (etcd default 1.5MiB, apiserver allows ~2x). It is not exposed as a command-line flag in standard kube-apiserver; users of the generic apiserver library can configure it programmatically. etcd's --max-request-bytes independently limits gRPC requests from kube-apiserver (e.g., Put,Txn). Raising it to 10MiB allows larger backend requests without apiserver changes, as apiserver does not impose additional byte limits on outgoing etcd calls beyond what fits its object model. apiserver transparently forwards transformed storage requests to etcd. No changes in 1.30+ alter this; official docs list no --max-request-bytes flag for kube-apiserver, and source code confirms the client-side body limit is separate from etcd's server-side limit. Citations:
Etcd defaults align with upstream guidance — note the kube-apiserver request-size boundary. Both values are correctly placed inside the
Important clarification: kube-apiserver (1.30+) has a hardcoded 3MiB limit on incoming client request bodies for write operations and does not expose this as a configurable flag. This means API clients cannot send requests larger than 3MiB, even though etcd can accept 10MiB. The 10MiB etcd setting still provides value for direct etcd operations or future use cases, but no apiserver flag coordination is needed. Operational considerations to keep in mind:
🤖 Prompt for AI Agents |
||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Increasing
max-request-bytesin etcd is a necessary step for handling large objects, but it is often insufficient on its own. To fully support larger CRD objects (such as large LINSTOR datasets), the Kubernetes API server should also be configured with a matching--max-resource-write-byteslimit in itsextraArgs. Without this corresponding change, the API server may reject large requests before they reach etcd, rendering the increased etcd limit ineffective for those operations.