summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate/kube/kube.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-05-24 13:48:50 -0400
committerGitHub <noreply@github.com>2022-05-24 13:48:50 -0400
commiteea7491d6b02893766b806775bf00c992a824fd2 (patch)
tree131f4e27cebc82ee86de3bc7165dec0ec6857946 /pkg/specgen/generate/kube/kube.go
parentc6152f40a0d083a894b03ea18f1fabd1b4b68852 (diff)
parent5d37d80ff9783b2c811a06d80cd06fd6e338faf0 (diff)
downloadpodman-eea7491d6b02893766b806775bf00c992a824fd2.tar.gz
podman-eea7491d6b02893766b806775bf00c992a824fd2.tar.bz2
podman-eea7491d6b02893766b806775bf00c992a824fd2.zip
Merge pull request #14327 from rhatdan/common
Use containers/common/pkg/util.StringToSlice
Diffstat (limited to 'pkg/specgen/generate/kube/kube.go')
-rw-r--r--pkg/specgen/generate/kube/kube.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go
index f37d79798..689c740f0 100644
--- a/pkg/specgen/generate/kube/kube.go
+++ b/pkg/specgen/generate/kube/kube.go
@@ -16,6 +16,7 @@ import (
"github.com/containers/common/libnetwork/types"
"github.com/containers/common/pkg/parse"
"github.com/containers/common/pkg/secrets"
+ cutil "github.com/containers/common/pkg/util"
"github.com/containers/image/v5/manifest"
"github.com/containers/podman/v4/libpod/define"
ann "github.com/containers/podman/v4/pkg/annotations"
@@ -356,7 +357,7 @@ func ToSpecGen(ctx context.Context, opts *CtrSpecGenOptions) (*specgen.SpecGener
// a selinux mount option exists for it
for k, v := range opts.Annotations {
// Make sure the z/Z option is not already there (from editing the YAML)
- if strings.Replace(k, define.BindMountPrefix, "", 1) == volumeSource.Source && !util.StringInSlice("z", options) && !util.StringInSlice("Z", options) {
+ if strings.Replace(k, define.BindMountPrefix, "", 1) == volumeSource.Source && !cutil.StringInSlice("z", options) && !cutil.StringInSlice("Z", options) {
options = append(options, v)
}
}