mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Merge pull request #33555 from rustyrobot/fix-selinux-rules-discovery
Automatic merge from submit-queue Kubeadm: fix SELinux rules for kubernetes discovery service **What this PR does / why we need it**: Fixes problems with SELinux on CentOS for discovery container which cannot read data from `/tmp/secret` directory. **Which issue this PR fixes** Fixed #33541
This commit is contained in:
commit
80be079c9f
@ -81,6 +81,15 @@ func newKubeDiscoveryPodSpec(s *kubeadmapi.KubeadmConfig) api.PodSpec {
|
||||
// `HostIP: s.API.AdvertiseAddrs[0]`, if there is only one address`
|
||||
{Name: "http", ContainerPort: 9898, HostPort: 9898},
|
||||
},
|
||||
SecurityContext: &api.SecurityContext{
|
||||
SELinuxOptions: &api.SELinuxOptions{
|
||||
// TODO: This implies our discovery container is not being restricted by
|
||||
// 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
|
||||
// setenforce 0 system-wide.
|
||||
Type: "unconfined_t",
|
||||
},
|
||||
},
|
||||
}},
|
||||
Volumes: []api.Volume{{
|
||||
Name: kubeDiscoverySecretName,
|
||||
|
Loading…
Reference in New Issue
Block a user