cb2e5ac776
* Drop linux capabilities for unprivileged containerized worlkoads Kargo configures for deployments. * Configure required securityContext/user/group/groups for kube components' static manifests, etcd, calico-rr and k8s apps, like dnsmasq daemonset. * Rework cloud-init (etcd) users creation for CoreOS. * Fix nologin paths, adjust defaults for addusers role and ensure supplementary groups membership added for users. * Add netplug user for network plugins (yet unused by privileged networking containers though). * Grant the kube and netplug users read access for etcd certs via the etcd certs group. * Grant group read access to kube certs via the kube cert group. * Remove priveleged mode for calico-rr and run it under its uid/gid and supplementary etcd_cert group. * Adjust docs. * Align cpu/memory limits and dropped caps with added rkt support for control plane. Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>
17 lines
531 B
YAML
17 lines
531 B
YAML
---
|
|
- name: Etcd | get etcd user ID
|
|
shell: /usr/bin/id -u {{ etcd_user }} || echo 0
|
|
register: etcd_uid
|
|
|
|
- name: Etcd | get etcd group ID
|
|
shell: /usr/bin/getent group {{ etcd_group }} | cut -d':' -f3 || echo 0
|
|
register: etcd_gid
|
|
|
|
- name: Etcd | get etcd cert group ID
|
|
shell: /usr/bin/getent group {{ etcd_cert_group }} | cut -d':' -f3 || echo 0
|
|
register: etcd_cert_gid
|
|
|
|
- set_fact:
|
|
etcd_user_id: "{{ etcd_uid.stdout }}"
|
|
etcd_group_id: "{{ etcd_gid.stdout }}"
|
|
etcd_cert_group_id: "{{ etcd_cert_gid.stdout }}"
|