mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-29 22:03:22 -02:30
@@ -308,6 +308,8 @@ node_taints:
|
|||||||
* `audit_policy_file`: "{{ kube_config_dir }}/audit-policy/apiserver-audit-policy.yaml"
|
* `audit_policy_file`: "{{ kube_config_dir }}/audit-policy/apiserver-audit-policy.yaml"
|
||||||
|
|
||||||
By default, the `audit_policy_file` contains [default rules](https://github.com/kubernetes-sigs/kubespray/blob/master/roles/kubernetes/control-plane/templates/apiserver-audit-policy.yaml.j2) that can be overridden with the `audit_policy_custom_rules` variable.
|
By default, the `audit_policy_file` contains [default rules](https://github.com/kubernetes-sigs/kubespray/blob/master/roles/kubernetes/control-plane/templates/apiserver-audit-policy.yaml.j2) that can be overridden with the `audit_policy_custom_rules` variable.
|
||||||
|
|
||||||
|
Set `audit_policy_global_omit_stages` to a list of audit stages to omit globally via the audit policy's top-level `omitStages` field.
|
||||||
* *kubernetes_audit_webhook* - When set to `true`, enables the webhook audit backend.
|
* *kubernetes_audit_webhook* - When set to `true`, enables the webhook audit backend.
|
||||||
The webhook parameters can be tuned via the following variables (which default values are shown below):
|
The webhook parameters can be tuned via the following variables (which default values are shown below):
|
||||||
* `audit_webhook_config_file`: "{{ kube_config_dir }}/audit-policy/apiserver-audit-webhook-config.yaml"
|
* `audit_webhook_config_file`: "{{ kube_config_dir }}/audit-policy/apiserver-audit-webhook-config.yaml"
|
||||||
|
|||||||
@@ -80,6 +80,11 @@ audit_policy_file: "{{ kube_config_dir }}/audit-policy/apiserver-audit-policy.ya
|
|||||||
# verbs: []
|
# verbs: []
|
||||||
# resources: []
|
# resources: []
|
||||||
|
|
||||||
|
# audit global omit stages
|
||||||
|
# Set this variable to a list of audit stages to omit globally in the audit policy.
|
||||||
|
# e.g. audit_policy_global_omit_stages: ["RequestReceived"]
|
||||||
|
audit_policy_global_omit_stages: []
|
||||||
|
|
||||||
# audit log hostpath
|
# audit log hostpath
|
||||||
audit_log_name: audit-logs
|
audit_log_name: audit-logs
|
||||||
audit_log_hostpath: /var/log/kubernetes/audit
|
audit_log_hostpath: /var/log/kubernetes/audit
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
apiVersion: audit.k8s.io/v1
|
apiVersion: audit.k8s.io/v1
|
||||||
kind: Policy
|
kind: Policy
|
||||||
|
omitStages: {{ audit_policy_global_omit_stages | to_yaml(default_flow_style=True) | trim }}
|
||||||
rules:
|
rules:
|
||||||
{% if audit_policy_custom_rules is defined and audit_policy_custom_rules != "" %}
|
{% if audit_policy_custom_rules is defined and audit_policy_custom_rules != "" %}
|
||||||
{{ audit_policy_custom_rules | indent(2, true) }}
|
{{ audit_policy_custom_rules | indent(2, true) }}
|
||||||
|
|||||||
Reference in New Issue
Block a user