mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 03:37:36 +03:00
Support audit
This commit is contained in:
@@ -28,6 +28,13 @@ spec:
|
||||
command:
|
||||
- /hyperkube
|
||||
- apiserver
|
||||
{% if kubernetes_audit %}
|
||||
- --audit-log-path={{ audit_log_path }}
|
||||
- --audit-log-maxage={{ audit_log_maxage }}
|
||||
- --audit-log-maxbackup={{ audit_log_maxbackups }}
|
||||
- --audit-log-maxsize={{ audit_log_maxsize }}
|
||||
- --audit-policy-file={{ audit_policy_file }}
|
||||
{% endif %}
|
||||
- --advertise-address={{ ip | default(ansible_default_ipv4.address) }}
|
||||
- --etcd-servers={{ etcd_access_addresses }}
|
||||
{% if etcd_events_cluster_enabled %}
|
||||
@@ -184,6 +191,14 @@ spec:
|
||||
- mountPath: /etc/ssl/certs/ca-bundle.crt
|
||||
name: rhel-ca-bundle
|
||||
readOnly: true
|
||||
{% endif %}
|
||||
{% if kubernetes_audit %}
|
||||
- mountPath: {{ audit_log_mountpath }}
|
||||
name: {{ audit_log_name }}
|
||||
Writable: true
|
||||
- mountPath: {{ audit_policy_mountpath }}
|
||||
name: {{ audit_policy_name }}
|
||||
Writable: true
|
||||
{% endif %}
|
||||
volumes:
|
||||
- hostPath:
|
||||
@@ -205,3 +220,11 @@ spec:
|
||||
path: /etc/ssl/certs/ca-bundle.crt
|
||||
name: rhel-ca-bundle
|
||||
{% endif %}
|
||||
{% if kubernetes_audit %}
|
||||
- hostPath:
|
||||
path: {{ audit_log_hostpath }}
|
||||
name: {{ audit_log_name }}
|
||||
- hostPath:
|
||||
path: {{ audit_policy_hostpath }}
|
||||
name: {{ audit_policy_name }}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user