mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-22 21:46:02 -03:30
Merge pull request #911 from bogdando/DROP_CAPS
Drop linux capabilities and rework users/groups
This commit is contained in:
@@ -51,3 +51,18 @@ netchecker_kubectl_memory_requests: 64M
|
||||
etcd_cert_dir: "/etc/ssl/etcd/ssl"
|
||||
calico_cert_dir: "/etc/calico/certs"
|
||||
canal_cert_dir: "/etc/canal/certs"
|
||||
|
||||
# Linux capabilities to be dropped for k8s apps ran by container engines
|
||||
apps_drop_cap:
|
||||
- chown
|
||||
- dac_override
|
||||
- fowner
|
||||
- fsetid
|
||||
- kill
|
||||
- setgid
|
||||
- setuid
|
||||
- setpcap
|
||||
- sys_chroot
|
||||
- mknod
|
||||
- audit_write
|
||||
- setfcap
|
||||
|
||||
@@ -25,6 +25,12 @@ spec:
|
||||
- name: calico-policy-controller
|
||||
image: {{ calico_policy_image_repo }}:{{ calico_policy_image_tag }}
|
||||
imagePullPolicy: {{ k8s_image_pull_policy }}
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
{% for c in apps_drop_cap %}
|
||||
- {{ c.upper() }}
|
||||
{% endfor %}
|
||||
resources:
|
||||
limits:
|
||||
cpu: {{ calico_policy_controller_cpu_limit }}
|
||||
|
||||
@@ -23,6 +23,12 @@ spec:
|
||||
- name: REPORT_INTERVAL
|
||||
value: '{{ agent_report_interval }}'
|
||||
imagePullPolicy: {{ k8s_image_pull_policy }}
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
{% for c in apps_drop_cap %}
|
||||
- {{ c.upper() }}
|
||||
{% endfor %}
|
||||
resources:
|
||||
limits:
|
||||
cpu: {{ netchecker_agent_cpu_limit }}
|
||||
|
||||
@@ -24,6 +24,12 @@ spec:
|
||||
- name: REPORT_INTERVAL
|
||||
value: '{{ agent_report_interval }}'
|
||||
imagePullPolicy: {{ k8s_image_pull_policy }}
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
{% for c in apps_drop_cap %}
|
||||
- {{ c.upper() }}
|
||||
{% endfor %}
|
||||
resources:
|
||||
limits:
|
||||
cpu: {{ netchecker_agent_cpu_limit }}
|
||||
|
||||
@@ -33,3 +33,9 @@ spec:
|
||||
memory: {{ netchecker_kubectl_memory_requests }}
|
||||
args:
|
||||
- proxy
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
{% for c in apps_drop_cap %}
|
||||
- {{ c.upper() }}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user