summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-05 12:25:55 -0500
committerGitHub <noreply@github.com>2021-02-05 12:25:55 -0500
commit69ddbde9835159b19fab33f1dd22353e4b1ca484 (patch)
treead83880d02689b506c536a86e0e34b56dd440e37 /pkg
parentc421127dd7f700829a8e5265d8ddad102061bebc (diff)
parent6c713984ef9037a7b102e8ed72c72763167260eb (diff)
downloadpodman-69ddbde9835159b19fab33f1dd22353e4b1ca484.tar.gz
podman-69ddbde9835159b19fab33f1dd22353e4b1ca484.tar.bz2
podman-69ddbde9835159b19fab33f1dd22353e4b1ca484.zip
Merge pull request #9205 from st1971/issue-8710
play kube selinux label issue
Diffstat (limited to 'pkg')
-rw-r--r--pkg/specgen/generate/kube/kube.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go
index 0d7ee3ad2..98ab82259 100644
--- a/pkg/specgen/generate/kube/kube.go
+++ b/pkg/specgen/generate/kube/kube.go
@@ -282,16 +282,16 @@ func setupSecurityContext(s *specgen.SpecGenerator, containerYAML v1.Container)
if seopt := containerYAML.SecurityContext.SELinuxOptions; seopt != nil {
if seopt.User != "" {
- s.SelinuxOpts = append(s.SelinuxOpts, fmt.Sprintf("role:%s", seopt.User))
+ s.SelinuxOpts = append(s.SelinuxOpts, fmt.Sprintf("user:%s", seopt.User))
}
if seopt.Role != "" {
s.SelinuxOpts = append(s.SelinuxOpts, fmt.Sprintf("role:%s", seopt.Role))
}
if seopt.Type != "" {
- s.SelinuxOpts = append(s.SelinuxOpts, fmt.Sprintf("role:%s", seopt.Type))
+ s.SelinuxOpts = append(s.SelinuxOpts, fmt.Sprintf("type:%s", seopt.Type))
}
if seopt.Level != "" {
- s.SelinuxOpts = append(s.SelinuxOpts, fmt.Sprintf("role:%s", seopt.Level))
+ s.SelinuxOpts = append(s.SelinuxOpts, fmt.Sprintf("level:%s", seopt.Level))
}
}
if caps := containerYAML.SecurityContext.Capabilities; caps != nil {