Commit 9a67c20b authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #37327 from jasonbrooks/pr-kubeadm-selinux

Automatic merge from submit-queue change unconfined_t to spc_t **What this PR does / why we need it**: When installing kube via kubeadm on a system w/ selinux enabled, it's necessary to disable selinux in order for the etcd and kube-discovery containers to run. The kube etcd and discovery pods are currently set to unconfined_t in order to avoid disabling selinux, but the correct type for an unconfined container is spc_t. For more information, see http://danwalsh.livejournal.com/2016/10/03/.
parents c4e89169 bf153fc1
...@@ -90,7 +90,7 @@ func newKubeDiscoveryPodSpec(cfg *kubeadmapi.MasterConfiguration) v1.PodSpec { ...@@ -90,7 +90,7 @@ func newKubeDiscoveryPodSpec(cfg *kubeadmapi.MasterConfiguration) v1.PodSpec {
// SELinux. This is not optimal and would be nice to adjust in future // SELinux. This is not optimal and would be nice to adjust in future
// so it can read /tmp/secret, but for now this avoids recommending // so it can read /tmp/secret, but for now this avoids recommending
// setenforce 0 system-wide. // setenforce 0 system-wide.
Type: "unconfined_t", Type: "spc_t",
}, },
}, },
}}, }},
......
...@@ -101,7 +101,7 @@ func WriteStaticPodManifests(cfg *kubeadmapi.MasterConfiguration) error { ...@@ -101,7 +101,7 @@ func WriteStaticPodManifests(cfg *kubeadmapi.MasterConfiguration) error {
// SELinux. This is not optimal and would be nice to adjust in future // SELinux. This is not optimal and would be nice to adjust in future
// so it can create and write /var/lib/etcd, but for now this avoids // so it can create and write /var/lib/etcd, but for now this avoids
// recommending setenforce 0 system-wide. // recommending setenforce 0 system-wide.
Type: "unconfined_t", Type: "spc_t",
}, },
}, },
}, certsVolume(cfg), etcdVolume(cfg), k8sVolume(cfg)) }, certsVolume(cfg), etcdVolume(cfg), k8sVolume(cfg))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment