Skip to content

Commit c06b0dc

Browse files
committed
add etcd_warning_apply_duration etcd_quota_backend_bytes
1 parent b4b7e4d commit c06b0dc

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

manifests/config/kubeadm.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@
255255
Integer $etcd_max_wals = $kubernetes::etcd_max_wals,
256256
Integer $etcd_max_request_bytes = $kubernetes::etcd_max_request_bytes,
257257
Optional[String] $etcd_listen_metric_urls = $kubernetes::etcd_listen_metric_urls,
258+
Optional[String] $etcd_warning_apply_duration = $kubernetes::etcd_warning_apply_duration,
259+
Optional[String] $etcd_quota_backend_bytes = $kubernetes::etcd_quota_backend_bytes,
258260
String $token = $kubernetes::token,
259261
String $ttl_duration = $kubernetes::ttl_duration,
260262
String $discovery_token_hash = $kubernetes::discovery_token_hash,

manifests/init.pp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,14 @@
230230
# This will tell etcd how many WAL files to be kept
231231
# Defaults to 5
232232
#
233+
# [*etcd_warning_apply_duration*]
234+
# Warning is generated if requests take more than this duration.
235+
# Defaults to undef
236+
#
237+
# [*etcd_quota_backend_bytes*]
238+
# Raise alarms when backend size exceeds the given quota (0 defaults to low space quota).
239+
# Default to undef
240+
#
233241
# [*etcd_max_request_bytes*]
234242
# This will tell etcd the maximum size of a request in bytes
235243
# Defaults to 1572864
@@ -637,6 +645,8 @@
637645
Variant[String, Integer] $etcd_compaction_retention = 0,
638646
Integer $etcd_max_wals = 5,
639647
Integer $etcd_max_request_bytes = 1572864,
648+
Optional[String] $etcd_warning_apply_duration = undef,
649+
Optional[String] $etcd_quota_backend_bytes = undef,
640650
Optional[String] $etcd_listen_metric_urls = undef,
641651
Optional[String] $etcd_ca_key = undef,
642652
Optional[String] $etcd_ca_crt = undef,

templates/etcd/etcd.service.erb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ ExecStart=/usr/local/bin/etcd --name <%= @etcd_hostname %> \
4444
<%- if @etcd_listen_metric_urls -%>
4545
--listen-metrics-urls <%= @etcd_listen_metric_urls %> \
4646
<%- end -%>
47+
<%- if @etcd_quota_backend_bytes -%>
48+
--quota-backend-bytes <%= @etcd_quota_backend_bytes %> \
49+
<%- end -%>
50+
<% if @etcd_warning_apply_duration && @etcd_version >= "3.5.0" -%>
51+
--experimental-warning-apply-duration <%= @etcd_warning_apply_duration %> \
52+
<% end -%>
4753
--max-wals <%= @etcd_max_wals %>
4854

4955

0 commit comments

Comments
 (0)