Enable pod security policies 14/115214/6
authorTodd Malsbary <todd.malsbary@intel.com>
Fri, 20 Nov 2020 23:42:54 +0000 (15:42 -0800)
committerTodd Malsbary <todd.malsbary@intel.com>
Wed, 9 Dec 2020 23:08:21 +0000 (15:08 -0800)
commit5f99856b3cdc3c11e82f0f67b3da973d43e47fc7
treeeb70b409c7b70a3a248016790c361f27ff076db8
parent7e06fbaa3d1293ca9b25aeb7ea7cb7be2179e30a
Enable pod security policies

The intention with this change is to disable CAP_NET_RAW (which can be
a security vulnerability) for created Pods.

kubespray provides the podsecuritypolicy_enabled variable for enabling
privileged (for kube-system) and restricted (for everyone else)
policies.  Enabling this requires binding the KUD_ADDONs to the
privileged policy and specifying the security context correctly for
Pods running in the default namespace.

As of this change, the only difference between the privileged and
restricted security policies is the dropping of CAP_NET_RAW in the
restricted policy.  To use the default restricted policy provided with
kubespray, additional changes must be made to the Pods that are run in
the default namespace (such as runing as a non-root user, not
requesting privileged mode, etc.).

Issue-ID: MULTICLOUD-1256
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Change-Id: I7d6add122ad4046f9116ef03a249f5c9da1d7eec
kud/deployment_infra/images/nfd-master.yaml
kud/deployment_infra/playbooks/configure-emco.yml
kud/deployment_infra/playbooks/configure-onap4k8s.yml
kud/deployment_infra/playbooks/configure-ovn4nfv.yml
kud/hosting_providers/containerized/inventory/group_vars/k8s-cluster.yml
kud/hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml