diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-05-10 09:12:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-10 09:12:54 -0400 |
commit | 195895eb7e1924b7dcf049ca5067f35795f74595 (patch) | |
tree | 911bfd82a077d6afd179c61ae4c1601a82081497 /pkg | |
parent | 9e0aa474a97b59c8540b5c9316fe98220d713d06 (diff) | |
parent | 14a1a4546c9d3adc28ad082e97be893e41b29ce2 (diff) | |
download | podman-195895eb7e1924b7dcf049ca5067f35795f74595.tar.gz podman-195895eb7e1924b7dcf049ca5067f35795f74595.tar.bz2 podman-195895eb7e1924b7dcf049ca5067f35795f74595.zip |
Merge pull request #10268 from flouthoc/kube-default-shared-namespace
Kube like pods should share ipc,net,uts by default
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/specgen/generate/kube/kube.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go index ccce3edba..4e41061a5 100644 --- a/pkg/specgen/generate/kube/kube.go +++ b/pkg/specgen/generate/kube/kube.go @@ -23,6 +23,10 @@ func ToPodGen(ctx context.Context, podName string, podYAML *v1.PodTemplateSpec) p := specgen.NewPodSpecGenerator() p.Name = podName p.Labels = podYAML.ObjectMeta.Labels + // Kube pods must share {ipc, net, uts} by default + p.SharedNamespaces = append(p.SharedNamespaces, "ipc") + p.SharedNamespaces = append(p.SharedNamespaces, "net") + p.SharedNamespaces = append(p.SharedNamespaces, "uts") // TODO we only configure Process namespace. We also need to account for Host{IPC,Network,PID} // which is not currently possible with pod create if podYAML.Spec.ShareProcessNamespace != nil && *podYAML.Spec.ShareProcessNamespace { |