forked from kubernetes-sigs/kubespray
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for
EventRateLimit
plugin configuration (kubernetes-sig…
…s#8711) * feat: add support for EventRateLimit admission plugin * docs: add documentation about admission_control_config_file and EventRateLimit configuration
- Loading branch information
Showing
7 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
roles/kubernetes/control-plane/templates/admission-controls.v1beta2.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: apiserver.config.k8s.io/v1 | ||
kind: AdmissionConfiguration | ||
plugins: | ||
{% for plugin in kube_apiserver_enable_admission_plugins[0].split(',') %} | ||
{% if plugin in kube_apiserver_admission_plugins_needs_configuration %} | ||
- name: {{ plugin }} | ||
path: {{ kube_config_dir }}/{{ plugin|lower }}.yaml | ||
{% endif %} | ||
{% endfor %} |
11 changes: 11 additions & 0 deletions
11
roles/kubernetes/control-plane/templates/eventratelimit.v1beta2.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: eventratelimit.admission.k8s.io/v1alpha1 | ||
kind: Configuration | ||
limits: | ||
{% for limit in kube_apiserver_admission_event_rate_limits.values() %} | ||
- type: {{ limit.type }} | ||
qps: {{ limit.qps }} | ||
burst: {{ limit.burst }} | ||
{% if limit.cache_size is defined %} | ||
cacheSize: {{ limit.cache_size }} | ||
{% endif %} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
# list of admission plugins that needs to be configured | ||
kube_apiserver_admission_plugins_needs_configuration: [EventRateLimit] |