Skip to content

Commit 32c6f05

Browse files
Merge pull request #464 from AblionGE/feature/add-max-request-bytes-etcd
add etc max-request-bytes option
2 parents efde6d3 + 9729ac2 commit 32c6f05

File tree

5 files changed

+21
-1
lines changed

5 files changed

+21
-1
lines changed

REFERENCE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,10 @@ the files if they do not exist.
756756
This will tell etcd how many WAL files to be kept
757757
Defaults to 5
758758

759+
[*etcd_request_bytes*]
760+
This will tell etcd the maximum size of a request in bytes
761+
Defaults to 1572864
762+
759763
[*etcd_ca_key*]
760764
This is the ca certificate key data for the etcd cluster. This must be passed as string not as a file.
761765
Defaults to undef
@@ -1278,6 +1282,14 @@ Data type: `Integer`
12781282

12791283
Default value: `5`
12801284

1285+
##### `etcd_request_bytes`
1286+
1287+
Data type: `Integer`
1288+
1289+
1290+
1291+
Default value: `1572864`
1292+
12811293
##### `etcd_ca_key`
12821294

12831295
Data type: `Optional[String]`

manifests/config/kubeadm.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
Integer $api_server_count = $kubernetes::api_server_count,
3131
String $etcd_version = $kubernetes::etcd_version,
3232
Integer $etcd_max_wals = $kubernetes::etcd_max_wals,
33+
Integer $etcd_max_request_bytes = $kubernetes::etcd_max_request_bytes,
3334
String $token = $kubernetes::token,
3435
String $ttl_duration = $kubernetes::ttl_duration,
3536
String $discovery_token_hash = $kubernetes::discovery_token_hash,

manifests/init.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@
189189
# This will tell etcd how many WAL files to be kept
190190
# Defaults to 5
191191
#
192+
# [*etcd_max_request_bytes*]
193+
# This will tell etcd the maximum size of a request in bytes
194+
# Defaults to 1572864
195+
#
192196
# [*etcd_ca_key*]
193197
# This is the ca certificate key data for the etcd cluster. This must be passed as string not as a file.
194198
# Defaults to undef
@@ -520,6 +524,7 @@
520524
Optional[Enum['periodic', 'revision']] $etcd_compaction_method = 'periodic',
521525
Variant[String, Integer] $etcd_compaction_retention = 0,
522526
Integer $etcd_max_wals = 5,
527+
Integer $etcd_max_request_bytes = 1572864,
523528
Optional[String] $etcd_ca_key = undef,
524529
Optional[String] $etcd_ca_crt = undef,
525530
Optional[String] $etcdclient_key = undef,

templates/etcd/etcd.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ETCD_AUTO_COMPACTION_MODE="<%= @etcd_compaction_method %>"
1616
<% end -%>
1717
ETCD_AUTO_COMPACTION_RETENTION="<%= @etcd_compaction_retention %>"
1818
ETCD_MAX_WALS="<%= @etcd_max_wals %>"
19+
ETCD_MAX_REQUEST_BYTES="<%= @etcd_max_request_bytes %>"
1920
ETCD_ADVERTISE_CLIENT_URLS="https://<%= @etcd_ip %>:2379"
2021
ETCD_CERT_FILE="/etc/kubernetes/pki/etcd/server.crt"
2122
ETCD_KEY_FILE="/etc/kubernetes/pki/etcd/server.key"

templates/etcd/etcd.service.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ ExecStart=/usr/local/bin/etcd --name <%= @etcd_hostname %> \
4040
<% if @etcd_version >= "3.3.0" -%>
4141
--auto-compaction-mode <%= @etcd_compaction_method %> \
4242
<% end -%>
43-
--max-wals <%= @etcd_max_wals %>
43+
--max-wals <%= @etcd_max_wals %> \
44+
--max-request-bytes <%= @etcd_max_request_bytes %>
4445

4546

4647
[Install]

0 commit comments

Comments
 (0)